Date
July 4, 2025, 11:10 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 27.142037] ================================================================== [ 27.142631] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 27.143206] Read of size 1 at addr ffff888105abca90 by task kunit_try_catch/308 [ 27.143965] [ 27.144377] CPU: 0 UID: 0 PID: 308 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4-next-20250704 #1 PREEMPT(voluntary) [ 27.144471] Tainted: [B]=BAD_PAGE, [N]=TEST [ 27.144528] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 27.144557] Call Trace: [ 27.144579] <TASK> [ 27.144604] dump_stack_lvl+0x73/0xb0 [ 27.144640] print_report+0xd1/0x650 [ 27.144667] ? __virt_addr_valid+0x1db/0x2d0 [ 27.144694] ? strnlen+0x73/0x80 [ 27.144717] ? kasan_complete_mode_report_info+0x64/0x200 [ 27.144746] ? strnlen+0x73/0x80 [ 27.144768] kasan_report+0x141/0x180 [ 27.144793] ? strnlen+0x73/0x80 [ 27.144819] __asan_report_load1_noabort+0x18/0x20 [ 27.144846] strnlen+0x73/0x80 [ 27.144893] kasan_strings+0x615/0xe80 [ 27.144916] ? trace_hardirqs_on+0x37/0xe0 [ 27.144943] ? __pfx_kasan_strings+0x10/0x10 [ 27.144965] ? finish_task_switch.isra.0+0x153/0x700 [ 27.144991] ? __switch_to+0x47/0xf50 [ 27.145019] ? __schedule+0x10cc/0x2b60 [ 27.145045] ? __pfx_read_tsc+0x10/0x10 [ 27.145070] ? ktime_get_ts64+0x86/0x230 [ 27.145097] kunit_try_run_case+0x1a5/0x480 [ 27.145126] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.145160] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 27.145186] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 27.145213] ? __kthread_parkme+0x82/0x180 [ 27.145237] ? preempt_count_sub+0x50/0x80 [ 27.145261] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.145289] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.145317] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 27.145344] kthread+0x337/0x6f0 [ 27.145367] ? trace_preempt_on+0x20/0xc0 [ 27.145402] ? __pfx_kthread+0x10/0x10 [ 27.145493] ? _raw_spin_unlock_irq+0x47/0x80 [ 27.145524] ? calculate_sigpending+0x7b/0xa0 [ 27.145552] ? __pfx_kthread+0x10/0x10 [ 27.145576] ret_from_fork+0x116/0x1d0 [ 27.145599] ? __pfx_kthread+0x10/0x10 [ 27.145621] ret_from_fork_asm+0x1a/0x30 [ 27.145658] </TASK> [ 27.145671] [ 27.159499] Allocated by task 308: [ 27.160152] kasan_save_stack+0x45/0x70 [ 27.160625] kasan_save_track+0x18/0x40 [ 27.161243] kasan_save_alloc_info+0x3b/0x50 [ 27.161570] __kasan_kmalloc+0xb7/0xc0 [ 27.161980] __kmalloc_cache_noprof+0x189/0x420 [ 27.162641] kasan_strings+0xc0/0xe80 [ 27.162931] kunit_try_run_case+0x1a5/0x480 [ 27.163414] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.164084] kthread+0x337/0x6f0 [ 27.164568] ret_from_fork+0x116/0x1d0 [ 27.165086] ret_from_fork_asm+0x1a/0x30 [ 27.165534] [ 27.165781] Freed by task 308: [ 27.166057] kasan_save_stack+0x45/0x70 [ 27.166380] kasan_save_track+0x18/0x40 [ 27.166596] kasan_save_free_info+0x3f/0x60 [ 27.166805] __kasan_slab_free+0x56/0x70 [ 27.167457] kfree+0x222/0x3f0 [ 27.167836] kasan_strings+0x2aa/0xe80 [ 27.168338] kunit_try_run_case+0x1a5/0x480 [ 27.168669] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.169319] kthread+0x337/0x6f0 [ 27.169674] ret_from_fork+0x116/0x1d0 [ 27.170155] ret_from_fork_asm+0x1a/0x30 [ 27.170602] [ 27.170860] The buggy address belongs to the object at ffff888105abca80 [ 27.170860] which belongs to the cache kmalloc-32 of size 32 [ 27.171805] The buggy address is located 16 bytes inside of [ 27.171805] freed 32-byte region [ffff888105abca80, ffff888105abcaa0) [ 27.173169] [ 27.173319] The buggy address belongs to the physical page: [ 27.173614] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105abc [ 27.174291] flags: 0x200000000000000(node=0|zone=2) [ 27.174557] page_type: f5(slab) [ 27.174727] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 27.175495] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 27.176251] page dumped because: kasan: bad access detected [ 27.176699] [ 27.176807] Memory state around the buggy address: [ 27.177521] ffff888105abc980: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 27.178036] ffff888105abca00: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 27.178616] >ffff888105abca80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.179518] ^ [ 27.179874] ffff888105abcb00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 27.180728] ffff888105abcb80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.181370] ==================================================================