Date
June 3, 2025, 7:38 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 20.717862] ================================================================== [ 20.718405] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 20.718552] Read of size 1 at addr fff00000c58ba050 by task kunit_try_catch/259 [ 20.718607] [ 20.718988] CPU: 1 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.15.0-next-20250603 #1 PREEMPT [ 20.719196] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.719303] Hardware name: linux,dummy-virt (DT) [ 20.719416] Call trace: [ 20.719450] show_stack+0x20/0x38 (C) [ 20.719504] dump_stack_lvl+0x8c/0xd0 [ 20.719572] print_report+0x118/0x608 [ 20.719621] kasan_report+0xdc/0x128 [ 20.719922] __asan_report_load1_noabort+0x20/0x30 [ 20.720043] strlen+0xa8/0xb0 [ 20.720196] kasan_strings+0x418/0xb00 [ 20.720275] kunit_try_run_case+0x170/0x3f0 [ 20.720326] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.720460] kthread+0x328/0x630 [ 20.720507] ret_from_fork+0x10/0x20 [ 20.720565] [ 20.720795] Allocated by task 259: [ 20.721127] kasan_save_stack+0x3c/0x68 [ 20.721174] kasan_save_track+0x20/0x40 [ 20.721215] kasan_save_alloc_info+0x40/0x58 [ 20.721254] __kasan_kmalloc+0xd4/0xd8 [ 20.721311] __kmalloc_cache_noprof+0x16c/0x3c0 [ 20.721367] kasan_strings+0xc8/0xb00 [ 20.721503] kunit_try_run_case+0x170/0x3f0 [ 20.721544] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.721641] kthread+0x328/0x630 [ 20.721808] ret_from_fork+0x10/0x20 [ 20.721895] [ 20.721941] Freed by task 259: [ 20.721969] kasan_save_stack+0x3c/0x68 [ 20.722008] kasan_save_track+0x20/0x40 [ 20.722067] kasan_save_free_info+0x4c/0x78 [ 20.722259] __kasan_slab_free+0x6c/0x98 [ 20.722305] kfree+0x214/0x3c8 [ 20.722668] kasan_strings+0x24c/0xb00 [ 20.723011] kunit_try_run_case+0x170/0x3f0 [ 20.723061] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.723108] kthread+0x328/0x630 [ 20.723433] ret_from_fork+0x10/0x20 [ 20.723622] [ 20.723648] The buggy address belongs to the object at fff00000c58ba040 [ 20.723648] which belongs to the cache kmalloc-32 of size 32 [ 20.723707] The buggy address is located 16 bytes inside of [ 20.723707] freed 32-byte region [fff00000c58ba040, fff00000c58ba060) [ 20.724046] [ 20.724079] The buggy address belongs to the physical page: [ 20.724192] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058ba [ 20.724249] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.724364] page_type: f5(slab) [ 20.724406] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 20.724515] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.724591] page dumped because: kasan: bad access detected [ 20.724655] [ 20.724676] Memory state around the buggy address: [ 20.725128] fff00000c58b9f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 20.725225] fff00000c58b9f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 20.725319] >fff00000c58ba000: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 20.725499] ^ [ 20.725558] fff00000c58ba080: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.725605] fff00000c58ba100: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 20.725645] ==================================================================
[ 16.877126] ================================================================== [ 16.877502] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 16.877669] Read of size 1 at addr ffff888103349910 by task kunit_try_catch/276 [ 16.878273] [ 16.878463] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.15.0-next-20250603 #1 PREEMPT(voluntary) [ 16.878525] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.878552] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 16.878579] Call Trace: [ 16.878604] <TASK> [ 16.878644] dump_stack_lvl+0x73/0xb0 [ 16.878676] print_report+0xd1/0x650 [ 16.878706] ? __virt_addr_valid+0x1db/0x2d0 [ 16.878803] ? strlen+0x8f/0xb0 [ 16.878837] ? kasan_complete_mode_report_info+0x64/0x200 [ 16.878868] ? strlen+0x8f/0xb0 [ 16.878889] kasan_report+0x141/0x180 [ 16.878928] ? strlen+0x8f/0xb0 [ 16.878955] __asan_report_load1_noabort+0x18/0x20 [ 16.878989] strlen+0x8f/0xb0 [ 16.879013] kasan_strings+0x57b/0xe80 [ 16.879035] ? trace_hardirqs_on+0x37/0xe0 [ 16.879079] ? __pfx_kasan_strings+0x10/0x10 [ 16.879104] ? finish_task_switch.isra.0+0x153/0x700 [ 16.879130] ? __switch_to+0x47/0xf50 [ 16.879159] ? __schedule+0x10cc/0x2b60 [ 16.879187] ? __pfx_read_tsc+0x10/0x10 [ 16.879229] ? ktime_get_ts64+0x86/0x230 [ 16.879259] kunit_try_run_case+0x1a5/0x480 [ 16.879286] ? __pfx_kunit_try_run_case+0x10/0x10 [ 16.879321] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 16.879359] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 16.879404] ? __kthread_parkme+0x82/0x180 [ 16.879428] ? preempt_count_sub+0x50/0x80 [ 16.879463] ? __pfx_kunit_try_run_case+0x10/0x10 [ 16.879491] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.879532] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 16.879559] kthread+0x337/0x6f0 [ 16.879595] ? trace_preempt_on+0x20/0xc0 [ 16.879623] ? __pfx_kthread+0x10/0x10 [ 16.879647] ? _raw_spin_unlock_irq+0x47/0x80 [ 16.879671] ? calculate_sigpending+0x7b/0xa0 [ 16.879698] ? __pfx_kthread+0x10/0x10 [ 16.879794] ret_from_fork+0x116/0x1d0 [ 16.879819] ? __pfx_kthread+0x10/0x10 [ 16.879843] ret_from_fork_asm+0x1a/0x30 [ 16.879878] </TASK> [ 16.879894] [ 16.888502] Allocated by task 276: [ 16.888740] kasan_save_stack+0x45/0x70 [ 16.888875] kasan_save_track+0x18/0x40 [ 16.888973] kasan_save_alloc_info+0x3b/0x50 [ 16.889584] __kasan_kmalloc+0xb7/0xc0 [ 16.889911] __kmalloc_cache_noprof+0x189/0x420 [ 16.891156] kasan_strings+0xc0/0xe80 [ 16.891474] kunit_try_run_case+0x1a5/0x480 [ 16.892020] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.892399] kthread+0x337/0x6f0 [ 16.892702] ret_from_fork+0x116/0x1d0 [ 16.893125] ret_from_fork_asm+0x1a/0x30 [ 16.893506] [ 16.893620] Freed by task 276: [ 16.894279] kasan_save_stack+0x45/0x70 [ 16.894491] kasan_save_track+0x18/0x40 [ 16.894649] kasan_save_free_info+0x3f/0x60 [ 16.895479] __kasan_slab_free+0x56/0x70 [ 16.895757] kfree+0x222/0x3f0 [ 16.896059] kasan_strings+0x2aa/0xe80 [ 16.896196] kunit_try_run_case+0x1a5/0x480 [ 16.896512] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.897008] kthread+0x337/0x6f0 [ 16.897178] ret_from_fork+0x116/0x1d0 [ 16.897494] ret_from_fork_asm+0x1a/0x30 [ 16.897919] [ 16.898043] The buggy address belongs to the object at ffff888103349900 [ 16.898043] which belongs to the cache kmalloc-32 of size 32 [ 16.898702] The buggy address is located 16 bytes inside of [ 16.898702] freed 32-byte region [ffff888103349900, ffff888103349920) [ 16.899879] [ 16.900034] The buggy address belongs to the physical page: [ 16.900209] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103349 [ 16.900400] flags: 0x200000000000000(node=0|zone=2) [ 16.901265] page_type: f5(slab) [ 16.901514] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 16.902258] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 16.902464] page dumped because: kasan: bad access detected [ 16.903004] [ 16.903180] Memory state around the buggy address: [ 16.903576] ffff888103349800: 00 00 00 04 fc fc fc fc fa fb fb fb fc fc fc fc [ 16.904567] ffff888103349880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 16.904766] >ffff888103349900: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 16.905129] ^ [ 16.905319] ffff888103349980: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 16.905659] ffff888103349a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 16.906137] ==================================================================