Date
July 20, 2025, 8:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.363699] ================================================================== [ 15.363910] BUG: KASAN: slab-use-after-free in kmalloc_double_kzfree+0x168/0x308 [ 15.364126] Read of size 1 at addr fff00000c6086780 by task kunit_try_catch/193 [ 15.364204] [ 15.364316] CPU: 1 UID: 0 PID: 193 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 15.364440] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.364476] Hardware name: linux,dummy-virt (DT) [ 15.364508] Call trace: [ 15.364536] show_stack+0x20/0x38 (C) [ 15.364896] dump_stack_lvl+0x8c/0xd0 [ 15.365201] print_report+0x118/0x5d0 [ 15.365290] kasan_report+0xdc/0x128 [ 15.365485] __kasan_check_byte+0x54/0x70 [ 15.365640] kfree_sensitive+0x30/0xb0 [ 15.365723] kmalloc_double_kzfree+0x168/0x308 [ 15.365849] kunit_try_run_case+0x170/0x3f0 [ 15.365946] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.366230] kthread+0x328/0x630 [ 15.366454] ret_from_fork+0x10/0x20 [ 15.366656] [ 15.366724] Allocated by task 193: [ 15.366835] kasan_save_stack+0x3c/0x68 [ 15.366924] kasan_save_track+0x20/0x40 [ 15.366995] kasan_save_alloc_info+0x40/0x58 [ 15.367096] __kasan_kmalloc+0xd4/0xd8 [ 15.367135] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.367382] kmalloc_double_kzfree+0xb8/0x308 [ 15.367523] kunit_try_run_case+0x170/0x3f0 [ 15.367624] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.367710] kthread+0x328/0x630 [ 15.367988] ret_from_fork+0x10/0x20 [ 15.368061] [ 15.368439] Freed by task 193: [ 15.368531] kasan_save_stack+0x3c/0x68 [ 15.368639] kasan_save_track+0x20/0x40 [ 15.368722] kasan_save_free_info+0x4c/0x78 [ 15.368847] __kasan_slab_free+0x6c/0x98 [ 15.368985] kfree+0x214/0x3c8 [ 15.369114] kfree_sensitive+0x80/0xb0 [ 15.369173] kmalloc_double_kzfree+0x11c/0x308 [ 15.369399] kunit_try_run_case+0x170/0x3f0 [ 15.369553] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.369780] kthread+0x328/0x630 [ 15.369838] ret_from_fork+0x10/0x20 [ 15.369988] [ 15.370030] The buggy address belongs to the object at fff00000c6086780 [ 15.370030] which belongs to the cache kmalloc-16 of size 16 [ 15.370109] The buggy address is located 0 bytes inside of [ 15.370109] freed 16-byte region [fff00000c6086780, fff00000c6086790) [ 15.370176] [ 15.370258] The buggy address belongs to the physical page: [ 15.370302] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106086 [ 15.370364] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 15.370422] page_type: f5(slab) [ 15.370464] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 15.370514] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 15.370563] page dumped because: kasan: bad access detected [ 15.370595] [ 15.370613] Memory state around the buggy address: [ 15.370647] fff00000c6086680: 00 00 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 15.370690] fff00000c6086700: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 15.370733] >fff00000c6086780: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.370786] ^ [ 15.370813] fff00000c6086800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.370855] fff00000c6086880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.370893] ==================================================================
[ 13.285781] ================================================================== [ 13.287343] BUG: KASAN: slab-use-after-free in kmalloc_double_kzfree+0x19c/0x350 [ 13.288036] Read of size 1 at addr ffff888102641a80 by task kunit_try_catch/210 [ 13.288292] [ 13.288402] CPU: 1 UID: 0 PID: 210 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 13.288449] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.288460] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.288492] Call Trace: [ 13.288503] <TASK> [ 13.288519] dump_stack_lvl+0x73/0xb0 [ 13.288551] print_report+0xd1/0x610 [ 13.288574] ? __virt_addr_valid+0x1db/0x2d0 [ 13.288598] ? kmalloc_double_kzfree+0x19c/0x350 [ 13.288632] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.288654] ? kmalloc_double_kzfree+0x19c/0x350 [ 13.288677] kasan_report+0x141/0x180 [ 13.288710] ? kmalloc_double_kzfree+0x19c/0x350 [ 13.288736] ? kmalloc_double_kzfree+0x19c/0x350 [ 13.288759] __kasan_check_byte+0x3d/0x50 [ 13.288781] kfree_sensitive+0x22/0x90 [ 13.288805] kmalloc_double_kzfree+0x19c/0x350 [ 13.288828] ? __pfx_kmalloc_double_kzfree+0x10/0x10 [ 13.288852] ? __schedule+0x10c6/0x2b60 [ 13.288875] ? __pfx_read_tsc+0x10/0x10 [ 13.288897] ? ktime_get_ts64+0x86/0x230 [ 13.288922] kunit_try_run_case+0x1a5/0x480 [ 13.288947] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.288970] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.288994] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.289017] ? __kthread_parkme+0x82/0x180 [ 13.289048] ? preempt_count_sub+0x50/0x80 [ 13.289074] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.289098] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.289121] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.289144] kthread+0x337/0x6f0 [ 13.289164] ? trace_preempt_on+0x20/0xc0 [ 13.289187] ? __pfx_kthread+0x10/0x10 [ 13.289207] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.289229] ? calculate_sigpending+0x7b/0xa0 [ 13.289253] ? __pfx_kthread+0x10/0x10 [ 13.289274] ret_from_fork+0x116/0x1d0 [ 13.289293] ? __pfx_kthread+0x10/0x10 [ 13.289313] ret_from_fork_asm+0x1a/0x30 [ 13.289343] </TASK> [ 13.289353] [ 13.304114] Allocated by task 210: [ 13.304586] kasan_save_stack+0x45/0x70 [ 13.304805] kasan_save_track+0x18/0x40 [ 13.305238] kasan_save_alloc_info+0x3b/0x50 [ 13.305524] __kasan_kmalloc+0xb7/0xc0 [ 13.305668] __kmalloc_cache_noprof+0x189/0x420 [ 13.305862] kmalloc_double_kzfree+0xa9/0x350 [ 13.306438] kunit_try_run_case+0x1a5/0x480 [ 13.306888] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.307493] kthread+0x337/0x6f0 [ 13.307824] ret_from_fork+0x116/0x1d0 [ 13.308282] ret_from_fork_asm+0x1a/0x30 [ 13.308590] [ 13.308667] Freed by task 210: [ 13.308793] kasan_save_stack+0x45/0x70 [ 13.309229] kasan_save_track+0x18/0x40 [ 13.309633] kasan_save_free_info+0x3f/0x60 [ 13.310256] __kasan_slab_free+0x56/0x70 [ 13.310619] kfree+0x222/0x3f0 [ 13.310746] kfree_sensitive+0x67/0x90 [ 13.311206] kmalloc_double_kzfree+0x12b/0x350 [ 13.311654] kunit_try_run_case+0x1a5/0x480 [ 13.312096] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.312499] kthread+0x337/0x6f0 [ 13.312712] ret_from_fork+0x116/0x1d0 [ 13.313163] ret_from_fork_asm+0x1a/0x30 [ 13.313319] [ 13.313510] The buggy address belongs to the object at ffff888102641a80 [ 13.313510] which belongs to the cache kmalloc-16 of size 16 [ 13.314542] The buggy address is located 0 bytes inside of [ 13.314542] freed 16-byte region [ffff888102641a80, ffff888102641a90) [ 13.315507] [ 13.315682] The buggy address belongs to the physical page: [ 13.316378] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102641 [ 13.317283] flags: 0x200000000000000(node=0|zone=2) [ 13.317465] page_type: f5(slab) [ 13.317607] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 13.318000] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 13.318868] page dumped because: kasan: bad access detected [ 13.319538] [ 13.319703] Memory state around the buggy address: [ 13.320272] ffff888102641980: fa fb fc fc 00 02 fc fc 00 05 fc fc 00 02 fc fc [ 13.320942] ffff888102641a00: 00 02 fc fc 00 02 fc fc 00 02 fc fc fa fb fc fc [ 13.321533] >ffff888102641a80: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.322354] ^ [ 13.322587] ffff888102641b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.322831] ffff888102641b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.323625] ==================================================================