Hay
Date
July 11, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.426252] ==================================================================
[   16.426333] BUG: KASAN: invalid-free in kfree+0x270/0x3c8
[   16.426392] Free of addr fff00000c6518001 by task kunit_try_catch/151
[   16.426435] 
[   16.426464] CPU: 0 UID: 0 PID: 151 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   16.426713] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.426816] Hardware name: linux,dummy-virt (DT)
[   16.426912] Call trace:
[   16.426962]  show_stack+0x20/0x38 (C)
[   16.427078]  dump_stack_lvl+0x8c/0xd0
[   16.427201]  print_report+0x118/0x608
[   16.427295]  kasan_report_invalid_free+0xc0/0xe8
[   16.427393]  __kasan_kfree_large+0x5c/0xa8
[   16.427526]  free_large_kmalloc+0x64/0x190
[   16.427653]  kfree+0x270/0x3c8
[   16.427713]  kmalloc_large_invalid_free+0x108/0x270
[   16.427759]  kunit_try_run_case+0x170/0x3f0
[   16.427803]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.427864]  kthread+0x328/0x630
[   16.427904]  ret_from_fork+0x10/0x20
[   16.428260] 
[   16.428295] The buggy address belongs to the physical page:
[   16.428351] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106518
[   16.428449] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   16.428572] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   16.428690] page_type: f8(unknown)
[   16.428806] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   16.428922] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   16.429060] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   16.429215] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   16.429318] head: 0bfffe0000000002 ffffc1ffc3194601 00000000ffffffff 00000000ffffffff
[   16.429418] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   16.429766] page dumped because: kasan: bad access detected
[   16.429867] 
[   16.430035] Memory state around the buggy address:
[   16.430115]  fff00000c6517f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.430171]  fff00000c6517f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.430255] >fff00000c6518000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.430335]                    ^
[   16.430420]  fff00000c6518080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.430530]  fff00000c6518100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.430611] ==================================================================

[   11.926725] ==================================================================
[   11.928068] BUG: KASAN: invalid-free in kfree+0x274/0x3f0
[   11.928418] Free of addr ffff888102948001 by task kunit_try_catch/167
[   11.928634] 
[   11.928719] CPU: 0 UID: 0 PID: 167 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   11.928759] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.928771] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.928789] Call Trace:
[   11.928801]  <TASK>
[   11.928816]  dump_stack_lvl+0x73/0xb0
[   11.928843]  print_report+0xd1/0x650
[   11.928864]  ? __virt_addr_valid+0x1db/0x2d0
[   11.928887]  ? kasan_addr_to_slab+0x11/0xa0
[   11.928906]  ? kfree+0x274/0x3f0
[   11.928939]  kasan_report_invalid_free+0x10a/0x130
[   11.928963]  ? kfree+0x274/0x3f0
[   11.928986]  ? kfree+0x274/0x3f0
[   11.929005]  __kasan_kfree_large+0x86/0xd0
[   11.929026]  free_large_kmalloc+0x4b/0x110
[   11.929049]  kfree+0x274/0x3f0
[   11.929074]  kmalloc_large_invalid_free+0x120/0x2b0
[   11.929096]  ? __pfx_kmalloc_large_invalid_free+0x10/0x10
[   11.929120]  ? __schedule+0x10cc/0x2b60
[   11.929141]  ? __pfx_read_tsc+0x10/0x10
[   11.929161]  ? ktime_get_ts64+0x86/0x230
[   11.929185]  kunit_try_run_case+0x1a5/0x480
[   11.929209]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.929254]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.929279]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.929303]  ? __kthread_parkme+0x82/0x180
[   11.929322]  ? preempt_count_sub+0x50/0x80
[   11.929346]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.929369]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.929393]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.929417]  kthread+0x337/0x6f0
[   11.929435]  ? trace_preempt_on+0x20/0xc0
[   11.929457]  ? __pfx_kthread+0x10/0x10
[   11.929495]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.929516]  ? calculate_sigpending+0x7b/0xa0
[   11.929554]  ? __pfx_kthread+0x10/0x10
[   11.929575]  ret_from_fork+0x116/0x1d0
[   11.929593]  ? __pfx_kthread+0x10/0x10
[   11.929612]  ret_from_fork_asm+0x1a/0x30
[   11.929643]  </TASK>
[   11.929652] 
[   11.946208] The buggy address belongs to the physical page:
[   11.946915] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102948
[   11.947636] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   11.948225] flags: 0x200000000000040(head|node=0|zone=2)
[   11.948861] page_type: f8(unknown)
[   11.949329] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   11.949635] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   11.950401] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   11.951289] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   11.951528] head: 0200000000000002 ffffea00040a5201 00000000ffffffff 00000000ffffffff
[   11.951768] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   11.952494] page dumped because: kasan: bad access detected
[   11.953181] 
[   11.953369] Memory state around the buggy address:
[   11.953798]  ffff888102947f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.954499]  ffff888102947f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.954889] >ffff888102948000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.955257]                    ^
[   11.955563]  ffff888102948080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.956294]  ffff888102948100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.957074] ==================================================================