Date
July 8, 2025, 11:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 31.342184] ================================================================== [ 31.342299] BUG: KASAN: double-free in kfree_sensitive+0x3c/0xb0 [ 31.342356] Free of addr fff00000c79816c0 by task kunit_try_catch/223 [ 31.342398] [ 31.342436] CPU: 0 UID: 0 PID: 223 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5-next-20250708 #1 PREEMPT [ 31.342523] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.342551] Hardware name: linux,dummy-virt (DT) [ 31.342584] Call trace: [ 31.342610] show_stack+0x20/0x38 (C) [ 31.342659] dump_stack_lvl+0x8c/0xd0 [ 31.342753] print_report+0x118/0x5d0 [ 31.342814] kasan_report_invalid_free+0xc0/0xe8 [ 31.342875] check_slab_allocation+0xd4/0x108 [ 31.342935] __kasan_slab_pre_free+0x2c/0x48 [ 31.342988] kfree+0xe8/0x3c8 [ 31.343198] kfree_sensitive+0x3c/0xb0 [ 31.343265] kmalloc_double_kzfree+0x168/0x308 [ 31.343346] kunit_try_run_case+0x170/0x3f0 [ 31.343399] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.343518] kthread+0x328/0x630 [ 31.343572] ret_from_fork+0x10/0x20 [ 31.343631] [ 31.343660] Allocated by task 223: [ 31.343692] kasan_save_stack+0x3c/0x68 [ 31.343750] kasan_save_track+0x20/0x40 [ 31.343801] kasan_save_alloc_info+0x40/0x58 [ 31.343862] __kasan_kmalloc+0xd4/0xd8 [ 31.343900] __kmalloc_cache_noprof+0x16c/0x3c0 [ 31.344052] kmalloc_double_kzfree+0xb8/0x308 [ 31.344140] kunit_try_run_case+0x170/0x3f0 [ 31.344202] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.344260] kthread+0x328/0x630 [ 31.344294] ret_from_fork+0x10/0x20 [ 31.344330] [ 31.344361] Freed by task 223: [ 31.344389] kasan_save_stack+0x3c/0x68 [ 31.344439] kasan_save_track+0x20/0x40 [ 31.344488] kasan_save_free_info+0x4c/0x78 [ 31.344527] __kasan_slab_free+0x6c/0x98 [ 31.344592] kfree+0x214/0x3c8 [ 31.344650] kfree_sensitive+0x80/0xb0 [ 31.344700] kmalloc_double_kzfree+0x11c/0x308 [ 31.344751] kunit_try_run_case+0x170/0x3f0 [ 31.344791] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.344859] kthread+0x328/0x630 [ 31.344894] ret_from_fork+0x10/0x20 [ 31.344931] [ 31.344952] The buggy address belongs to the object at fff00000c79816c0 [ 31.344952] which belongs to the cache kmalloc-16 of size 16 [ 31.345010] The buggy address is located 0 bytes inside of [ 31.345010] 16-byte region [fff00000c79816c0, fff00000c79816d0) [ 31.345072] [ 31.345300] The buggy address belongs to the physical page: [ 31.345346] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107981 [ 31.345421] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 31.345493] page_type: f5(slab) [ 31.345562] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 31.345685] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 31.345763] page dumped because: kasan: bad access detected [ 31.345797] [ 31.345827] Memory state around the buggy address: [ 31.345860] fff00000c7981580: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 31.345926] fff00000c7981600: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 31.346099] >fff00000c7981680: fa fb fc fc fa fb fc fc fa fb fc fc fc fc fc fc [ 31.346139] ^ [ 31.346175] fff00000c7981700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.346227] fff00000c7981780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.346277] ==================================================================
[ 23.709072] ================================================================== [ 23.709634] BUG: KASAN: double-free in kfree_sensitive+0x2e/0x90 [ 23.710074] Free of addr ffff8881025fe600 by task kunit_try_catch/240 [ 23.710347] [ 23.710436] CPU: 1 UID: 0 PID: 240 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5-next-20250708 #1 PREEMPT(voluntary) [ 23.710487] Tainted: [B]=BAD_PAGE, [N]=TEST [ 23.710499] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 23.710521] Call Trace: [ 23.710534] <TASK> [ 23.710552] dump_stack_lvl+0x73/0xb0 [ 23.710583] print_report+0xd1/0x610 [ 23.710605] ? __virt_addr_valid+0x1db/0x2d0 [ 23.710633] ? kasan_complete_mode_report_info+0x64/0x200 [ 23.710661] ? kfree_sensitive+0x2e/0x90 [ 23.710689] kasan_report_invalid_free+0x10a/0x130 [ 23.710714] ? kfree_sensitive+0x2e/0x90 [ 23.710743] ? kfree_sensitive+0x2e/0x90 [ 23.710770] check_slab_allocation+0x101/0x130 [ 23.710791] __kasan_slab_pre_free+0x28/0x40 [ 23.710812] kfree+0xf0/0x3f0 [ 23.710836] ? add_taint+0x2e/0xa0 [ 23.710863] ? kfree_sensitive+0x2e/0x90 [ 23.710892] kfree_sensitive+0x2e/0x90 [ 23.710919] kmalloc_double_kzfree+0x19c/0x350 [ 23.710944] ? __pfx_kmalloc_double_kzfree+0x10/0x10 [ 23.710968] ? __schedule+0x10cc/0x2b60 [ 23.710998] ? __pfx_read_tsc+0x10/0x10 [ 23.711022] ? ktime_get_ts64+0x86/0x230 [ 23.711049] kunit_try_run_case+0x1a5/0x480 [ 23.711071] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.711091] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 23.711113] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 23.711141] ? __kthread_parkme+0x82/0x180 [ 23.711162] ? preempt_count_sub+0x50/0x80 [ 23.711210] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.711264] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.711315] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 23.711343] kthread+0x337/0x6f0 [ 23.711364] ? trace_preempt_on+0x20/0xc0 [ 23.711389] ? __pfx_kthread+0x10/0x10 [ 23.711412] ? _raw_spin_unlock_irq+0x47/0x80 [ 23.711439] ? calculate_sigpending+0x7b/0xa0 [ 23.711466] ? __pfx_kthread+0x10/0x10 [ 23.711489] ret_from_fork+0x116/0x1d0 [ 23.711509] ? __pfx_kthread+0x10/0x10 [ 23.711531] ret_from_fork_asm+0x1a/0x30 [ 23.711566] </TASK> [ 23.711577] [ 23.720078] Allocated by task 240: [ 23.720417] kasan_save_stack+0x45/0x70 [ 23.720654] kasan_save_track+0x18/0x40 [ 23.720965] kasan_save_alloc_info+0x3b/0x50 [ 23.721119] __kasan_kmalloc+0xb7/0xc0 [ 23.721258] __kmalloc_cache_noprof+0x189/0x420 [ 23.721445] kmalloc_double_kzfree+0xa9/0x350 [ 23.721652] kunit_try_run_case+0x1a5/0x480 [ 23.721854] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.722403] kthread+0x337/0x6f0 [ 23.722578] ret_from_fork+0x116/0x1d0 [ 23.722747] ret_from_fork_asm+0x1a/0x30 [ 23.723001] [ 23.723103] Freed by task 240: [ 23.723207] kasan_save_stack+0x45/0x70 [ 23.723345] kasan_save_track+0x18/0x40 [ 23.723528] kasan_save_free_info+0x3f/0x60 [ 23.723832] __kasan_slab_free+0x56/0x70 [ 23.724062] kfree+0x222/0x3f0 [ 23.724223] kfree_sensitive+0x67/0x90 [ 23.724402] kmalloc_double_kzfree+0x12b/0x350 [ 23.724554] kunit_try_run_case+0x1a5/0x480 [ 23.724749] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.725361] kthread+0x337/0x6f0 [ 23.725561] ret_from_fork+0x116/0x1d0 [ 23.725808] ret_from_fork_asm+0x1a/0x30 [ 23.726007] [ 23.726095] The buggy address belongs to the object at ffff8881025fe600 [ 23.726095] which belongs to the cache kmalloc-16 of size 16 [ 23.726887] The buggy address is located 0 bytes inside of [ 23.726887] 16-byte region [ffff8881025fe600, ffff8881025fe610) [ 23.727204] [ 23.727322] The buggy address belongs to the physical page: [ 23.727590] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1025fe [ 23.728160] flags: 0x200000000000000(node=0|zone=2) [ 23.728441] page_type: f5(slab) [ 23.728605] raw: 0200000000000000 ffff888100041640 dead000000000100 dead000000000122 [ 23.729077] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 23.729319] page dumped because: kasan: bad access detected [ 23.729562] [ 23.729774] Memory state around the buggy address: [ 23.730186] ffff8881025fe500: 00 00 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 23.730559] ffff8881025fe580: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 23.730939] >ffff8881025fe600: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.731161] ^ [ 23.731281] ffff8881025fe680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.731610] ffff8881025fe700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.731956] ==================================================================