Hay
Date
July 20, 2025, 8:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   14.963891] ==================================================================
[   14.964021] BUG: KASAN: invalid-free in kfree+0x270/0x3c8
[   14.964163] Free of addr fff00000c7698001 by task kunit_try_catch/151
[   14.964223] 
[   14.964287] CPU: 1 UID: 0 PID: 151 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   14.964367] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.964392] Hardware name: linux,dummy-virt (DT)
[   14.964665] Call trace:
[   14.964801]  show_stack+0x20/0x38 (C)
[   14.964863]  dump_stack_lvl+0x8c/0xd0
[   14.965033]  print_report+0x118/0x5d0
[   14.965238]  kasan_report_invalid_free+0xc0/0xe8
[   14.965313]  __kasan_kfree_large+0x5c/0xa8
[   14.965639]  free_large_kmalloc+0x64/0x190
[   14.965705]  kfree+0x270/0x3c8
[   14.965746]  kmalloc_large_invalid_free+0x108/0x270
[   14.965804]  kunit_try_run_case+0x170/0x3f0
[   14.965857]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   14.965924]  kthread+0x328/0x630
[   14.965974]  ret_from_fork+0x10/0x20
[   14.966055] 
[   14.966077] The buggy address belongs to the physical page:
[   14.966110] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107698
[   14.966161] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   14.966244] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   14.966294] page_type: f8(unknown)
[   14.966334] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   14.966382] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   14.966439] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   14.966487] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   14.966534] head: 0bfffe0000000002 ffffc1ffc31da601 00000000ffffffff 00000000ffffffff
[   14.966590] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   14.966630] page dumped because: kasan: bad access detected
[   14.966670] 
[   14.966703] Memory state around the buggy address:
[   14.966742]  fff00000c7697f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.966785]  fff00000c7697f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.966825] >fff00000c7698000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   14.966861]                    ^
[   14.966888]  fff00000c7698080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   14.966928]  fff00000c7698100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   14.967003] ==================================================================

[   12.498992] ==================================================================
[   12.499502] BUG: KASAN: invalid-free in kfree+0x274/0x3f0
[   12.499797] Free of addr ffff888102a3c001 by task kunit_try_catch/168
[   12.500257] 
[   12.500394] CPU: 1 UID: 0 PID: 168 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.500440] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.500451] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.500483] Call Trace:
[   12.500495]  <TASK>
[   12.500509]  dump_stack_lvl+0x73/0xb0
[   12.500550]  print_report+0xd1/0x610
[   12.500572]  ? __virt_addr_valid+0x1db/0x2d0
[   12.500595]  ? kasan_addr_to_slab+0x11/0xa0
[   12.500626]  ? kfree+0x274/0x3f0
[   12.500648]  kasan_report_invalid_free+0x10a/0x130
[   12.500672]  ? kfree+0x274/0x3f0
[   12.500694]  ? kfree+0x274/0x3f0
[   12.500724]  __kasan_kfree_large+0x86/0xd0
[   12.500745]  free_large_kmalloc+0x4b/0x110
[   12.500768]  kfree+0x274/0x3f0
[   12.500803]  kmalloc_large_invalid_free+0x120/0x2b0
[   12.500824]  ? __pfx_kmalloc_large_invalid_free+0x10/0x10
[   12.500860]  ? __pfx_queued_spin_lock_slowpath+0x10/0x10
[   12.500885]  ? __pfx_read_tsc+0x10/0x10
[   12.500906]  ? ktime_get_ts64+0x86/0x230
[   12.500929]  kunit_try_run_case+0x1a5/0x480
[   12.500953]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.500975]  ? _raw_spin_lock_irqsave+0xf9/0x100
[   12.501006]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.501029]  ? __kthread_parkme+0x82/0x180
[   12.501090]  ? preempt_count_sub+0x50/0x80
[   12.501114]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.501137]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.501160]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.501183]  kthread+0x337/0x6f0
[   12.501231]  ? trace_preempt_on+0x20/0xc0
[   12.501253]  ? __pfx_kthread+0x10/0x10
[   12.501285]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.501306]  ? calculate_sigpending+0x7b/0xa0
[   12.501329]  ? __pfx_kthread+0x10/0x10
[   12.501349]  ret_from_fork+0x116/0x1d0
[   12.501368]  ? __pfx_kthread+0x10/0x10
[   12.501388]  ret_from_fork_asm+0x1a/0x30
[   12.501418]  </TASK>
[   12.501428] 
[   12.513875] The buggy address belongs to the physical page:
[   12.514444] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a3c
[   12.515287] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.516048] flags: 0x200000000000040(head|node=0|zone=2)
[   12.516764] page_type: f8(unknown)
[   12.517091] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   12.517331] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   12.517583] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   12.517819] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   12.518056] head: 0200000000000002 ffffea00040a8f01 00000000ffffffff 00000000ffffffff
[   12.518298] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   12.518652] page dumped because: kasan: bad access detected
[   12.519234] 
[   12.519392] Memory state around the buggy address:
[   12.520026]  ffff888102a3bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.520710]  ffff888102a3bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.521411] >ffff888102a3c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.522050]                    ^
[   12.522415]  ffff888102a3c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.523237]  ffff888102a3c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.524008] ==================================================================