Date
July 10, 2025, 9:07 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 29.665584] ================================================================== [ 29.665669] BUG: KASAN: double-free in kfree_sensitive+0x3c/0xb0 [ 29.665720] Free of addr fff00000c8686b20 by task kunit_try_catch/223 [ 29.665762] [ 29.665792] CPU: 0 UID: 0 PID: 223 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5-next-20250710 #1 PREEMPT [ 29.665881] Tainted: [B]=BAD_PAGE, [N]=TEST [ 29.666708] Hardware name: linux,dummy-virt (DT) [ 29.667083] Call trace: [ 29.667110] show_stack+0x20/0x38 (C) [ 29.667481] dump_stack_lvl+0x8c/0xd0 [ 29.667889] print_report+0x118/0x5d0 [ 29.667979] kasan_report_invalid_free+0xc0/0xe8 [ 29.668027] check_slab_allocation+0xd4/0x108 [ 29.668569] __kasan_slab_pre_free+0x2c/0x48 [ 29.668871] kfree+0xe8/0x3c8 [ 29.668923] kfree_sensitive+0x3c/0xb0 [ 29.669142] kmalloc_double_kzfree+0x168/0x308 [ 29.669225] kunit_try_run_case+0x170/0x3f0 [ 29.669272] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.669327] kthread+0x328/0x630 [ 29.669369] ret_from_fork+0x10/0x20 [ 29.670350] [ 29.670765] Allocated by task 223: [ 29.670801] kasan_save_stack+0x3c/0x68 [ 29.670849] kasan_save_track+0x20/0x40 [ 29.670889] kasan_save_alloc_info+0x40/0x58 [ 29.670996] __kasan_kmalloc+0xd4/0xd8 [ 29.671160] __kmalloc_cache_noprof+0x16c/0x3c0 [ 29.671201] kmalloc_double_kzfree+0xb8/0x308 [ 29.671515] kunit_try_run_case+0x170/0x3f0 [ 29.671568] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.672046] kthread+0x328/0x630 [ 29.672083] ret_from_fork+0x10/0x20 [ 29.672353] [ 29.672375] Freed by task 223: [ 29.672790] kasan_save_stack+0x3c/0x68 [ 29.673091] kasan_save_track+0x20/0x40 [ 29.673225] kasan_save_free_info+0x4c/0x78 [ 29.673552] __kasan_slab_free+0x6c/0x98 [ 29.673598] kfree+0x214/0x3c8 [ 29.673631] kfree_sensitive+0x80/0xb0 [ 29.673669] kmalloc_double_kzfree+0x11c/0x308 [ 29.673712] kunit_try_run_case+0x170/0x3f0 [ 29.673796] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 29.673845] kthread+0x328/0x630 [ 29.673877] ret_from_fork+0x10/0x20 [ 29.674047] [ 29.674070] The buggy address belongs to the object at fff00000c8686b20 [ 29.674070] which belongs to the cache kmalloc-16 of size 16 [ 29.674224] The buggy address is located 0 bytes inside of [ 29.674224] 16-byte region [fff00000c8686b20, fff00000c8686b30) [ 29.674314] [ 29.674335] The buggy address belongs to the physical page: [ 29.674577] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xfff00000c8686a40 pfn:0x108686 [ 29.674834] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 29.675182] page_type: f5(slab) [ 29.675354] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 29.675422] raw: fff00000c8686a40 000000008080007f 00000000f5000000 0000000000000000 [ 29.675464] page dumped because: kasan: bad access detected [ 29.675497] [ 29.675707] Memory state around the buggy address: [ 29.675994] fff00000c8686a00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 29.676043] fff00000c8686a80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 29.676143] >fff00000c8686b00: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 29.676184] ^ [ 29.676264] fff00000c8686b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.676509] fff00000c8686c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.676551] ==================================================================
[ 25.415885] ================================================================== [ 25.416248] BUG: KASAN: double-free in kfree_sensitive+0x2e/0x90 [ 25.416530] Free of addr ffff888103cd6780 by task kunit_try_catch/240 [ 25.416964] [ 25.417072] CPU: 1 UID: 0 PID: 240 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5-next-20250710 #1 PREEMPT(voluntary) [ 25.417121] Tainted: [B]=BAD_PAGE, [N]=TEST [ 25.417132] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 25.417153] Call Trace: [ 25.417165] <TASK> [ 25.417182] dump_stack_lvl+0x73/0xb0 [ 25.417210] print_report+0xd1/0x610 [ 25.417233] ? __virt_addr_valid+0x1db/0x2d0 [ 25.417257] ? kasan_complete_mode_report_info+0x64/0x200 [ 25.417281] ? kfree_sensitive+0x2e/0x90 [ 25.417306] kasan_report_invalid_free+0x10a/0x130 [ 25.417329] ? kfree_sensitive+0x2e/0x90 [ 25.417354] ? kfree_sensitive+0x2e/0x90 [ 25.417376] check_slab_allocation+0x101/0x130 [ 25.417397] __kasan_slab_pre_free+0x28/0x40 [ 25.417417] kfree+0xf0/0x3f0 [ 25.417438] ? kfree_sensitive+0x2e/0x90 [ 25.417463] kfree_sensitive+0x2e/0x90 [ 25.417486] kmalloc_double_kzfree+0x19c/0x350 [ 25.417518] ? __pfx_kmalloc_double_kzfree+0x10/0x10 [ 25.417541] ? __schedule+0x10cc/0x2b60 [ 25.417563] ? __pfx_read_tsc+0x10/0x10 [ 25.417584] ? ktime_get_ts64+0x86/0x230 [ 25.417608] kunit_try_run_case+0x1a5/0x480 [ 25.417629] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.417649] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 25.417671] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 25.417693] ? __kthread_parkme+0x82/0x180 [ 25.417729] ? preempt_count_sub+0x50/0x80 [ 25.417752] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.417773] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.418006] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 25.418031] kthread+0x337/0x6f0 [ 25.418051] ? trace_preempt_on+0x20/0xc0 [ 25.418073] ? __pfx_kthread+0x10/0x10 [ 25.418093] ? _raw_spin_unlock_irq+0x47/0x80 [ 25.418115] ? calculate_sigpending+0x7b/0xa0 [ 25.418138] ? __pfx_kthread+0x10/0x10 [ 25.418159] ret_from_fork+0x116/0x1d0 [ 25.418178] ? __pfx_kthread+0x10/0x10 [ 25.418198] ret_from_fork_asm+0x1a/0x30 [ 25.418228] </TASK> [ 25.418240] [ 25.426966] Allocated by task 240: [ 25.427153] kasan_save_stack+0x45/0x70 [ 25.427344] kasan_save_track+0x18/0x40 [ 25.427672] kasan_save_alloc_info+0x3b/0x50 [ 25.428001] __kasan_kmalloc+0xb7/0xc0 [ 25.428288] __kmalloc_cache_noprof+0x189/0x420 [ 25.428630] kmalloc_double_kzfree+0xa9/0x350 [ 25.428941] kunit_try_run_case+0x1a5/0x480 [ 25.429150] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.429386] kthread+0x337/0x6f0 [ 25.429821] ret_from_fork+0x116/0x1d0 [ 25.430043] ret_from_fork_asm+0x1a/0x30 [ 25.430339] [ 25.430573] Freed by task 240: [ 25.430847] kasan_save_stack+0x45/0x70 [ 25.431041] kasan_save_track+0x18/0x40 [ 25.431218] kasan_save_free_info+0x3f/0x60 [ 25.431405] __kasan_slab_free+0x56/0x70 [ 25.431948] kfree+0x222/0x3f0 [ 25.432210] kfree_sensitive+0x67/0x90 [ 25.432465] kmalloc_double_kzfree+0x12b/0x350 [ 25.432798] kunit_try_run_case+0x1a5/0x480 [ 25.433196] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.433441] kthread+0x337/0x6f0 [ 25.433758] ret_from_fork+0x116/0x1d0 [ 25.434062] ret_from_fork_asm+0x1a/0x30 [ 25.434251] [ 25.434337] The buggy address belongs to the object at ffff888103cd6780 [ 25.434337] which belongs to the cache kmalloc-16 of size 16 [ 25.435241] The buggy address is located 0 bytes inside of [ 25.435241] 16-byte region [ffff888103cd6780, ffff888103cd6790) [ 25.436312] [ 25.436594] The buggy address belongs to the physical page: [ 25.436853] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103cd6 [ 25.437186] flags: 0x200000000000000(node=0|zone=2) [ 25.437397] page_type: f5(slab) [ 25.437900] raw: 0200000000000000 ffff888100041640 dead000000000100 dead000000000122 [ 25.438323] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 25.438808] page dumped because: kasan: bad access detected [ 25.439156] [ 25.439383] Memory state around the buggy address: [ 25.439809] ffff888103cd6680: fa fb fc fc 00 06 fc fc 00 06 fc fc 00 06 fc fc [ 25.440115] ffff888103cd6700: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 25.440392] >ffff888103cd6780: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.441027] ^ [ 25.441311] ffff888103cd6800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.441918] ffff888103cd6880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.442407] ==================================================================