Date
July 9, 2025, 1:08 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 31.644044] ================================================================== [ 31.644108] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 31.644521] Read of size 1 at addr fff00000c9c23a10 by task kunit_try_catch/291 [ 31.644594] [ 31.644958] CPU: 1 UID: 0 PID: 291 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5-next-20250709 #1 PREEMPT [ 31.645066] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.645098] Hardware name: linux,dummy-virt (DT) [ 31.645139] Call trace: [ 31.645165] show_stack+0x20/0x38 (C) [ 31.645218] dump_stack_lvl+0x8c/0xd0 [ 31.645432] print_report+0x118/0x5d0 [ 31.645633] kasan_report+0xdc/0x128 [ 31.645741] __asan_report_load1_noabort+0x20/0x30 [ 31.645807] strlen+0xa8/0xb0 [ 31.646087] kasan_strings+0x418/0xb00 [ 31.646236] kunit_try_run_case+0x170/0x3f0 [ 31.646311] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.646435] kthread+0x328/0x630 [ 31.646530] ret_from_fork+0x10/0x20 [ 31.646582] [ 31.646602] Allocated by task 291: [ 31.646652] kasan_save_stack+0x3c/0x68 [ 31.646894] kasan_save_track+0x20/0x40 [ 31.647072] kasan_save_alloc_info+0x40/0x58 [ 31.647124] __kasan_kmalloc+0xd4/0xd8 [ 31.647173] __kmalloc_cache_noprof+0x16c/0x3c0 [ 31.647217] kasan_strings+0xc8/0xb00 [ 31.647299] kunit_try_run_case+0x170/0x3f0 [ 31.647358] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.647407] kthread+0x328/0x630 [ 31.647442] ret_from_fork+0x10/0x20 [ 31.647615] [ 31.647817] Freed by task 291: [ 31.647870] kasan_save_stack+0x3c/0x68 [ 31.648196] kasan_save_track+0x20/0x40 [ 31.648279] kasan_save_free_info+0x4c/0x78 [ 31.648320] __kasan_slab_free+0x6c/0x98 [ 31.648792] kfree+0x214/0x3c8 [ 31.648889] kasan_strings+0x24c/0xb00 [ 31.649048] kunit_try_run_case+0x170/0x3f0 [ 31.649137] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.649299] kthread+0x328/0x630 [ 31.649336] ret_from_fork+0x10/0x20 [ 31.649783] [ 31.649963] The buggy address belongs to the object at fff00000c9c23a00 [ 31.649963] which belongs to the cache kmalloc-32 of size 32 [ 31.650070] The buggy address is located 16 bytes inside of [ 31.650070] freed 32-byte region [fff00000c9c23a00, fff00000c9c23a20) [ 31.650261] [ 31.650283] The buggy address belongs to the physical page: [ 31.650434] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109c23 [ 31.650672] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 31.650851] page_type: f5(slab) [ 31.650965] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 31.651209] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 31.651423] page dumped because: kasan: bad access detected [ 31.651699] [ 31.651726] Memory state around the buggy address: [ 31.651762] fff00000c9c23900: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 31.651810] fff00000c9c23980: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 31.652302] >fff00000c9c23a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 31.652403] ^ [ 31.652625] fff00000c9c23a80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 31.652753] fff00000c9c23b00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 31.652880] ==================================================================
[ 26.087793] ================================================================== [ 26.088431] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 26.089305] Read of size 1 at addr ffff88810539c3d0 by task kunit_try_catch/309 [ 26.089604] [ 26.089705] CPU: 1 UID: 0 PID: 309 Comm: kunit_try_catch Tainted: G B W N 6.16.0-rc5-next-20250709 #1 PREEMPT(voluntary) [ 26.089758] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 26.089772] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 26.090384] Call Trace: [ 26.090404] <TASK> [ 26.090423] dump_stack_lvl+0x73/0xb0 [ 26.090467] print_report+0xd1/0x610 [ 26.090490] ? __virt_addr_valid+0x1db/0x2d0 [ 26.090515] ? strlen+0x8f/0xb0 [ 26.090534] ? kasan_complete_mode_report_info+0x64/0x200 [ 26.090561] ? strlen+0x8f/0xb0 [ 26.090583] kasan_report+0x141/0x180 [ 26.090605] ? strlen+0x8f/0xb0 [ 26.090629] __asan_report_load1_noabort+0x18/0x20 [ 26.090653] strlen+0x8f/0xb0 [ 26.090672] kasan_strings+0x57b/0xe80 [ 26.090690] ? trace_hardirqs_on+0x37/0xe0 [ 26.090724] ? __pfx_kasan_strings+0x10/0x10 [ 26.090744] ? finish_task_switch.isra.0+0x153/0x700 [ 26.090765] ? __switch_to+0x47/0xf80 [ 26.090804] ? __schedule+0x10cc/0x2b60 [ 26.090828] ? __pfx_read_tsc+0x10/0x10 [ 26.090850] ? ktime_get_ts64+0x86/0x230 [ 26.090875] kunit_try_run_case+0x1a5/0x480 [ 26.090937] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.090961] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 26.090985] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 26.091008] ? __kthread_parkme+0x82/0x180 [ 26.091029] ? preempt_count_sub+0x50/0x80 [ 26.091052] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.091073] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.091098] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 26.091123] kthread+0x337/0x6f0 [ 26.091141] ? trace_preempt_on+0x20/0xc0 [ 26.091164] ? __pfx_kthread+0x10/0x10 [ 26.091184] ? _raw_spin_unlock_irq+0x47/0x80 [ 26.091206] ? calculate_sigpending+0x7b/0xa0 [ 26.091229] ? __pfx_kthread+0x10/0x10 [ 26.091251] ret_from_fork+0x116/0x1d0 [ 26.091270] ? __pfx_kthread+0x10/0x10 [ 26.091291] ret_from_fork_asm+0x1a/0x30 [ 26.091321] </TASK> [ 26.091334] [ 26.099011] Allocated by task 309: [ 26.099233] kasan_save_stack+0x45/0x70 [ 26.099403] kasan_save_track+0x18/0x40 [ 26.099556] kasan_save_alloc_info+0x3b/0x50 [ 26.099761] __kasan_kmalloc+0xb7/0xc0 [ 26.099938] __kmalloc_cache_noprof+0x189/0x420 [ 26.100136] kasan_strings+0xc0/0xe80 [ 26.100293] kunit_try_run_case+0x1a5/0x480 [ 26.100447] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.100687] kthread+0x337/0x6f0 [ 26.100875] ret_from_fork+0x116/0x1d0 [ 26.101042] ret_from_fork_asm+0x1a/0x30 [ 26.101203] [ 26.101268] Freed by task 309: [ 26.101373] kasan_save_stack+0x45/0x70 [ 26.101558] kasan_save_track+0x18/0x40 [ 26.101759] kasan_save_free_info+0x3f/0x60 [ 26.102223] __kasan_slab_free+0x56/0x70 [ 26.102361] kfree+0x222/0x3f0 [ 26.102475] kasan_strings+0x2aa/0xe80 [ 26.102601] kunit_try_run_case+0x1a5/0x480 [ 26.102839] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.103140] kthread+0x337/0x6f0 [ 26.103309] ret_from_fork+0x116/0x1d0 [ 26.103489] ret_from_fork_asm+0x1a/0x30 [ 26.103676] [ 26.103786] The buggy address belongs to the object at ffff88810539c3c0 [ 26.103786] which belongs to the cache kmalloc-32 of size 32 [ 26.104412] The buggy address is located 16 bytes inside of [ 26.104412] freed 32-byte region [ffff88810539c3c0, ffff88810539c3e0) [ 26.105181] [ 26.105293] The buggy address belongs to the physical page: [ 26.105534] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10539c [ 26.105970] flags: 0x200000000000000(node=0|zone=2) [ 26.106150] page_type: f5(slab) [ 26.106321] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 26.106619] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 26.107040] page dumped because: kasan: bad access detected [ 26.107259] [ 26.107349] Memory state around the buggy address: [ 26.107574] ffff88810539c280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 26.107876] ffff88810539c300: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 26.108167] >ffff88810539c380: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 26.108452] ^ [ 26.108626] ffff88810539c400: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 26.109176] ffff88810539c480: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 26.109484] ==================================================================