Date
June 3, 2025, 7:38 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 20.699341] ================================================================== [ 20.699550] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 20.699657] Read of size 1 at addr fff00000c58ba050 by task kunit_try_catch/259 [ 20.699710] [ 20.699746] CPU: 1 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.15.0-next-20250603 #1 PREEMPT [ 20.700019] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.700065] Hardware name: linux,dummy-virt (DT) [ 20.700483] Call trace: [ 20.700674] show_stack+0x20/0x38 (C) [ 20.700971] dump_stack_lvl+0x8c/0xd0 [ 20.701354] print_report+0x118/0x608 [ 20.701433] kasan_report+0xdc/0x128 [ 20.701481] __asan_report_load1_noabort+0x20/0x30 [ 20.701532] strcmp+0xc0/0xc8 [ 20.701577] kasan_strings+0x340/0xb00 [ 20.701624] kunit_try_run_case+0x170/0x3f0 [ 20.701685] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.701739] kthread+0x328/0x630 [ 20.701912] ret_from_fork+0x10/0x20 [ 20.701965] [ 20.701985] Allocated by task 259: [ 20.702015] kasan_save_stack+0x3c/0x68 [ 20.702867] kasan_save_track+0x20/0x40 [ 20.702924] kasan_save_alloc_info+0x40/0x58 [ 20.702970] __kasan_kmalloc+0xd4/0xd8 [ 20.703008] __kmalloc_cache_noprof+0x16c/0x3c0 [ 20.703158] kasan_strings+0xc8/0xb00 [ 20.703227] kunit_try_run_case+0x170/0x3f0 [ 20.703300] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.703348] kthread+0x328/0x630 [ 20.703437] ret_from_fork+0x10/0x20 [ 20.703966] [ 20.704069] Freed by task 259: [ 20.704375] kasan_save_stack+0x3c/0x68 [ 20.704435] kasan_save_track+0x20/0x40 [ 20.704475] kasan_save_free_info+0x4c/0x78 [ 20.704512] __kasan_slab_free+0x6c/0x98 [ 20.704578] kfree+0x214/0x3c8 [ 20.704613] kasan_strings+0x24c/0xb00 [ 20.704673] kunit_try_run_case+0x170/0x3f0 [ 20.704794] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.704967] kthread+0x328/0x630 [ 20.705197] ret_from_fork+0x10/0x20 [ 20.705240] [ 20.705718] The buggy address belongs to the object at fff00000c58ba040 [ 20.705718] which belongs to the cache kmalloc-32 of size 32 [ 20.705805] The buggy address is located 16 bytes inside of [ 20.705805] freed 32-byte region [fff00000c58ba040, fff00000c58ba060) [ 20.706132] [ 20.706169] The buggy address belongs to the physical page: [ 20.706210] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058ba [ 20.706331] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.706564] page_type: f5(slab) [ 20.706715] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 20.706768] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.707060] page dumped because: kasan: bad access detected [ 20.707149] [ 20.707176] Memory state around the buggy address: [ 20.707212] fff00000c58b9f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 20.707258] fff00000c58b9f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 20.707303] >fff00000c58ba000: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 20.707615] ^ [ 20.707762] fff00000c58ba080: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.707811] fff00000c58ba100: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 20.707852] ==================================================================
[ 16.816108] ================================================================== [ 16.817239] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 16.817432] Read of size 1 at addr ffff888103349910 by task kunit_try_catch/276 [ 16.817726] [ 16.817886] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.15.0-next-20250603 #1 PREEMPT(voluntary) [ 16.817948] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.817962] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 16.817988] Call Trace: [ 16.818007] <TASK> [ 16.818031] dump_stack_lvl+0x73/0xb0 [ 16.818061] print_report+0xd1/0x650 [ 16.818091] ? __virt_addr_valid+0x1db/0x2d0 [ 16.818120] ? strcmp+0xb0/0xc0 [ 16.818141] ? kasan_complete_mode_report_info+0x64/0x200 [ 16.818168] ? strcmp+0xb0/0xc0 [ 16.818188] kasan_report+0x141/0x180 [ 16.818212] ? strcmp+0xb0/0xc0 [ 16.818239] __asan_report_load1_noabort+0x18/0x20 [ 16.818353] strcmp+0xb0/0xc0 [ 16.818377] kasan_strings+0x431/0xe80 [ 16.818401] ? trace_hardirqs_on+0x37/0xe0 [ 16.818428] ? __pfx_kasan_strings+0x10/0x10 [ 16.818452] ? finish_task_switch.isra.0+0x153/0x700 [ 16.818494] ? __switch_to+0x47/0xf50 [ 16.818524] ? __schedule+0x10cc/0x2b60 [ 16.818551] ? __pfx_read_tsc+0x10/0x10 [ 16.818575] ? ktime_get_ts64+0x86/0x230 [ 16.818603] kunit_try_run_case+0x1a5/0x480 [ 16.818630] ? __pfx_kunit_try_run_case+0x10/0x10 [ 16.818651] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 16.818680] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 16.818706] ? __kthread_parkme+0x82/0x180 [ 16.818730] ? preempt_count_sub+0x50/0x80 [ 16.818755] ? __pfx_kunit_try_run_case+0x10/0x10 [ 16.818828] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.818859] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 16.818886] kthread+0x337/0x6f0 [ 16.818907] ? trace_preempt_on+0x20/0xc0 [ 16.818932] ? __pfx_kthread+0x10/0x10 [ 16.818954] ? _raw_spin_unlock_irq+0x47/0x80 [ 16.818979] ? calculate_sigpending+0x7b/0xa0 [ 16.819007] ? __pfx_kthread+0x10/0x10 [ 16.819031] ret_from_fork+0x116/0x1d0 [ 16.819052] ? __pfx_kthread+0x10/0x10 [ 16.819075] ret_from_fork_asm+0x1a/0x30 [ 16.819111] </TASK> [ 16.819124] [ 16.829859] Allocated by task 276: [ 16.830332] kasan_save_stack+0x45/0x70 [ 16.830651] kasan_save_track+0x18/0x40 [ 16.830767] kasan_save_alloc_info+0x3b/0x50 [ 16.831179] __kasan_kmalloc+0xb7/0xc0 [ 16.831374] __kmalloc_cache_noprof+0x189/0x420 [ 16.831516] kasan_strings+0xc0/0xe80 [ 16.831881] kunit_try_run_case+0x1a5/0x480 [ 16.833013] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.833265] kthread+0x337/0x6f0 [ 16.833508] ret_from_fork+0x116/0x1d0 [ 16.833819] ret_from_fork_asm+0x1a/0x30 [ 16.834488] [ 16.834802] Freed by task 276: [ 16.835228] kasan_save_stack+0x45/0x70 [ 16.835487] kasan_save_track+0x18/0x40 [ 16.835603] kasan_save_free_info+0x3f/0x60 [ 16.835739] __kasan_slab_free+0x56/0x70 [ 16.836027] kfree+0x222/0x3f0 [ 16.836260] kasan_strings+0x2aa/0xe80 [ 16.836497] kunit_try_run_case+0x1a5/0x480 [ 16.836712] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.836974] kthread+0x337/0x6f0 [ 16.837153] ret_from_fork+0x116/0x1d0 [ 16.837347] ret_from_fork_asm+0x1a/0x30 [ 16.837574] [ 16.837641] The buggy address belongs to the object at ffff888103349900 [ 16.837641] which belongs to the cache kmalloc-32 of size 32 [ 16.837902] The buggy address is located 16 bytes inside of [ 16.837902] freed 32-byte region [ffff888103349900, ffff888103349920) [ 16.838407] [ 16.838561] The buggy address belongs to the physical page: [ 16.839039] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103349 [ 16.839579] flags: 0x200000000000000(node=0|zone=2) [ 16.840992] page_type: f5(slab) [ 16.841330] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 16.841811] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 16.842351] page dumped because: kasan: bad access detected [ 16.842558] [ 16.842705] Memory state around the buggy address: [ 16.842962] ffff888103349800: 00 00 00 04 fc fc fc fc fa fb fb fb fc fc fc fc [ 16.843225] ffff888103349880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 16.843426] >ffff888103349900: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 16.843893] ^ [ 16.844372] ffff888103349980: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 16.844779] ffff888103349a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 16.845379] ==================================================================