Date
June 23, 2025, 7:07 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 23.923610] ================================================================== [ 23.924545] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 23.925083] Read of size 1 at addr ffff8881023cba90 by task kunit_try_catch/288 [ 23.925652] [ 23.925853] CPU: 0 UID: 0 PID: 288 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250623 #1 PREEMPT(voluntary) [ 23.925942] Tainted: [B]=BAD_PAGE, [N]=TEST [ 23.925965] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 23.926023] Call Trace: [ 23.926051] <TASK> [ 23.926079] dump_stack_lvl+0x73/0xb0 [ 23.926132] print_report+0xd1/0x650 [ 23.926172] ? __virt_addr_valid+0x1db/0x2d0 [ 23.926311] ? strnlen+0x73/0x80 [ 23.926351] ? kasan_complete_mode_report_info+0x64/0x200 [ 23.926413] ? strnlen+0x73/0x80 [ 23.926514] kasan_report+0x141/0x180 [ 23.926561] ? strnlen+0x73/0x80 [ 23.926611] __asan_report_load1_noabort+0x18/0x20 [ 23.926654] strnlen+0x73/0x80 [ 23.926707] kasan_strings+0x615/0xe80 [ 23.926758] ? trace_hardirqs_on+0x37/0xe0 [ 23.926801] ? __pfx_kasan_strings+0x10/0x10 [ 23.926837] ? finish_task_switch.isra.0+0x153/0x700 [ 23.926874] ? __switch_to+0x47/0xf50 [ 23.926926] ? __schedule+0x10cc/0x2b60 [ 23.926969] ? __pfx_read_tsc+0x10/0x10 [ 23.927025] ? ktime_get_ts64+0x86/0x230 [ 23.927070] kunit_try_run_case+0x1a5/0x480 [ 23.927232] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.927285] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 23.927326] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 23.927362] ? __kthread_parkme+0x82/0x180 [ 23.927414] ? preempt_count_sub+0x50/0x80 [ 23.927466] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.927507] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.927544] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 23.927582] kthread+0x337/0x6f0 [ 23.927614] ? trace_preempt_on+0x20/0xc0 [ 23.927659] ? __pfx_kthread+0x10/0x10 [ 23.927695] ? _raw_spin_unlock_irq+0x47/0x80 [ 23.927747] ? calculate_sigpending+0x7b/0xa0 [ 23.927789] ? __pfx_kthread+0x10/0x10 [ 23.927826] ret_from_fork+0x116/0x1d0 [ 23.927854] ? __pfx_kthread+0x10/0x10 [ 23.927895] ret_from_fork_asm+0x1a/0x30 [ 23.927959] </TASK> [ 23.927982] [ 23.939479] Allocated by task 288: [ 23.939694] kasan_save_stack+0x45/0x70 [ 23.939978] kasan_save_track+0x18/0x40 [ 23.940217] kasan_save_alloc_info+0x3b/0x50 [ 23.940395] __kasan_kmalloc+0xb7/0xc0 [ 23.940672] __kmalloc_cache_noprof+0x189/0x420 [ 23.940997] kasan_strings+0xc0/0xe80 [ 23.941282] kunit_try_run_case+0x1a5/0x480 [ 23.941541] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.941830] kthread+0x337/0x6f0 [ 23.941970] ret_from_fork+0x116/0x1d0 [ 23.942127] ret_from_fork_asm+0x1a/0x30 [ 23.942420] [ 23.942580] Freed by task 288: [ 23.942825] kasan_save_stack+0x45/0x70 [ 23.943205] kasan_save_track+0x18/0x40 [ 23.943406] kasan_save_free_info+0x3f/0x60 [ 23.943566] __kasan_slab_free+0x56/0x70 [ 23.943713] kfree+0x222/0x3f0 [ 23.943927] kasan_strings+0x2aa/0xe80 [ 23.944304] kunit_try_run_case+0x1a5/0x480 [ 23.944630] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.945063] kthread+0x337/0x6f0 [ 23.945218] ret_from_fork+0x116/0x1d0 [ 23.945364] ret_from_fork_asm+0x1a/0x30 [ 23.945526] [ 23.945611] The buggy address belongs to the object at ffff8881023cba80 [ 23.945611] which belongs to the cache kmalloc-32 of size 32 [ 23.945933] The buggy address is located 16 bytes inside of [ 23.945933] freed 32-byte region [ffff8881023cba80, ffff8881023cbaa0) [ 23.946730] [ 23.946943] The buggy address belongs to the physical page: [ 23.947321] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1023cb [ 23.947651] flags: 0x200000000000000(node=0|zone=2) [ 23.947829] page_type: f5(slab) [ 23.948059] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 23.948569] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 23.948959] page dumped because: kasan: bad access detected [ 23.949273] [ 23.949360] Memory state around the buggy address: [ 23.949536] ffff8881023cb980: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 23.949885] ffff8881023cba00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 23.950426] >ffff8881023cba80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 23.950963] ^ [ 23.951120] ffff8881023cbb00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 23.951524] ffff8881023cbb80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 23.951863] ==================================================================