Date
July 10, 2025, 11:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 16.105249] ================================================================== [ 16.105337] BUG: KASAN: double-free in kfree_sensitive+0x3c/0xb0 [ 16.105395] Free of addr fff00000c5ff7a40 by task kunit_try_catch/192 [ 16.105439] [ 16.105479] CPU: 1 UID: 0 PID: 192 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 16.105564] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.105589] Hardware name: linux,dummy-virt (DT) [ 16.105620] Call trace: [ 16.105643] show_stack+0x20/0x38 (C) [ 16.105692] dump_stack_lvl+0x8c/0xd0 [ 16.105743] print_report+0x118/0x608 [ 16.105801] kasan_report_invalid_free+0xc0/0xe8 [ 16.105855] check_slab_allocation+0xd4/0x108 [ 16.105903] __kasan_slab_pre_free+0x2c/0x48 [ 16.105949] kfree+0xe8/0x3c8 [ 16.105993] kfree_sensitive+0x3c/0xb0 [ 16.106039] kmalloc_double_kzfree+0x168/0x308 [ 16.106096] kunit_try_run_case+0x170/0x3f0 [ 16.106143] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.106198] kthread+0x328/0x630 [ 16.106239] ret_from_fork+0x10/0x20 [ 16.106288] [ 16.106306] Allocated by task 192: [ 16.106333] kasan_save_stack+0x3c/0x68 [ 16.106375] kasan_save_track+0x20/0x40 [ 16.106415] kasan_save_alloc_info+0x40/0x58 [ 16.106459] __kasan_kmalloc+0xd4/0xd8 [ 16.106496] __kmalloc_cache_noprof+0x16c/0x3c0 [ 16.106536] kmalloc_double_kzfree+0xb8/0x308 [ 16.106576] kunit_try_run_case+0x170/0x3f0 [ 16.106614] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.106660] kthread+0x328/0x630 [ 16.106693] ret_from_fork+0x10/0x20 [ 16.106729] [ 16.106746] Freed by task 192: [ 16.106770] kasan_save_stack+0x3c/0x68 [ 16.106808] kasan_save_track+0x20/0x40 [ 16.106848] kasan_save_free_info+0x4c/0x78 [ 16.106888] __kasan_slab_free+0x6c/0x98 [ 16.106926] kfree+0x214/0x3c8 [ 16.106958] kfree_sensitive+0x80/0xb0 [ 16.106994] kmalloc_double_kzfree+0x11c/0x308 [ 16.107034] kunit_try_run_case+0x170/0x3f0 [ 16.107070] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.108103] kthread+0x328/0x630 [ 16.108148] ret_from_fork+0x10/0x20 [ 16.108281] [ 16.108352] The buggy address belongs to the object at fff00000c5ff7a40 [ 16.108352] which belongs to the cache kmalloc-16 of size 16 [ 16.108495] The buggy address is located 0 bytes inside of [ 16.108495] 16-byte region [fff00000c5ff7a40, fff00000c5ff7a50) [ 16.108762] [ 16.108790] The buggy address belongs to the physical page: [ 16.108880] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105ff7 [ 16.108944] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 16.108995] page_type: f5(slab) [ 16.109035] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 16.109094] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 16.109136] page dumped because: kasan: bad access detected [ 16.109177] [ 16.109194] Memory state around the buggy address: [ 16.109227] fff00000c5ff7900: fa fb fc fc fa fb fc fc fa fb fc fc 00 04 fc fc [ 16.109606] fff00000c5ff7980: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 16.109682] >fff00000c5ff7a00: fa fb fc fc fa fb fc fc fa fb fc fc fc fc fc fc [ 16.109782] ^ [ 16.109855] fff00000c5ff7a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.109941] fff00000c5ff7b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.109982] ==================================================================
[ 13.056483] ================================================================== [ 13.056849] BUG: KASAN: double-free in kfree_sensitive+0x2e/0x90 [ 13.057156] Free of addr ffff888102749dc0 by task kunit_try_catch/209 [ 13.057582] [ 13.057684] CPU: 0 UID: 0 PID: 209 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 13.057728] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.057739] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.057758] Call Trace: [ 13.057770] <TASK> [ 13.057787] dump_stack_lvl+0x73/0xb0 [ 13.057816] print_report+0xd1/0x650 [ 13.057838] ? __virt_addr_valid+0x1db/0x2d0 [ 13.057862] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.057884] ? kfree_sensitive+0x2e/0x90 [ 13.057905] kasan_report_invalid_free+0x10a/0x130 [ 13.057929] ? kfree_sensitive+0x2e/0x90 [ 13.057951] ? kfree_sensitive+0x2e/0x90 [ 13.057970] check_slab_allocation+0x101/0x130 [ 13.058017] __kasan_slab_pre_free+0x28/0x40 [ 13.058045] kfree+0xf0/0x3f0 [ 13.058067] ? kfree_sensitive+0x2e/0x90 [ 13.058101] kfree_sensitive+0x2e/0x90 [ 13.058127] kmalloc_double_kzfree+0x19c/0x350 [ 13.058159] ? __pfx_kmalloc_double_kzfree+0x10/0x10 [ 13.058191] ? __schedule+0x10cc/0x2b60 [ 13.058220] ? __pfx_read_tsc+0x10/0x10 [ 13.058246] ? ktime_get_ts64+0x86/0x230 [ 13.058280] kunit_try_run_case+0x1a5/0x480 [ 13.058314] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.058373] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.058397] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.058436] ? __kthread_parkme+0x82/0x180 [ 13.058457] ? preempt_count_sub+0x50/0x80 [ 13.058481] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.058505] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.058529] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.058554] kthread+0x337/0x6f0 [ 13.058572] ? trace_preempt_on+0x20/0xc0 [ 13.058595] ? __pfx_kthread+0x10/0x10 [ 13.058615] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.058637] ? calculate_sigpending+0x7b/0xa0 [ 13.058660] ? __pfx_kthread+0x10/0x10 [ 13.058681] ret_from_fork+0x116/0x1d0 [ 13.058699] ? __pfx_kthread+0x10/0x10 [ 13.058719] ret_from_fork_asm+0x1a/0x30 [ 13.058749] </TASK> [ 13.058760] [ 13.067135] Allocated by task 209: [ 13.067499] kasan_save_stack+0x45/0x70 [ 13.067853] kasan_save_track+0x18/0x40 [ 13.068052] kasan_save_alloc_info+0x3b/0x50 [ 13.068274] __kasan_kmalloc+0xb7/0xc0 [ 13.068521] __kmalloc_cache_noprof+0x189/0x420 [ 13.068823] kmalloc_double_kzfree+0xa9/0x350 [ 13.069017] kunit_try_run_case+0x1a5/0x480 [ 13.069240] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.069728] kthread+0x337/0x6f0 [ 13.069980] ret_from_fork+0x116/0x1d0 [ 13.070195] ret_from_fork_asm+0x1a/0x30 [ 13.070333] [ 13.070418] Freed by task 209: [ 13.070627] kasan_save_stack+0x45/0x70 [ 13.070872] kasan_save_track+0x18/0x40 [ 13.071081] kasan_save_free_info+0x3f/0x60 [ 13.071388] __kasan_slab_free+0x56/0x70 [ 13.071561] kfree+0x222/0x3f0 [ 13.071682] kfree_sensitive+0x67/0x90 [ 13.071821] kmalloc_double_kzfree+0x12b/0x350 [ 13.071974] kunit_try_run_case+0x1a5/0x480 [ 13.072120] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.072628] kthread+0x337/0x6f0 [ 13.072916] ret_from_fork+0x116/0x1d0 [ 13.073199] ret_from_fork_asm+0x1a/0x30 [ 13.073435] [ 13.073530] The buggy address belongs to the object at ffff888102749dc0 [ 13.073530] which belongs to the cache kmalloc-16 of size 16 [ 13.074164] The buggy address is located 0 bytes inside of [ 13.074164] 16-byte region [ffff888102749dc0, ffff888102749dd0) [ 13.074518] [ 13.074590] The buggy address belongs to the physical page: [ 13.074758] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102749 [ 13.075501] flags: 0x200000000000000(node=0|zone=2) [ 13.076008] page_type: f5(slab) [ 13.076256] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 13.076608] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 13.076835] page dumped because: kasan: bad access detected [ 13.077007] [ 13.077181] Memory state around the buggy address: [ 13.077597] ffff888102749c80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 13.078310] ffff888102749d00: 00 05 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 13.078798] >ffff888102749d80: fa fb fc fc fa fb fc fc fa fb fc fc fc fc fc fc [ 13.079082] ^ [ 13.079436] ffff888102749e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.079651] ffff888102749e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.079860] ==================================================================