Date
July 17, 2025, 11:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.536042] ================================================================== [ 15.536204] BUG: KASAN: double-free in kfree_sensitive+0x3c/0xb0 [ 15.536292] Free of addr fff00000c433ec60 by task kunit_try_catch/193 [ 15.536337] [ 15.536386] CPU: 0 UID: 0 PID: 193 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 15.536623] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.536744] Hardware name: linux,dummy-virt (DT) [ 15.536896] Call trace: [ 15.537037] show_stack+0x20/0x38 (C) [ 15.537175] dump_stack_lvl+0x8c/0xd0 [ 15.537284] print_report+0x118/0x5d0 [ 15.537416] kasan_report_invalid_free+0xc0/0xe8 [ 15.537492] check_slab_allocation+0xd4/0x108 [ 15.537556] __kasan_slab_pre_free+0x2c/0x48 [ 15.537609] kfree+0xe8/0x3c8 [ 15.537805] kfree_sensitive+0x3c/0xb0 [ 15.537947] kmalloc_double_kzfree+0x168/0x308 [ 15.538120] kunit_try_run_case+0x170/0x3f0 [ 15.538217] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.538315] kthread+0x328/0x630 [ 15.538469] ret_from_fork+0x10/0x20 [ 15.538556] [ 15.538737] Allocated by task 193: [ 15.538897] kasan_save_stack+0x3c/0x68 [ 15.539028] kasan_save_track+0x20/0x40 [ 15.539108] kasan_save_alloc_info+0x40/0x58 [ 15.539223] __kasan_kmalloc+0xd4/0xd8 [ 15.539359] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.539434] kmalloc_double_kzfree+0xb8/0x308 [ 15.539480] kunit_try_run_case+0x170/0x3f0 [ 15.539671] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.540047] kthread+0x328/0x630 [ 15.540206] ret_from_fork+0x10/0x20 [ 15.540300] [ 15.540343] Freed by task 193: [ 15.540677] kasan_save_stack+0x3c/0x68 [ 15.540807] kasan_save_track+0x20/0x40 [ 15.540907] kasan_save_free_info+0x4c/0x78 [ 15.541013] __kasan_slab_free+0x6c/0x98 [ 15.541139] kfree+0x214/0x3c8 [ 15.541206] kfree_sensitive+0x80/0xb0 [ 15.541363] kmalloc_double_kzfree+0x11c/0x308 [ 15.541428] kunit_try_run_case+0x170/0x3f0 [ 15.541474] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.541690] kthread+0x328/0x630 [ 15.541731] ret_from_fork+0x10/0x20 [ 15.541800] [ 15.541908] The buggy address belongs to the object at fff00000c433ec60 [ 15.541908] which belongs to the cache kmalloc-16 of size 16 [ 15.542154] The buggy address is located 0 bytes inside of [ 15.542154] 16-byte region [fff00000c433ec60, fff00000c433ec70) [ 15.542381] [ 15.542421] The buggy address belongs to the physical page: [ 15.542470] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10433e [ 15.542664] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 15.542861] page_type: f5(slab) [ 15.543017] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 15.543162] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 15.543351] page dumped because: kasan: bad access detected [ 15.543448] [ 15.543551] Memory state around the buggy address: [ 15.543583] fff00000c433eb00: 00 07 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 15.543665] fff00000c433eb80: 00 04 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 15.543863] >fff00000c433ec00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 15.544049] ^ [ 15.544209] fff00000c433ec80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.544373] fff00000c433ed00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.544772] ==================================================================
[ 13.399224] ================================================================== [ 13.399866] BUG: KASAN: double-free in kfree_sensitive+0x2e/0x90 [ 13.400190] Free of addr ffff888101679d80 by task kunit_try_catch/209 [ 13.400436] [ 13.400735] CPU: 0 UID: 0 PID: 209 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 13.400783] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.400794] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.400815] Call Trace: [ 13.400830] <TASK> [ 13.400844] dump_stack_lvl+0x73/0xb0 [ 13.400873] print_report+0xd1/0x610 [ 13.400895] ? __virt_addr_valid+0x1db/0x2d0 [ 13.400917] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.400940] ? kfree_sensitive+0x2e/0x90 [ 13.400961] kasan_report_invalid_free+0x10a/0x130 [ 13.400986] ? kfree_sensitive+0x2e/0x90 [ 13.401008] ? kfree_sensitive+0x2e/0x90 [ 13.401028] check_slab_allocation+0x101/0x130 [ 13.401050] __kasan_slab_pre_free+0x28/0x40 [ 13.401071] kfree+0xf0/0x3f0 [ 13.401092] ? kfree_sensitive+0x2e/0x90 [ 13.401114] kfree_sensitive+0x2e/0x90 [ 13.401134] kmalloc_double_kzfree+0x19c/0x350 [ 13.401157] ? __pfx_kmalloc_double_kzfree+0x10/0x10 [ 13.401184] ? __pfx_kmalloc_double_kzfree+0x10/0x10 [ 13.401213] kunit_try_run_case+0x1a5/0x480 [ 13.401237] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.401260] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.401284] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.401308] ? __kthread_parkme+0x82/0x180 [ 13.401328] ? preempt_count_sub+0x50/0x80 [ 13.401351] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.401375] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.401399] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.401425] kthread+0x337/0x6f0 [ 13.401443] ? trace_preempt_on+0x20/0xc0 [ 13.401466] ? __pfx_kthread+0x10/0x10 [ 13.401487] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.401508] ? calculate_sigpending+0x7b/0xa0 [ 13.401532] ? __pfx_kthread+0x10/0x10 [ 13.401567] ret_from_fork+0x116/0x1d0 [ 13.401587] ? __pfx_kthread+0x10/0x10 [ 13.401607] ret_from_fork_asm+0x1a/0x30 [ 13.401637] </TASK> [ 13.401647] [ 13.409675] Allocated by task 209: [ 13.409880] kasan_save_stack+0x45/0x70 [ 13.410086] kasan_save_track+0x18/0x40 [ 13.410279] kasan_save_alloc_info+0x3b/0x50 [ 13.410813] __kasan_kmalloc+0xb7/0xc0 [ 13.411581] __kmalloc_cache_noprof+0x189/0x420 [ 13.412116] kmalloc_double_kzfree+0xa9/0x350 [ 13.412674] kunit_try_run_case+0x1a5/0x480 [ 13.412891] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.413117] kthread+0x337/0x6f0 [ 13.413494] ret_from_fork+0x116/0x1d0 [ 13.413953] ret_from_fork_asm+0x1a/0x30 [ 13.414584] [ 13.414834] Freed by task 209: [ 13.415130] kasan_save_stack+0x45/0x70 [ 13.415597] kasan_save_track+0x18/0x40 [ 13.415994] kasan_save_free_info+0x3f/0x60 [ 13.416218] __kasan_slab_free+0x56/0x70 [ 13.416521] kfree+0x222/0x3f0 [ 13.416681] kfree_sensitive+0x67/0x90 [ 13.416849] kmalloc_double_kzfree+0x12b/0x350 [ 13.417045] kunit_try_run_case+0x1a5/0x480 [ 13.417229] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.417795] kthread+0x337/0x6f0 [ 13.417953] ret_from_fork+0x116/0x1d0 [ 13.418126] ret_from_fork_asm+0x1a/0x30 [ 13.418718] [ 13.418825] The buggy address belongs to the object at ffff888101679d80 [ 13.418825] which belongs to the cache kmalloc-16 of size 16 [ 13.419803] The buggy address is located 0 bytes inside of [ 13.419803] 16-byte region [ffff888101679d80, ffff888101679d90) [ 13.420562] [ 13.420666] The buggy address belongs to the physical page: [ 13.420881] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101679 [ 13.421218] flags: 0x200000000000000(node=0|zone=2) [ 13.421789] page_type: f5(slab) [ 13.421951] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 13.422435] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 13.422762] page dumped because: kasan: bad access detected [ 13.422994] [ 13.423082] Memory state around the buggy address: [ 13.423339] ffff888101679c80: 00 04 fc fc 00 04 fc fc fa fb fc fc 00 05 fc fc [ 13.424042] ffff888101679d00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 13.425110] >ffff888101679d80: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.425491] ^ [ 13.425663] ffff888101679e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.425956] ffff888101679e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.426419] ==================================================================