Date
July 5, 2025, 11:09 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 15.849109] ================================================================== [ 15.849478] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 15.850108] Read of size 1 at addr ffff8881038e5fd0 by task kunit_try_catch/277 [ 15.850499] [ 15.850669] CPU: 0 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 15.850725] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.850740] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 15.850767] Call Trace: [ 15.850790] <TASK> [ 15.850814] dump_stack_lvl+0x73/0xb0 [ 15.850848] print_report+0xd1/0x650 [ 15.850876] ? __virt_addr_valid+0x1db/0x2d0 [ 15.850903] ? strlen+0x8f/0xb0 [ 15.850923] ? kasan_complete_mode_report_info+0x64/0x200 [ 15.850958] ? strlen+0x8f/0xb0 [ 15.850978] kasan_report+0x141/0x180 [ 15.851049] ? strlen+0x8f/0xb0 [ 15.851076] __asan_report_load1_noabort+0x18/0x20 [ 15.851105] strlen+0x8f/0xb0 [ 15.851126] kasan_strings+0x57b/0xe80 [ 15.851149] ? trace_hardirqs_on+0x37/0xe0 [ 15.851178] ? __pfx_kasan_strings+0x10/0x10 [ 15.851201] ? finish_task_switch.isra.0+0x153/0x700 [ 15.851227] ? __switch_to+0x47/0xf50 [ 15.851257] ? __schedule+0x10cc/0x2b60 [ 15.851285] ? __pfx_read_tsc+0x10/0x10 [ 15.851310] ? ktime_get_ts64+0x86/0x230 [ 15.851337] kunit_try_run_case+0x1a5/0x480 [ 15.851366] ? __pfx_kunit_try_run_case+0x10/0x10 [ 15.851392] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 15.851420] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 15.851536] ? __kthread_parkme+0x82/0x180 [ 15.851564] ? preempt_count_sub+0x50/0x80 [ 15.851591] ? __pfx_kunit_try_run_case+0x10/0x10 [ 15.851619] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.851661] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 15.851688] kthread+0x337/0x6f0 [ 15.851711] ? trace_preempt_on+0x20/0xc0 [ 15.851738] ? __pfx_kthread+0x10/0x10 [ 15.851874] ? _raw_spin_unlock_irq+0x47/0x80 [ 15.851908] ? calculate_sigpending+0x7b/0xa0 [ 15.851938] ? __pfx_kthread+0x10/0x10 [ 15.851964] ret_from_fork+0x116/0x1d0 [ 15.851989] ? __pfx_kthread+0x10/0x10 [ 15.852012] ret_from_fork_asm+0x1a/0x30 [ 15.852050] </TASK> [ 15.852064] [ 15.862128] Allocated by task 277: [ 15.862389] kasan_save_stack+0x45/0x70 [ 15.862609] kasan_save_track+0x18/0x40 [ 15.863062] kasan_save_alloc_info+0x3b/0x50 [ 15.863326] __kasan_kmalloc+0xb7/0xc0 [ 15.863551] __kmalloc_cache_noprof+0x189/0x420 [ 15.863834] kasan_strings+0xc0/0xe80 [ 15.864163] kunit_try_run_case+0x1a5/0x480 [ 15.864454] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.864847] kthread+0x337/0x6f0 [ 15.865058] ret_from_fork+0x116/0x1d0 [ 15.865276] ret_from_fork_asm+0x1a/0x30 [ 15.865508] [ 15.865623] Freed by task 277: [ 15.865804] kasan_save_stack+0x45/0x70 [ 15.866076] kasan_save_track+0x18/0x40 [ 15.866318] kasan_save_free_info+0x3f/0x60 [ 15.866569] __kasan_slab_free+0x56/0x70 [ 15.867024] kfree+0x222/0x3f0 [ 15.867203] kasan_strings+0x2aa/0xe80 [ 15.867365] kunit_try_run_case+0x1a5/0x480 [ 15.867659] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.868024] kthread+0x337/0x6f0 [ 15.868178] ret_from_fork+0x116/0x1d0 [ 15.868359] ret_from_fork_asm+0x1a/0x30 [ 15.868731] [ 15.868951] The buggy address belongs to the object at ffff8881038e5fc0 [ 15.868951] which belongs to the cache kmalloc-32 of size 32 [ 15.869509] The buggy address is located 16 bytes inside of [ 15.869509] freed 32-byte region [ffff8881038e5fc0, ffff8881038e5fe0) [ 15.870207] [ 15.870332] The buggy address belongs to the physical page: [ 15.870621] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1038e5 [ 15.871252] flags: 0x200000000000000(node=0|zone=2) [ 15.871506] page_type: f5(slab) [ 15.871753] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 15.872261] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000 [ 15.872677] page dumped because: kasan: bad access detected [ 15.872972] [ 15.873058] Memory state around the buggy address: [ 15.873322] ffff8881038e5e80: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc [ 15.873672] ffff8881038e5f00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 15.874054] >ffff8881038e5f80: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 15.874433] ^ [ 15.875017] ffff8881038e6000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 15.875325] ffff8881038e6080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.875716] ==================================================================