Date
July 5, 2025, 5:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 20.403748] ================================================================== [ 20.405183] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 20.405400] Read of size 1 at addr fff00000c77d8490 by task kunit_try_catch/259 [ 20.405453] [ 20.406147] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 20.406250] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.406594] Hardware name: linux,dummy-virt (DT) [ 20.406928] Call trace: [ 20.407259] show_stack+0x20/0x38 (C) [ 20.407673] dump_stack_lvl+0x8c/0xd0 [ 20.408093] print_report+0x118/0x608 [ 20.408150] kasan_report+0xdc/0x128 [ 20.408198] __asan_report_load1_noabort+0x20/0x30 [ 20.408833] strlen+0xa8/0xb0 [ 20.409592] kasan_strings+0x418/0xb00 [ 20.409899] kunit_try_run_case+0x170/0x3f0 [ 20.410808] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.411135] kthread+0x328/0x630 [ 20.411194] ret_from_fork+0x10/0x20 [ 20.411694] [ 20.411717] Allocated by task 259: [ 20.412097] kasan_save_stack+0x3c/0x68 [ 20.412633] kasan_save_track+0x20/0x40 [ 20.413014] kasan_save_alloc_info+0x40/0x58 [ 20.413392] __kasan_kmalloc+0xd4/0xd8 [ 20.413494] __kmalloc_cache_noprof+0x16c/0x3c0 [ 20.414401] kasan_strings+0xc8/0xb00 [ 20.414584] kunit_try_run_case+0x170/0x3f0 [ 20.414713] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.415239] kthread+0x328/0x630 [ 20.415482] ret_from_fork+0x10/0x20 [ 20.415553] [ 20.415576] Freed by task 259: [ 20.415889] kasan_save_stack+0x3c/0x68 [ 20.416369] kasan_save_track+0x20/0x40 [ 20.416535] kasan_save_free_info+0x4c/0x78 [ 20.416637] __kasan_slab_free+0x6c/0x98 [ 20.416676] kfree+0x214/0x3c8 [ 20.416884] kasan_strings+0x24c/0xb00 [ 20.417095] kunit_try_run_case+0x170/0x3f0 [ 20.417748] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.418194] kthread+0x328/0x630 [ 20.418321] ret_from_fork+0x10/0x20 [ 20.418359] [ 20.418653] The buggy address belongs to the object at fff00000c77d8480 [ 20.418653] which belongs to the cache kmalloc-32 of size 32 [ 20.419027] The buggy address is located 16 bytes inside of [ 20.419027] freed 32-byte region [fff00000c77d8480, fff00000c77d84a0) [ 20.419095] [ 20.419724] The buggy address belongs to the physical page: [ 20.419799] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077d8 [ 20.420244] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.420772] page_type: f5(slab) [ 20.420822] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 20.420885] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.420927] page dumped because: kasan: bad access detected [ 20.420962] [ 20.420982] Memory state around the buggy address: [ 20.421016] fff00000c77d8380: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.421061] fff00000c77d8400: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 20.422994] >fff00000c77d8480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.423044] ^ [ 20.423078] fff00000c77d8500: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.423554] fff00000c77d8580: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.423655] ==================================================================
[ 13.535110] ================================================================== [ 13.535657] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 13.536093] Read of size 1 at addr ffff8881031c3250 by task kunit_try_catch/277 [ 13.536571] [ 13.536698] CPU: 0 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 13.536784] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.536797] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.536834] Call Trace: [ 13.536848] <TASK> [ 13.536864] dump_stack_lvl+0x73/0xb0 [ 13.536894] print_report+0xd1/0x650 [ 13.536918] ? __virt_addr_valid+0x1db/0x2d0 [ 13.536941] ? strlen+0x8f/0xb0 [ 13.536958] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.537011] ? strlen+0x8f/0xb0 [ 13.537029] kasan_report+0x141/0x180 [ 13.537051] ? strlen+0x8f/0xb0 [ 13.537085] __asan_report_load1_noabort+0x18/0x20 [ 13.537108] strlen+0x8f/0xb0 [ 13.537126] kasan_strings+0x57b/0xe80 [ 13.537146] ? trace_hardirqs_on+0x37/0xe0 [ 13.537170] ? __pfx_kasan_strings+0x10/0x10 [ 13.537190] ? finish_task_switch.isra.0+0x153/0x700 [ 13.537211] ? __switch_to+0x47/0xf50 [ 13.537236] ? __schedule+0x10cc/0x2b60 [ 13.537258] ? __pfx_read_tsc+0x10/0x10 [ 13.537277] ? ktime_get_ts64+0x86/0x230 [ 13.537301] kunit_try_run_case+0x1a5/0x480 [ 13.537326] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.537348] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.537371] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.537397] ? __kthread_parkme+0x82/0x180 [ 13.537526] ? preempt_count_sub+0x50/0x80 [ 13.537564] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.537588] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.537611] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.537634] kthread+0x337/0x6f0 [ 13.537655] ? trace_preempt_on+0x20/0xc0 [ 13.537677] ? __pfx_kthread+0x10/0x10 [ 13.537698] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.537718] ? calculate_sigpending+0x7b/0xa0 [ 13.537741] ? __pfx_kthread+0x10/0x10 [ 13.537762] ret_from_fork+0x116/0x1d0 [ 13.537779] ? __pfx_kthread+0x10/0x10 [ 13.537799] ret_from_fork_asm+0x1a/0x30 [ 13.537829] </TASK> [ 13.537841] [ 13.551482] Allocated by task 277: [ 13.551838] kasan_save_stack+0x45/0x70 [ 13.552031] kasan_save_track+0x18/0x40 [ 13.552490] kasan_save_alloc_info+0x3b/0x50 [ 13.553046] __kasan_kmalloc+0xb7/0xc0 [ 13.553238] __kmalloc_cache_noprof+0x189/0x420 [ 13.553701] kasan_strings+0xc0/0xe80 [ 13.554061] kunit_try_run_case+0x1a5/0x480 [ 13.554531] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.554921] kthread+0x337/0x6f0 [ 13.555261] ret_from_fork+0x116/0x1d0 [ 13.555565] ret_from_fork_asm+0x1a/0x30 [ 13.555720] [ 13.555793] Freed by task 277: [ 13.556102] kasan_save_stack+0x45/0x70 [ 13.556641] kasan_save_track+0x18/0x40 [ 13.556896] kasan_save_free_info+0x3f/0x60 [ 13.557357] __kasan_slab_free+0x56/0x70 [ 13.557659] kfree+0x222/0x3f0 [ 13.557923] kasan_strings+0x2aa/0xe80 [ 13.558171] kunit_try_run_case+0x1a5/0x480 [ 13.558584] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.559005] kthread+0x337/0x6f0 [ 13.559130] ret_from_fork+0x116/0x1d0 [ 13.559496] ret_from_fork_asm+0x1a/0x30 [ 13.559870] [ 13.560028] The buggy address belongs to the object at ffff8881031c3240 [ 13.560028] which belongs to the cache kmalloc-32 of size 32 [ 13.562352] The buggy address is located 16 bytes inside of [ 13.562352] freed 32-byte region [ffff8881031c3240, ffff8881031c3260) [ 13.562746] [ 13.562827] The buggy address belongs to the physical page: [ 13.563002] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1031c3 [ 13.563247] flags: 0x200000000000000(node=0|zone=2) [ 13.563410] page_type: f5(slab) [ 13.563545] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.564928] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.566426] page dumped because: kasan: bad access detected [ 13.566943] [ 13.567106] Memory state around the buggy address: [ 13.568272] ffff8881031c3100: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.570074] ffff8881031c3180: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.571144] >ffff8881031c3200: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.571817] ^ [ 13.572368] ffff8881031c3280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.572610] ffff8881031c3300: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.573577] ==================================================================