Date
June 16, 2025, 7:07 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 22.271344] ================================================================== [ 22.271425] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 22.271507] Read of size 1 at addr fff00000c63fb310 by task kunit_try_catch/268 [ 22.271572] [ 22.271628] CPU: 0 UID: 0 PID: 268 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250616 #1 PREEMPT [ 22.271738] Tainted: [B]=BAD_PAGE, [N]=TEST [ 22.271774] Hardware name: linux,dummy-virt (DT) [ 22.271815] Call trace: [ 22.273229] show_stack+0x20/0x38 (C) [ 22.273904] dump_stack_lvl+0x8c/0xd0 [ 22.274378] print_report+0x118/0x608 [ 22.274548] kasan_report+0xdc/0x128 [ 22.275198] __asan_report_load1_noabort+0x20/0x30 [ 22.275267] strlen+0xa8/0xb0 [ 22.275323] kasan_strings+0x418/0xb00 [ 22.275380] kunit_try_run_case+0x170/0x3f0 [ 22.275436] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.275499] kthread+0x328/0x630 [ 22.275550] ret_from_fork+0x10/0x20 [ 22.276787] [ 22.276831] Allocated by task 268: [ 22.277288] kasan_save_stack+0x3c/0x68 [ 22.277401] kasan_save_track+0x20/0x40 [ 22.277454] kasan_save_alloc_info+0x40/0x58 [ 22.277497] __kasan_kmalloc+0xd4/0xd8 [ 22.278140] __kmalloc_cache_noprof+0x16c/0x3c0 [ 22.278210] kasan_strings+0xc8/0xb00 [ 22.278262] kunit_try_run_case+0x170/0x3f0 [ 22.278314] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.278367] kthread+0x328/0x630 [ 22.278411] ret_from_fork+0x10/0x20 [ 22.278461] [ 22.278490] Freed by task 268: [ 22.278527] kasan_save_stack+0x3c/0x68 [ 22.278573] kasan_save_track+0x20/0x40 [ 22.278625] kasan_save_free_info+0x4c/0x78 [ 22.278667] __kasan_slab_free+0x6c/0x98 [ 22.278712] kfree+0x214/0x3c8 [ 22.279606] kasan_strings+0x24c/0xb00 [ 22.280204] kunit_try_run_case+0x170/0x3f0 [ 22.280898] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.281237] kthread+0x328/0x630 [ 22.281294] ret_from_fork+0x10/0x20 [ 22.282063] [ 22.282169] The buggy address belongs to the object at fff00000c63fb300 [ 22.282169] which belongs to the cache kmalloc-32 of size 32 [ 22.282252] The buggy address is located 16 bytes inside of [ 22.282252] freed 32-byte region [fff00000c63fb300, fff00000c63fb320) [ 22.282329] [ 22.282359] The buggy address belongs to the physical page: [ 22.282404] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1063fb [ 22.282475] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 22.282540] page_type: f5(slab) [ 22.284622] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 22.284739] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 22.284796] page dumped because: kasan: bad access detected [ 22.284850] [ 22.285685] Memory state around the buggy address: [ 22.286011] fff00000c63fb200: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 22.286447] fff00000c63fb280: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 22.286624] >fff00000c63fb300: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 22.286760] ^ [ 22.286804] fff00000c63fb380: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 22.286874] fff00000c63fb400: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 22.286925] ==================================================================
[ 13.468741] ================================================================== [ 13.469385] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 13.469632] Read of size 1 at addr ffff8881028dc250 by task kunit_try_catch/284 [ 13.470037] [ 13.470153] CPU: 1 UID: 0 PID: 284 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250616 #1 PREEMPT(voluntary) [ 13.470203] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.470215] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.470236] Call Trace: [ 13.470257] <TASK> [ 13.470276] dump_stack_lvl+0x73/0xb0 [ 13.470304] print_report+0xd1/0x650 [ 13.470351] ? __virt_addr_valid+0x1db/0x2d0 [ 13.470374] ? strlen+0x8f/0xb0 [ 13.470395] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.470417] ? strlen+0x8f/0xb0 [ 13.470437] kasan_report+0x141/0x180 [ 13.470458] ? strlen+0x8f/0xb0 [ 13.470483] __asan_report_load1_noabort+0x18/0x20 [ 13.470506] strlen+0x8f/0xb0 [ 13.470526] kasan_strings+0x57b/0xe80 [ 13.470631] ? trace_hardirqs_on+0x37/0xe0 [ 13.470656] ? __pfx_kasan_strings+0x10/0x10 [ 13.470675] ? finish_task_switch.isra.0+0x153/0x700 [ 13.470698] ? __switch_to+0x47/0xf50 [ 13.470723] ? __schedule+0x10cc/0x2b60 [ 13.470745] ? __pfx_read_tsc+0x10/0x10 [ 13.470764] ? ktime_get_ts64+0x86/0x230 [ 13.470789] kunit_try_run_case+0x1a5/0x480 [ 13.470812] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.470833] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.470854] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.470876] ? __kthread_parkme+0x82/0x180 [ 13.470896] ? preempt_count_sub+0x50/0x80 [ 13.470917] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.470954] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.470976] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.470998] kthread+0x337/0x6f0 [ 13.471039] ? trace_preempt_on+0x20/0xc0 [ 13.471060] ? __pfx_kthread+0x10/0x10 [ 13.471080] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.471100] ? calculate_sigpending+0x7b/0xa0 [ 13.471123] ? __pfx_kthread+0x10/0x10 [ 13.471144] ret_from_fork+0x116/0x1d0 [ 13.471161] ? __pfx_kthread+0x10/0x10 [ 13.471181] ret_from_fork_asm+0x1a/0x30 [ 13.471211] </TASK> [ 13.471222] [ 13.481021] Allocated by task 284: [ 13.481281] kasan_save_stack+0x45/0x70 [ 13.481652] kasan_save_track+0x18/0x40 [ 13.481837] kasan_save_alloc_info+0x3b/0x50 [ 13.482035] __kasan_kmalloc+0xb7/0xc0 [ 13.482203] __kmalloc_cache_noprof+0x189/0x420 [ 13.482718] kasan_strings+0xc0/0xe80 [ 13.482957] kunit_try_run_case+0x1a5/0x480 [ 13.483281] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.483595] kthread+0x337/0x6f0 [ 13.483752] ret_from_fork+0x116/0x1d0 [ 13.483921] ret_from_fork_asm+0x1a/0x30 [ 13.484069] [ 13.484135] Freed by task 284: [ 13.484263] kasan_save_stack+0x45/0x70 [ 13.484631] kasan_save_track+0x18/0x40 [ 13.484830] kasan_save_free_info+0x3f/0x60 [ 13.484989] __kasan_slab_free+0x56/0x70 [ 13.485197] kfree+0x222/0x3f0 [ 13.485359] kasan_strings+0x2aa/0xe80 [ 13.485585] kunit_try_run_case+0x1a5/0x480 [ 13.485795] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.486031] kthread+0x337/0x6f0 [ 13.486143] ret_from_fork+0x116/0x1d0 [ 13.486293] ret_from_fork_asm+0x1a/0x30 [ 13.486480] [ 13.486567] The buggy address belongs to the object at ffff8881028dc240 [ 13.486567] which belongs to the cache kmalloc-32 of size 32 [ 13.487110] The buggy address is located 16 bytes inside of [ 13.487110] freed 32-byte region [ffff8881028dc240, ffff8881028dc260) [ 13.487880] [ 13.487983] The buggy address belongs to the physical page: [ 13.488188] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1028dc [ 13.488483] flags: 0x200000000000000(node=0|zone=2) [ 13.488881] page_type: f5(slab) [ 13.489028] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.489264] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.489581] page dumped because: kasan: bad access detected [ 13.489831] [ 13.490005] Memory state around the buggy address: [ 13.490211] ffff8881028dc100: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc [ 13.490441] ffff8881028dc180: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.490880] >ffff8881028dc200: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.491202] ^ [ 13.491441] ffff8881028dc280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.491820] ffff8881028dc300: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.492113] ==================================================================