Date
June 24, 2025, 12:47 p.m.
Environment | |
---|---|
qemu-x86_64 |
[ 14.044171] ================================================================== [ 14.044681] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 14.045337] Read of size 1 at addr ffff8881039efb10 by task kunit_try_catch/279 [ 14.046452] [ 14.046657] CPU: 0 UID: 0 PID: 279 Comm: kunit_try_catch Tainted: G B N 6.15.4-rc2 #1 PREEMPT(voluntary) [ 14.046769] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.046796] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.046837] Call Trace: [ 14.046875] <TASK> [ 14.046913] dump_stack_lvl+0x73/0xb0 [ 14.046974] print_report+0xd1/0x650 [ 14.047024] ? __virt_addr_valid+0x1db/0x2d0 [ 14.047068] ? strnlen+0x73/0x80 [ 14.047098] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.047123] ? strnlen+0x73/0x80 [ 14.047142] kasan_report+0x141/0x180 [ 14.047163] ? strnlen+0x73/0x80 [ 14.047184] __asan_report_load1_noabort+0x18/0x20 [ 14.047205] strnlen+0x73/0x80 [ 14.047223] kasan_strings+0x615/0xe80 [ 14.047243] ? trace_hardirqs_on+0x37/0xe0 [ 14.047265] ? __pfx_kasan_strings+0x10/0x10 [ 14.047285] ? finish_task_switch.isra.0+0x153/0x700 [ 14.047309] ? __switch_to+0x5d9/0xf60 [ 14.047329] ? dequeue_task_fair+0x166/0x4e0 [ 14.047352] ? __schedule+0x10cc/0x2b60 [ 14.047375] ? __pfx_read_tsc+0x10/0x10 [ 14.047394] ? ktime_get_ts64+0x86/0x230 [ 14.047420] kunit_try_run_case+0x1a5/0x480 [ 14.047443] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.047464] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.047487] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.047509] ? __kthread_parkme+0x82/0x180 [ 14.047531] ? preempt_count_sub+0x50/0x80 [ 14.047578] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.047602] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.047641] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.047667] kthread+0x337/0x6f0 [ 14.047684] ? trace_preempt_on+0x20/0xc0 [ 14.047705] ? __pfx_kthread+0x10/0x10 [ 14.047722] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.047743] ? calculate_sigpending+0x7b/0xa0 [ 14.047764] ? __pfx_kthread+0x10/0x10 [ 14.047782] ret_from_fork+0x41/0x80 [ 14.047801] ? __pfx_kthread+0x10/0x10 [ 14.047818] ret_from_fork_asm+0x1a/0x30 [ 14.047849] </TASK> [ 14.047860] [ 14.055980] Allocated by task 279: [ 14.056322] kasan_save_stack+0x45/0x70 [ 14.056665] kasan_save_track+0x18/0x40 [ 14.056955] kasan_save_alloc_info+0x3b/0x50 [ 14.057272] __kasan_kmalloc+0xb7/0xc0 [ 14.057608] __kmalloc_cache_noprof+0x189/0x420 [ 14.057989] kasan_strings+0xc0/0xe80 [ 14.058270] kunit_try_run_case+0x1a5/0x480 [ 14.058513] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.058865] kthread+0x337/0x6f0 [ 14.059053] ret_from_fork+0x41/0x80 [ 14.059245] ret_from_fork_asm+0x1a/0x30 [ 14.059439] [ 14.059582] Freed by task 279: [ 14.059775] kasan_save_stack+0x45/0x70 [ 14.059969] kasan_save_track+0x18/0x40 [ 14.060159] kasan_save_free_info+0x3f/0x60 [ 14.060480] __kasan_slab_free+0x56/0x70 [ 14.060815] kfree+0x222/0x3f0 [ 14.061075] kasan_strings+0x2aa/0xe80 [ 14.061376] kunit_try_run_case+0x1a5/0x480 [ 14.061740] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.062128] kthread+0x337/0x6f0 [ 14.062396] ret_from_fork+0x41/0x80 [ 14.062716] ret_from_fork_asm+0x1a/0x30 [ 14.063014] [ 14.063174] The buggy address belongs to the object at ffff8881039efb00 [ 14.063174] which belongs to the cache kmalloc-32 of size 32 [ 14.064060] The buggy address is located 16 bytes inside of [ 14.064060] freed 32-byte region [ffff8881039efb00, ffff8881039efb20) [ 14.064591] [ 14.064771] The buggy address belongs to the physical page: [ 14.065175] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039ef [ 14.065576] flags: 0x200000000000000(node=0|zone=2) [ 14.065804] page_type: f5(slab) [ 14.065986] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.066409] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.066942] page dumped because: kasan: bad access detected [ 14.067330] [ 14.067479] Memory state around the buggy address: [ 14.067873] ffff8881039efa00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.068352] ffff8881039efa80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.068788] >ffff8881039efb00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.069153] ^ [ 14.069386] ffff8881039efb80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.069787] ffff8881039efc00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.070039] ==================================================================