Date
July 19, 2025, 11:12 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.369319] ================================================================== [ 15.369739] BUG: KASAN: double-free in kfree_sensitive+0x3c/0xb0 [ 15.369808] Free of addr fff00000c5eb7c60 by task kunit_try_catch/192 [ 15.370063] [ 15.370399] CPU: 1 UID: 0 PID: 192 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 15.370670] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.370905] Hardware name: linux,dummy-virt (DT) [ 15.370948] Call trace: [ 15.370976] show_stack+0x20/0x38 (C) [ 15.371117] dump_stack_lvl+0x8c/0xd0 [ 15.371191] print_report+0x118/0x5d0 [ 15.371346] kasan_report_invalid_free+0xc0/0xe8 [ 15.371449] check_slab_allocation+0xd4/0x108 [ 15.371608] __kasan_slab_pre_free+0x2c/0x48 [ 15.371661] kfree+0xe8/0x3c8 [ 15.371771] kfree_sensitive+0x3c/0xb0 [ 15.371820] kmalloc_double_kzfree+0x168/0x308 [ 15.371900] kunit_try_run_case+0x170/0x3f0 [ 15.371954] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.372006] kthread+0x328/0x630 [ 15.372227] ret_from_fork+0x10/0x20 [ 15.372540] [ 15.372606] Allocated by task 192: [ 15.372924] kasan_save_stack+0x3c/0x68 [ 15.373036] kasan_save_track+0x20/0x40 [ 15.373201] kasan_save_alloc_info+0x40/0x58 [ 15.373276] __kasan_kmalloc+0xd4/0xd8 [ 15.373702] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.373870] kmalloc_double_kzfree+0xb8/0x308 [ 15.374110] kunit_try_run_case+0x170/0x3f0 [ 15.374333] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.374536] kthread+0x328/0x630 [ 15.374624] ret_from_fork+0x10/0x20 [ 15.374710] [ 15.374818] Freed by task 192: [ 15.374917] kasan_save_stack+0x3c/0x68 [ 15.375015] kasan_save_track+0x20/0x40 [ 15.375121] kasan_save_free_info+0x4c/0x78 [ 15.375191] __kasan_slab_free+0x6c/0x98 [ 15.375228] kfree+0x214/0x3c8 [ 15.375614] kfree_sensitive+0x80/0xb0 [ 15.375800] kmalloc_double_kzfree+0x11c/0x308 [ 15.375935] kunit_try_run_case+0x170/0x3f0 [ 15.375976] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.376018] kthread+0x328/0x630 [ 15.376267] ret_from_fork+0x10/0x20 [ 15.376765] [ 15.376924] The buggy address belongs to the object at fff00000c5eb7c60 [ 15.376924] which belongs to the cache kmalloc-16 of size 16 [ 15.377020] The buggy address is located 0 bytes inside of [ 15.377020] 16-byte region [fff00000c5eb7c60, fff00000c5eb7c70) [ 15.377221] [ 15.377296] The buggy address belongs to the physical page: [ 15.377356] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105eb7 [ 15.377457] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 15.377535] page_type: f5(slab) [ 15.377587] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 15.377645] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 15.377704] page dumped because: kasan: bad access detected [ 15.377746] [ 15.377765] Memory state around the buggy address: [ 15.377814] fff00000c5eb7b00: fa fb fc fc 00 01 fc fc 00 01 fc fc fa fb fc fc [ 15.377869] fff00000c5eb7b80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 15.377915] >fff00000c5eb7c00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 15.377955] ^ [ 15.378010] fff00000c5eb7c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.378054] fff00000c5eb7d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.378091] ==================================================================
[ 12.409515] ================================================================== [ 12.410253] BUG: KASAN: double-free in kfree_sensitive+0x2e/0x90 [ 12.410824] Free of addr ffff888101df6d40 by task kunit_try_catch/209 [ 12.411541] [ 12.411679] CPU: 1 UID: 0 PID: 209 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 12.411721] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.411731] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.411751] Call Trace: [ 12.411762] <TASK> [ 12.411774] dump_stack_lvl+0x73/0xb0 [ 12.411801] print_report+0xd1/0x610 [ 12.411822] ? __virt_addr_valid+0x1db/0x2d0 [ 12.411844] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.411865] ? kfree_sensitive+0x2e/0x90 [ 12.411885] kasan_report_invalid_free+0x10a/0x130 [ 12.411909] ? kfree_sensitive+0x2e/0x90 [ 12.411930] ? kfree_sensitive+0x2e/0x90 [ 12.411948] check_slab_allocation+0x101/0x130 [ 12.411969] __kasan_slab_pre_free+0x28/0x40 [ 12.411988] kfree+0xf0/0x3f0 [ 12.412021] ? kfree_sensitive+0x2e/0x90 [ 12.412042] kfree_sensitive+0x2e/0x90 [ 12.412061] kmalloc_double_kzfree+0x19c/0x350 [ 12.412083] ? __pfx_kmalloc_double_kzfree+0x10/0x10 [ 12.412104] ? sysvec_apic_timer_interrupt+0x50/0x90 [ 12.412128] ? trace_hardirqs_on+0x37/0xe0 [ 12.412149] ? __pfx_read_tsc+0x10/0x10 [ 12.412170] ? ktime_get_ts64+0x86/0x230 [ 12.412193] kunit_try_run_case+0x1a5/0x480 [ 12.412218] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.412241] ? queued_spin_lock_slowpath+0x116/0xb40 [ 12.412264] ? __kthread_parkme+0x82/0x180 [ 12.412282] ? preempt_count_sub+0x50/0x80 [ 12.412305] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.412327] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.412348] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.412405] kthread+0x337/0x6f0 [ 12.412424] ? trace_preempt_on+0x20/0xc0 [ 12.412445] ? __pfx_kthread+0x10/0x10 [ 12.412464] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.412484] ? calculate_sigpending+0x7b/0xa0 [ 12.412506] ? __pfx_kthread+0x10/0x10 [ 12.412526] ret_from_fork+0x116/0x1d0 [ 12.412543] ? __pfx_kthread+0x10/0x10 [ 12.412562] ret_from_fork_asm+0x1a/0x30 [ 12.412591] </TASK> [ 12.412599] [ 12.420017] Allocated by task 209: [ 12.420207] kasan_save_stack+0x45/0x70 [ 12.420462] kasan_save_track+0x18/0x40 [ 12.420672] kasan_save_alloc_info+0x3b/0x50 [ 12.420843] __kasan_kmalloc+0xb7/0xc0 [ 12.420978] __kmalloc_cache_noprof+0x189/0x420 [ 12.421143] kmalloc_double_kzfree+0xa9/0x350 [ 12.421302] kunit_try_run_case+0x1a5/0x480 [ 12.421529] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.421830] kthread+0x337/0x6f0 [ 12.422001] ret_from_fork+0x116/0x1d0 [ 12.422199] ret_from_fork_asm+0x1a/0x30 [ 12.422613] [ 12.422723] Freed by task 209: [ 12.422883] kasan_save_stack+0x45/0x70 [ 12.423056] kasan_save_track+0x18/0x40 [ 12.423247] kasan_save_free_info+0x3f/0x60 [ 12.423512] __kasan_slab_free+0x56/0x70 [ 12.423679] kfree+0x222/0x3f0 [ 12.423844] kfree_sensitive+0x67/0x90 [ 12.423977] kmalloc_double_kzfree+0x12b/0x350 [ 12.424138] kunit_try_run_case+0x1a5/0x480 [ 12.424286] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.424514] kthread+0x337/0x6f0 [ 12.424679] ret_from_fork+0x116/0x1d0 [ 12.424865] ret_from_fork_asm+0x1a/0x30 [ 12.425092] [ 12.425188] The buggy address belongs to the object at ffff888101df6d40 [ 12.425188] which belongs to the cache kmalloc-16 of size 16 [ 12.425798] The buggy address is located 0 bytes inside of [ 12.425798] 16-byte region [ffff888101df6d40, ffff888101df6d50) [ 12.426145] [ 12.426245] The buggy address belongs to the physical page: [ 12.426703] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101df6 [ 12.427076] flags: 0x200000000000000(node=0|zone=2) [ 12.427311] page_type: f5(slab) [ 12.427559] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 12.427873] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 12.428162] page dumped because: kasan: bad access detected [ 12.428642] [ 12.428738] Memory state around the buggy address: [ 12.428937] ffff888101df6c00: 00 02 fc fc 00 02 fc fc 00 02 fc fc fa fb fc fc [ 12.429242] ffff888101df6c80: fa fb fc fc fa fb fc fc 00 05 fc fc fa fb fc fc [ 12.429509] >ffff888101df6d00: fa fb fc fc fa fb fc fc fa fb fc fc fc fc fc fc [ 12.429941] ^ [ 12.430205] ffff888101df6d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.430543] ffff888101df6e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.430823] ==================================================================