Date
July 8, 2025, 11:10 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 25.412296] ================================================================== [ 25.412609] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 25.413783] Read of size 1 at addr ffff88810627a650 by task kunit_try_catch/307 [ 25.414980] [ 25.415368] CPU: 1 UID: 0 PID: 307 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5-next-20250708 #1 PREEMPT(voluntary) [ 25.415606] Tainted: [B]=BAD_PAGE, [N]=TEST [ 25.415643] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 25.415668] Call Trace: [ 25.415688] <TASK> [ 25.415710] dump_stack_lvl+0x73/0xb0 [ 25.415819] print_report+0xd1/0x610 [ 25.415847] ? __virt_addr_valid+0x1db/0x2d0 [ 25.415873] ? strnlen+0x73/0x80 [ 25.415896] ? kasan_complete_mode_report_info+0x64/0x200 [ 25.415925] ? strnlen+0x73/0x80 [ 25.415948] kasan_report+0x141/0x180 [ 25.415971] ? strnlen+0x73/0x80 [ 25.415998] __asan_report_load1_noabort+0x18/0x20 [ 25.416024] strnlen+0x73/0x80 [ 25.416047] kasan_strings+0x615/0xe80 [ 25.416069] ? trace_hardirqs_on+0x37/0xe0 [ 25.416094] ? __pfx_kasan_strings+0x10/0x10 [ 25.416116] ? __kasan_check_write+0x18/0x20 [ 25.416143] ? queued_spin_lock_slowpath+0x116/0xb40 [ 25.416165] ? irqentry_exit+0x2a/0x60 [ 25.416186] ? sysvec_apic_timer_interrupt+0x50/0x90 [ 25.416209] ? trace_hardirqs_on+0x37/0xe0 [ 25.416232] ? __pfx_read_tsc+0x10/0x10 [ 25.416269] ? ktime_get_ts64+0x86/0x230 [ 25.416297] kunit_try_run_case+0x1a5/0x480 [ 25.416320] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.416344] ? queued_spin_lock_slowpath+0x116/0xb40 [ 25.416367] ? __kthread_parkme+0x82/0x180 [ 25.416388] ? preempt_count_sub+0x50/0x80 [ 25.416412] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.416434] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.416461] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 25.416487] kthread+0x337/0x6f0 [ 25.416509] ? trace_preempt_on+0x20/0xc0 [ 25.416533] ? __pfx_kthread+0x10/0x10 [ 25.416556] ? _raw_spin_unlock_irq+0x47/0x80 [ 25.416583] ? calculate_sigpending+0x7b/0xa0 [ 25.416611] ? __pfx_kthread+0x10/0x10 [ 25.416635] ret_from_fork+0x116/0x1d0 [ 25.416655] ? __pfx_kthread+0x10/0x10 [ 25.416677] ret_from_fork_asm+0x1a/0x30 [ 25.416711] </TASK> [ 25.416723] [ 25.427573] Allocated by task 307: [ 25.428071] kasan_save_stack+0x45/0x70 [ 25.428510] kasan_save_track+0x18/0x40 [ 25.428997] kasan_save_alloc_info+0x3b/0x50 [ 25.429450] __kasan_kmalloc+0xb7/0xc0 [ 25.429910] __kmalloc_cache_noprof+0x189/0x420 [ 25.430219] kasan_strings+0xc0/0xe80 [ 25.430359] kunit_try_run_case+0x1a5/0x480 [ 25.430499] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.430670] kthread+0x337/0x6f0 [ 25.431031] ret_from_fork+0x116/0x1d0 [ 25.431415] ret_from_fork_asm+0x1a/0x30 [ 25.432024] [ 25.432246] Freed by task 307: [ 25.432554] kasan_save_stack+0x45/0x70 [ 25.433021] kasan_save_track+0x18/0x40 [ 25.433414] kasan_save_free_info+0x3f/0x60 [ 25.433892] __kasan_slab_free+0x56/0x70 [ 25.434043] kfree+0x222/0x3f0 [ 25.434159] kasan_strings+0x2aa/0xe80 [ 25.434298] kunit_try_run_case+0x1a5/0x480 [ 25.434436] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.434605] kthread+0x337/0x6f0 [ 25.434721] ret_from_fork+0x116/0x1d0 [ 25.435257] ret_from_fork_asm+0x1a/0x30 [ 25.435641] [ 25.436038] The buggy address belongs to the object at ffff88810627a640 [ 25.436038] which belongs to the cache kmalloc-32 of size 32 [ 25.437219] The buggy address is located 16 bytes inside of [ 25.437219] freed 32-byte region [ffff88810627a640, ffff88810627a660) [ 25.438381] [ 25.438543] The buggy address belongs to the physical page: [ 25.439124] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10627a [ 25.439514] flags: 0x200000000000000(node=0|zone=2) [ 25.439679] page_type: f5(slab) [ 25.440124] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 25.440896] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 25.441555] page dumped because: kasan: bad access detected [ 25.441998] [ 25.442069] Memory state around the buggy address: [ 25.442223] ffff88810627a500: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc [ 25.442928] ffff88810627a580: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 25.443546] >ffff88810627a600: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 25.444225] ^ [ 25.444613] ffff88810627a680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 25.445160] ffff88810627a700: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 25.445619] ==================================================================