Date
July 4, 2025, 11:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.275646] ================================================================== [ 18.275728] BUG: KASAN: double-free in kfree_sensitive+0x3c/0xb0 [ 18.275779] Free of addr fff00000c6173820 by task kunit_try_catch/192 [ 18.275832] [ 18.275863] CPU: 0 UID: 0 PID: 192 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 18.275952] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.275978] Hardware name: linux,dummy-virt (DT) [ 18.276009] Call trace: [ 18.276030] show_stack+0x20/0x38 (C) [ 18.276082] dump_stack_lvl+0x8c/0xd0 [ 18.276135] print_report+0x118/0x608 [ 18.276229] kasan_report_invalid_free+0xc0/0xe8 [ 18.276342] check_slab_allocation+0xd4/0x108 [ 18.276391] __kasan_slab_pre_free+0x2c/0x48 [ 18.276438] kfree+0xe8/0x3c8 [ 18.276483] kfree_sensitive+0x3c/0xb0 [ 18.276807] kmalloc_double_kzfree+0x168/0x308 [ 18.276863] kunit_try_run_case+0x170/0x3f0 [ 18.278184] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.278272] kthread+0x328/0x630 [ 18.278322] ret_from_fork+0x10/0x20 [ 18.278369] [ 18.278429] Allocated by task 192: [ 18.278595] kasan_save_stack+0x3c/0x68 [ 18.278636] kasan_save_track+0x20/0x40 [ 18.278674] kasan_save_alloc_info+0x40/0x58 [ 18.278715] __kasan_kmalloc+0xd4/0xd8 [ 18.278750] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.278789] kmalloc_double_kzfree+0xb8/0x308 [ 18.278838] kunit_try_run_case+0x170/0x3f0 [ 18.278886] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.279240] kthread+0x328/0x630 [ 18.279351] ret_from_fork+0x10/0x20 [ 18.279548] [ 18.279641] Freed by task 192: [ 18.279758] kasan_save_stack+0x3c/0x68 [ 18.279827] kasan_save_track+0x20/0x40 [ 18.279867] kasan_save_free_info+0x4c/0x78 [ 18.279916] __kasan_slab_free+0x6c/0x98 [ 18.279954] kfree+0x214/0x3c8 [ 18.279993] kfree_sensitive+0x80/0xb0 [ 18.280068] kmalloc_double_kzfree+0x11c/0x308 [ 18.280107] kunit_try_run_case+0x170/0x3f0 [ 18.280289] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.280357] kthread+0x328/0x630 [ 18.280500] ret_from_fork+0x10/0x20 [ 18.280641] [ 18.280677] The buggy address belongs to the object at fff00000c6173820 [ 18.280677] which belongs to the cache kmalloc-16 of size 16 [ 18.280763] The buggy address is located 0 bytes inside of [ 18.280763] 16-byte region [fff00000c6173820, fff00000c6173830) [ 18.280846] [ 18.280895] The buggy address belongs to the physical page: [ 18.281519] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106173 [ 18.281572] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.281618] page_type: f5(slab) [ 18.281653] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 18.281701] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 18.281740] page dumped because: kasan: bad access detected [ 18.281771] [ 18.281789] Memory state around the buggy address: [ 18.282315] fff00000c6173700: fa fb fc fc fa fb fc fc 00 04 fc fc fa fb fc fc [ 18.282361] fff00000c6173780: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 18.282404] >fff00000c6173800: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 18.282442] ^ [ 18.282477] fff00000c6173880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.282518] fff00000c6173900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.282555] ==================================================================
[ 12.343961] ================================================================== [ 12.344461] BUG: KASAN: double-free in kfree_sensitive+0x2e/0x90 [ 12.344750] Free of addr ffff88810298e100 by task kunit_try_catch/209 [ 12.345021] [ 12.345131] CPU: 1 UID: 0 PID: 209 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 12.345179] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.345190] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.345212] Call Trace: [ 12.345244] <TASK> [ 12.345265] dump_stack_lvl+0x73/0xb0 [ 12.345296] print_report+0xd1/0x650 [ 12.345321] ? __virt_addr_valid+0x1db/0x2d0 [ 12.345347] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.345367] ? kfree_sensitive+0x2e/0x90 [ 12.345389] kasan_report_invalid_free+0x10a/0x130 [ 12.345412] ? kfree_sensitive+0x2e/0x90 [ 12.345433] ? kfree_sensitive+0x2e/0x90 [ 12.345451] check_slab_allocation+0x101/0x130 [ 12.345472] __kasan_slab_pre_free+0x28/0x40 [ 12.345492] kfree+0xf0/0x3f0 [ 12.345513] ? kfree_sensitive+0x2e/0x90 [ 12.345536] kfree_sensitive+0x2e/0x90 [ 12.345554] kmalloc_double_kzfree+0x19c/0x350 [ 12.345578] ? __pfx_kmalloc_double_kzfree+0x10/0x10 [ 12.345603] ? __pfx_kmalloc_double_kzfree+0x10/0x10 [ 12.345628] kunit_try_run_case+0x1a5/0x480 [ 12.345652] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.345672] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.345695] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.345716] ? __kthread_parkme+0x82/0x180 [ 12.345736] ? preempt_count_sub+0x50/0x80 [ 12.345758] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.345780] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.345802] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.345823] kthread+0x337/0x6f0 [ 12.345842] ? trace_preempt_on+0x20/0xc0 [ 12.345864] ? __pfx_kthread+0x10/0x10 [ 12.345883] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.345902] ? calculate_sigpending+0x7b/0xa0 [ 12.345924] ? __pfx_kthread+0x10/0x10 [ 12.345944] ret_from_fork+0x116/0x1d0 [ 12.345962] ? __pfx_kthread+0x10/0x10 [ 12.345981] ret_from_fork_asm+0x1a/0x30 [ 12.346012] </TASK> [ 12.346023] [ 12.358106] Allocated by task 209: [ 12.358624] kasan_save_stack+0x45/0x70 [ 12.358990] kasan_save_track+0x18/0x40 [ 12.359457] kasan_save_alloc_info+0x3b/0x50 [ 12.359818] __kasan_kmalloc+0xb7/0xc0 [ 12.360002] __kmalloc_cache_noprof+0x189/0x420 [ 12.360437] kmalloc_double_kzfree+0xa9/0x350 [ 12.360865] kunit_try_run_case+0x1a5/0x480 [ 12.361132] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.362038] kthread+0x337/0x6f0 [ 12.362347] ret_from_fork+0x116/0x1d0 [ 12.362838] ret_from_fork_asm+0x1a/0x30 [ 12.363169] [ 12.363415] Freed by task 209: [ 12.363692] kasan_save_stack+0x45/0x70 [ 12.363885] kasan_save_track+0x18/0x40 [ 12.364061] kasan_save_free_info+0x3f/0x60 [ 12.364505] __kasan_slab_free+0x56/0x70 [ 12.364869] kfree+0x222/0x3f0 [ 12.365028] kfree_sensitive+0x67/0x90 [ 12.365415] kmalloc_double_kzfree+0x12b/0x350 [ 12.365636] kunit_try_run_case+0x1a5/0x480 [ 12.365828] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.366060] kthread+0x337/0x6f0 [ 12.366472] ret_from_fork+0x116/0x1d0 [ 12.366770] ret_from_fork_asm+0x1a/0x30 [ 12.367190] [ 12.367711] The buggy address belongs to the object at ffff88810298e100 [ 12.367711] which belongs to the cache kmalloc-16 of size 16 [ 12.368506] The buggy address is located 0 bytes inside of [ 12.368506] 16-byte region [ffff88810298e100, ffff88810298e110) [ 12.369051] [ 12.369149] The buggy address belongs to the physical page: [ 12.369710] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10298e [ 12.370056] flags: 0x200000000000000(node=0|zone=2) [ 12.370649] page_type: f5(slab) [ 12.371029] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 12.371756] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 12.372070] page dumped because: kasan: bad access detected [ 12.372849] [ 12.373113] Memory state around the buggy address: [ 12.373464] ffff88810298e000: 00 01 fc fc 00 01 fc fc 00 04 fc fc 00 04 fc fc [ 12.373758] ffff88810298e080: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 12.374040] >ffff88810298e100: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.374647] ^ [ 12.375107] ffff88810298e180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.375958] ffff88810298e200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.376682] ==================================================================