Date
June 24, 2025, 12:47 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 27.428788] ================================================================== [ 27.428901] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 27.429207] Read of size 1 at addr fff00000c5a7ce50 by task kunit_try_catch/261 [ 27.429337] [ 27.429422] CPU: 1 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G B N 6.15.4-rc2 #1 PREEMPT [ 27.429662] Tainted: [B]=BAD_PAGE, [N]=TEST [ 27.429733] Hardware name: linux,dummy-virt (DT) [ 27.429814] Call trace: [ 27.429874] show_stack+0x20/0x38 (C) [ 27.429993] dump_stack_lvl+0x8c/0xd0 [ 27.430141] print_report+0x118/0x608 [ 27.430274] kasan_report+0xdc/0x128 [ 27.430870] __asan_report_load1_noabort+0x20/0x30 [ 27.431285] strlen+0xa8/0xb0 [ 27.431434] kasan_strings+0x418/0xb00 [ 27.431565] kunit_try_run_case+0x170/0x3f0 [ 27.431686] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 27.431824] kthread+0x328/0x630 [ 27.431947] ret_from_fork+0x10/0x20 [ 27.432067] [ 27.432176] Allocated by task 261: [ 27.432591] kasan_save_stack+0x3c/0x68 [ 27.432709] kasan_save_track+0x20/0x40 [ 27.432809] kasan_save_alloc_info+0x40/0x58 [ 27.432913] __kasan_kmalloc+0xd4/0xd8 [ 27.433002] __kmalloc_cache_noprof+0x16c/0x3c0 [ 27.433114] kasan_strings+0xc8/0xb00 [ 27.433258] kunit_try_run_case+0x170/0x3f0 [ 27.433399] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 27.433719] kthread+0x328/0x630 [ 27.433834] ret_from_fork+0x10/0x20 [ 27.433991] [ 27.434346] Freed by task 261: [ 27.434447] kasan_save_stack+0x3c/0x68 [ 27.434613] kasan_save_track+0x20/0x40 [ 27.434941] kasan_save_free_info+0x4c/0x78 [ 27.435669] __kasan_slab_free+0x6c/0x98 [ 27.435778] kfree+0x214/0x3c8 [ 27.436142] kasan_strings+0x24c/0xb00 [ 27.436270] kunit_try_run_case+0x170/0x3f0 [ 27.436897] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 27.437105] kthread+0x328/0x630 [ 27.437203] ret_from_fork+0x10/0x20 [ 27.437308] [ 27.437361] The buggy address belongs to the object at fff00000c5a7ce40 [ 27.437361] which belongs to the cache kmalloc-32 of size 32 [ 27.437931] [ 27.440787] ==================================================================
[ 14.012002] ================================================================== [ 14.012320] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 14.013077] Read of size 1 at addr ffff8881039efb10 by task kunit_try_catch/279 [ 14.013835] [ 14.013999] CPU: 0 UID: 0 PID: 279 Comm: kunit_try_catch Tainted: G B N 6.15.4-rc2 #1 PREEMPT(voluntary) [ 14.014106] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.014132] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.014171] Call Trace: [ 14.014233] <TASK> [ 14.014272] dump_stack_lvl+0x73/0xb0 [ 14.014334] print_report+0xd1/0x650 [ 14.014383] ? __virt_addr_valid+0x1db/0x2d0 [ 14.014426] ? strlen+0x8f/0xb0 [ 14.014476] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.014516] ? strlen+0x8f/0xb0 [ 14.014582] kasan_report+0x141/0x180 [ 14.014639] ? strlen+0x8f/0xb0 [ 14.014687] __asan_report_load1_noabort+0x18/0x20 [ 14.014743] strlen+0x8f/0xb0 [ 14.014780] kasan_strings+0x57b/0xe80 [ 14.014817] ? trace_hardirqs_on+0x37/0xe0 [ 14.014862] ? __pfx_kasan_strings+0x10/0x10 [ 14.014890] ? finish_task_switch.isra.0+0x153/0x700 [ 14.014916] ? __switch_to+0x5d9/0xf60 [ 14.014936] ? dequeue_task_fair+0x166/0x4e0 [ 14.014961] ? __schedule+0x10cc/0x2b60 [ 14.014996] ? __pfx_read_tsc+0x10/0x10 [ 14.015024] ? ktime_get_ts64+0x86/0x230 [ 14.015049] kunit_try_run_case+0x1a5/0x480 [ 14.015075] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.015095] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.015119] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.015142] ? __kthread_parkme+0x82/0x180 [ 14.015163] ? preempt_count_sub+0x50/0x80 [ 14.015187] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.015208] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.015230] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.015253] kthread+0x337/0x6f0 [ 14.015270] ? trace_preempt_on+0x20/0xc0 [ 14.015291] ? __pfx_kthread+0x10/0x10 [ 14.015308] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.015328] ? calculate_sigpending+0x7b/0xa0 [ 14.015349] ? __pfx_kthread+0x10/0x10 [ 14.015367] ret_from_fork+0x41/0x80 [ 14.015386] ? __pfx_kthread+0x10/0x10 [ 14.015403] ret_from_fork_asm+0x1a/0x30 [ 14.015432] </TASK> [ 14.015445] [ 14.026938] Allocated by task 279: [ 14.027284] kasan_save_stack+0x45/0x70 [ 14.027540] kasan_save_track+0x18/0x40 [ 14.028491] kasan_save_alloc_info+0x3b/0x50 [ 14.029448] __kasan_kmalloc+0xb7/0xc0 [ 14.029985] __kmalloc_cache_noprof+0x189/0x420 [ 14.030605] kasan_strings+0xc0/0xe80 [ 14.030888] kunit_try_run_case+0x1a5/0x480 [ 14.031167] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.031381] kthread+0x337/0x6f0 [ 14.031689] ret_from_fork+0x41/0x80 [ 14.031892] ret_from_fork_asm+0x1a/0x30 [ 14.032158] [ 14.032317] Freed by task 279: [ 14.032507] kasan_save_stack+0x45/0x70 [ 14.032773] kasan_save_track+0x18/0x40 [ 14.033012] kasan_save_free_info+0x3f/0x60 [ 14.033322] __kasan_slab_free+0x56/0x70 [ 14.033611] kfree+0x222/0x3f0 [ 14.033849] kasan_strings+0x2aa/0xe80 [ 14.034014] kunit_try_run_case+0x1a5/0x480 [ 14.034409] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.034921] kthread+0x337/0x6f0 [ 14.035117] ret_from_fork+0x41/0x80 [ 14.035282] ret_from_fork_asm+0x1a/0x30 [ 14.035449] [ 14.035539] The buggy address belongs to the object at ffff8881039efb00 [ 14.035539] which belongs to the cache kmalloc-32 of size 32 [ 14.036261] The buggy address is located 16 bytes inside of [ 14.036261] freed 32-byte region [ffff8881039efb00, ffff8881039efb20) [ 14.037019] [ 14.037133] The buggy address belongs to the physical page: [ 14.037330] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039ef [ 14.037993] flags: 0x200000000000000(node=0|zone=2) [ 14.038389] page_type: f5(slab) [ 14.038596] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.038963] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.039414] page dumped because: kasan: bad access detected [ 14.039905] [ 14.040062] Memory state around the buggy address: [ 14.040375] ffff8881039efa00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.041141] ffff8881039efa80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.041460] >ffff8881039efb00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.041719] ^ [ 14.041860] ffff8881039efb80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.042102] ffff8881039efc00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.042584] ==================================================================