Date
June 23, 2025, 7:07 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 23.896511] ================================================================== [ 23.896869] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 23.897606] Read of size 1 at addr ffff8881023cba90 by task kunit_try_catch/288 [ 23.898065] [ 23.898221] CPU: 0 UID: 0 PID: 288 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250623 #1 PREEMPT(voluntary) [ 23.898309] Tainted: [B]=BAD_PAGE, [N]=TEST [ 23.898324] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 23.898347] Call Trace: [ 23.898361] <TASK> [ 23.898393] dump_stack_lvl+0x73/0xb0 [ 23.898445] print_report+0xd1/0x650 [ 23.898482] ? __virt_addr_valid+0x1db/0x2d0 [ 23.898524] ? strlen+0x8f/0xb0 [ 23.898563] ? kasan_complete_mode_report_info+0x64/0x200 [ 23.898610] ? strlen+0x8f/0xb0 [ 23.898653] kasan_report+0x141/0x180 [ 23.898696] ? strlen+0x8f/0xb0 [ 23.898747] __asan_report_load1_noabort+0x18/0x20 [ 23.898790] strlen+0x8f/0xb0 [ 23.898829] kasan_strings+0x57b/0xe80 [ 23.898910] ? trace_hardirqs_on+0x37/0xe0 [ 23.898950] ? __pfx_kasan_strings+0x10/0x10 [ 23.898986] ? finish_task_switch.isra.0+0x153/0x700 [ 23.899050] ? __switch_to+0x47/0xf50 [ 23.899096] ? __schedule+0x10cc/0x2b60 [ 23.899129] ? __pfx_read_tsc+0x10/0x10 [ 23.899166] ? ktime_get_ts64+0x86/0x230 [ 23.899209] kunit_try_run_case+0x1a5/0x480 [ 23.899254] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.899295] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 23.899365] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 23.899421] ? __kthread_parkme+0x82/0x180 [ 23.899458] ? preempt_count_sub+0x50/0x80 [ 23.899487] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.899510] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.899531] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 23.899551] kthread+0x337/0x6f0 [ 23.899568] ? trace_preempt_on+0x20/0xc0 [ 23.899587] ? __pfx_kthread+0x10/0x10 [ 23.899605] ? _raw_spin_unlock_irq+0x47/0x80 [ 23.899623] ? calculate_sigpending+0x7b/0xa0 [ 23.899644] ? __pfx_kthread+0x10/0x10 [ 23.899662] ret_from_fork+0x116/0x1d0 [ 23.899678] ? __pfx_kthread+0x10/0x10 [ 23.899695] ret_from_fork_asm+0x1a/0x30 [ 23.899723] </TASK> [ 23.899733] [ 23.909414] Allocated by task 288: [ 23.909695] kasan_save_stack+0x45/0x70 [ 23.910042] kasan_save_track+0x18/0x40 [ 23.910294] kasan_save_alloc_info+0x3b/0x50 [ 23.910586] __kasan_kmalloc+0xb7/0xc0 [ 23.910835] __kmalloc_cache_noprof+0x189/0x420 [ 23.911034] kasan_strings+0xc0/0xe80 [ 23.911301] kunit_try_run_case+0x1a5/0x480 [ 23.911566] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.911859] kthread+0x337/0x6f0 [ 23.912076] ret_from_fork+0x116/0x1d0 [ 23.912333] ret_from_fork_asm+0x1a/0x30 [ 23.912496] [ 23.912579] Freed by task 288: [ 23.912699] kasan_save_stack+0x45/0x70 [ 23.912842] kasan_save_track+0x18/0x40 [ 23.913136] kasan_save_free_info+0x3f/0x60 [ 23.913453] __kasan_slab_free+0x56/0x70 [ 23.913746] kfree+0x222/0x3f0 [ 23.914042] kasan_strings+0x2aa/0xe80 [ 23.914333] kunit_try_run_case+0x1a5/0x480 [ 23.914586] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.914771] kthread+0x337/0x6f0 [ 23.914897] ret_from_fork+0x116/0x1d0 [ 23.915125] ret_from_fork_asm+0x1a/0x30 [ 23.915495] [ 23.915646] The buggy address belongs to the object at ffff8881023cba80 [ 23.915646] which belongs to the cache kmalloc-32 of size 32 [ 23.916495] The buggy address is located 16 bytes inside of [ 23.916495] freed 32-byte region [ffff8881023cba80, ffff8881023cbaa0) [ 23.916864] [ 23.917007] The buggy address belongs to the physical page: [ 23.917413] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1023cb [ 23.917936] flags: 0x200000000000000(node=0|zone=2) [ 23.918139] page_type: f5(slab) [ 23.918280] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 23.918525] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 23.918849] page dumped because: kasan: bad access detected [ 23.919212] [ 23.919369] Memory state around the buggy address: [ 23.919859] ffff8881023cb980: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 23.920361] ffff8881023cba00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 23.920646] >ffff8881023cba80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 23.921165] ^ [ 23.921309] ffff8881023cbb00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 23.921533] ffff8881023cbb80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 23.922043] ==================================================================