Date
July 4, 2025, 11:11 p.m.
Environment | |
---|---|
qemu-x86_64 |
[ 14.012803] ================================================================== [ 14.013796] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 14.014099] Read of size 1 at addr ffff888103994910 by task kunit_try_catch/276 [ 14.014478] [ 14.014574] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 14.014624] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.014636] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.014659] Call Trace: [ 14.014679] <TASK> [ 14.014700] dump_stack_lvl+0x73/0xb0 [ 14.014731] print_report+0xd1/0x650 [ 14.014755] ? __virt_addr_valid+0x1db/0x2d0 [ 14.014779] ? strnlen+0x73/0x80 [ 14.014796] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.014818] ? strnlen+0x73/0x80 [ 14.014835] kasan_report+0x141/0x180 [ 14.014856] ? strnlen+0x73/0x80 [ 14.014878] __asan_report_load1_noabort+0x18/0x20 [ 14.014904] strnlen+0x73/0x80 [ 14.014921] kasan_strings+0x615/0xe80 [ 14.014941] ? trace_hardirqs_on+0x37/0xe0 [ 14.014965] ? __pfx_kasan_strings+0x10/0x10 [ 14.014985] ? finish_task_switch.isra.0+0x153/0x700 [ 14.015006] ? __switch_to+0x47/0xf50 [ 14.015031] ? __schedule+0x10cc/0x2b60 [ 14.015053] ? __pfx_read_tsc+0x10/0x10 [ 14.015074] ? ktime_get_ts64+0x86/0x230 [ 14.015097] kunit_try_run_case+0x1a5/0x480 [ 14.015121] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.015143] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.015166] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.015188] ? __kthread_parkme+0x82/0x180 [ 14.015208] ? preempt_count_sub+0x50/0x80 [ 14.015244] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.015267] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.015289] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.015333] kthread+0x337/0x6f0 [ 14.015352] ? trace_preempt_on+0x20/0xc0 [ 14.015373] ? __pfx_kthread+0x10/0x10 [ 14.015392] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.015413] ? calculate_sigpending+0x7b/0xa0 [ 14.015436] ? __pfx_kthread+0x10/0x10 [ 14.015457] ret_from_fork+0x116/0x1d0 [ 14.015475] ? __pfx_kthread+0x10/0x10 [ 14.015495] ret_from_fork_asm+0x1a/0x30 [ 14.015526] </TASK> [ 14.015537] [ 14.023718] Allocated by task 276: [ 14.023880] kasan_save_stack+0x45/0x70 [ 14.024097] kasan_save_track+0x18/0x40 [ 14.024387] kasan_save_alloc_info+0x3b/0x50 [ 14.024611] __kasan_kmalloc+0xb7/0xc0 [ 14.024803] __kmalloc_cache_noprof+0x189/0x420 [ 14.025038] kasan_strings+0xc0/0xe80 [ 14.025319] kunit_try_run_case+0x1a5/0x480 [ 14.025541] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.025793] kthread+0x337/0x6f0 [ 14.025941] ret_from_fork+0x116/0x1d0 [ 14.026079] ret_from_fork_asm+0x1a/0x30 [ 14.026617] [ 14.026725] Freed by task 276: [ 14.026866] kasan_save_stack+0x45/0x70 [ 14.027008] kasan_save_track+0x18/0x40 [ 14.027142] kasan_save_free_info+0x3f/0x60 [ 14.027305] __kasan_slab_free+0x56/0x70 [ 14.027561] kfree+0x222/0x3f0 [ 14.027734] kasan_strings+0x2aa/0xe80 [ 14.027929] kunit_try_run_case+0x1a5/0x480 [ 14.028144] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.028414] kthread+0x337/0x6f0 [ 14.028622] ret_from_fork+0x116/0x1d0 [ 14.028830] ret_from_fork_asm+0x1a/0x30 [ 14.029032] [ 14.029131] The buggy address belongs to the object at ffff888103994900 [ 14.029131] which belongs to the cache kmalloc-32 of size 32 [ 14.029667] The buggy address is located 16 bytes inside of [ 14.029667] freed 32-byte region [ffff888103994900, ffff888103994920) [ 14.030021] [ 14.030111] The buggy address belongs to the physical page: [ 14.030376] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103994 [ 14.030729] flags: 0x200000000000000(node=0|zone=2) [ 14.030939] page_type: f5(slab) [ 14.031064] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.031783] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.032139] page dumped because: kasan: bad access detected [ 14.032572] [ 14.032655] Memory state around the buggy address: [ 14.032864] ffff888103994800: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.033082] ffff888103994880: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 14.033312] >ffff888103994900: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.033526] ^ [ 14.033656] ffff888103994980: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.033871] ffff888103994a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.034144] ==================================================================