Hay
Date
July 1, 2025, 3:08 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.772678] ==================================================================
[   16.772772] BUG: KASAN: invalid-free in kfree+0x270/0x3c8
[   16.772912] Free of addr fff00000c692c001 by task kunit_try_catch/151
[   16.772965] 
[   16.773000] CPU: 1 UID: 0 PID: 151 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   16.773123] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.773188] Hardware name: linux,dummy-virt (DT)
[   16.773220] Call trace:
[   16.773242]  show_stack+0x20/0x38 (C)
[   16.773520]  dump_stack_lvl+0x8c/0xd0
[   16.773739]  print_report+0x118/0x608
[   16.773798]  kasan_report_invalid_free+0xc0/0xe8
[   16.773846]  __kasan_kfree_large+0x5c/0xa8
[   16.773893]  free_large_kmalloc+0x64/0x190
[   16.773947]  kfree+0x270/0x3c8
[   16.773988]  kmalloc_large_invalid_free+0x108/0x270
[   16.774044]  kunit_try_run_case+0x170/0x3f0
[   16.774090]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.774404]  kthread+0x328/0x630
[   16.774444]  ret_from_fork+0x10/0x20
[   16.774490] 
[   16.774510] The buggy address belongs to the physical page:
[   16.774543] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10692c
[   16.774608] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   16.774711] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   16.774877] page_type: f8(unknown)
[   16.775012] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   16.775134] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   16.775209] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   16.775559] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   16.775738] head: 0bfffe0000000002 ffffc1ffc31a4b01 00000000ffffffff 00000000ffffffff
[   16.775828] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   16.775933] page dumped because: kasan: bad access detected
[   16.775964] 
[   16.775983] Memory state around the buggy address:
[   16.776043]  fff00000c692bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.776263]  fff00000c692bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.776610] >fff00000c692c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.776674]                    ^
[   16.776744]  fff00000c692c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.776820]  fff00000c692c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.776911] ==================================================================

[   11.065861] ==================================================================
[   11.066365] BUG: KASAN: invalid-free in kfree+0x274/0x3f0
[   11.066631] Free of addr ffff888102914001 by task kunit_try_catch/167
[   11.066922] 
[   11.067066] CPU: 0 UID: 0 PID: 167 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.067113] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.067125] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.067147] Call Trace:
[   11.067160]  <TASK>
[   11.067180]  dump_stack_lvl+0x73/0xb0
[   11.067210]  print_report+0xd1/0x650
[   11.067233]  ? __virt_addr_valid+0x1db/0x2d0
[   11.067258]  ? kasan_addr_to_slab+0x11/0xa0
[   11.067277]  ? kfree+0x274/0x3f0
[   11.067299]  kasan_report_invalid_free+0x10a/0x130
[   11.067322]  ? kfree+0x274/0x3f0
[   11.067345]  ? kfree+0x274/0x3f0
[   11.067364]  __kasan_kfree_large+0x86/0xd0
[   11.067384]  free_large_kmalloc+0x4b/0x110
[   11.067406]  kfree+0x274/0x3f0
[   11.067430]  kmalloc_large_invalid_free+0x120/0x2b0
[   11.067451]  ? __pfx_kmalloc_large_invalid_free+0x10/0x10
[   11.067475]  ? __pfx_kmalloc_large_invalid_free+0x10/0x10
[   11.067500]  kunit_try_run_case+0x1a5/0x480
[   11.067525]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.067545]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.067567]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.067588]  ? __kthread_parkme+0x82/0x180
[   11.067608]  ? preempt_count_sub+0x50/0x80
[   11.067632]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.067653]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.067675]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.067696]  kthread+0x337/0x6f0
[   11.067714]  ? trace_preempt_on+0x20/0xc0
[   11.067736]  ? __pfx_kthread+0x10/0x10
[   11.067755]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.067775]  ? calculate_sigpending+0x7b/0xa0
[   11.067797]  ? __pfx_kthread+0x10/0x10
[   11.067817]  ret_from_fork+0x116/0x1d0
[   11.067835]  ? __pfx_kthread+0x10/0x10
[   11.067854]  ret_from_fork_asm+0x1a/0x30
[   11.067884]  </TASK>
[   11.067895] 
[   11.074584] The buggy address belongs to the physical page:
[   11.074861] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102914
[   11.075120] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   11.075451] flags: 0x200000000000040(head|node=0|zone=2)
[   11.075778] page_type: f8(unknown)
[   11.075957] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   11.076320] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   11.076557] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   11.076844] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   11.077208] head: 0200000000000002 ffffea00040a4501 00000000ffffffff 00000000ffffffff
[   11.077547] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   11.077805] page dumped because: kasan: bad access detected
[   11.078215] 
[   11.078292] Memory state around the buggy address:
[   11.078449]  ffff888102913f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.078663]  ffff888102913f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.079079] >ffff888102914000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.079391]                    ^
[   11.079555]  ffff888102914080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.080126]  ffff888102914100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.080369] ==================================================================