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

Environment
qemu-arm64
qemu-x86_64

[   16.405650] ==================================================================
[   16.405834] BUG: KASAN: invalid-free in kfree+0x270/0x3c8
[   16.405999] Free of addr fff00000c789c001 by task kunit_try_catch/150
[   16.406053] 
[   16.406093] CPU: 1 UID: 0 PID: 150 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   16.406304] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.406332] Hardware name: linux,dummy-virt (DT)
[   16.406364] Call trace:
[   16.406389]  show_stack+0x20/0x38 (C)
[   16.406440]  dump_stack_lvl+0x8c/0xd0
[   16.406488]  print_report+0x118/0x5d0
[   16.406533]  kasan_report_invalid_free+0xc0/0xe8
[   16.406580]  __kasan_kfree_large+0x5c/0xa8
[   16.406625]  free_large_kmalloc+0x64/0x190
[   16.406795]  kfree+0x270/0x3c8
[   16.406990]  kmalloc_large_invalid_free+0x108/0x270
[   16.407046]  kunit_try_run_case+0x170/0x3f0
[   16.407134]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.407273]  kthread+0x328/0x630
[   16.407320]  ret_from_fork+0x10/0x20
[   16.407396] 
[   16.407436] The buggy address belongs to the physical page:
[   16.407471] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10789c
[   16.407565] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   16.407613] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   16.407666] page_type: f8(unknown)
[   16.407704] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   16.407958] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   16.408255] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   16.408374] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   16.408515] head: 0bfffe0000000002 ffffc1ffc31e2701 00000000ffffffff 00000000ffffffff
[   16.408624] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   16.408838] page dumped because: kasan: bad access detected
[   16.408886] 
[   16.408905] Memory state around the buggy address:
[   16.408939]  fff00000c789bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.408986]  fff00000c789bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.409129] >fff00000c789c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.409291]                    ^
[   16.409383]  fff00000c789c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.409444]  fff00000c789c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.409676] ==================================================================

[   11.775629] ==================================================================
[   11.776654] BUG: KASAN: invalid-free in kfree+0x274/0x3f0
[   11.777215] Free of addr ffff88810294c001 by task kunit_try_catch/167
[   11.777769] 
[   11.778024] CPU: 0 UID: 0 PID: 167 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   11.778088] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.778099] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.778121] Call Trace:
[   11.778132]  <TASK>
[   11.778150]  dump_stack_lvl+0x73/0xb0
[   11.778181]  print_report+0xd1/0x610
[   11.778204]  ? __virt_addr_valid+0x1db/0x2d0
[   11.778234]  ? kasan_addr_to_slab+0x11/0xa0
[   11.778254]  ? kfree+0x274/0x3f0
[   11.778275]  kasan_report_invalid_free+0x10a/0x130
[   11.778299]  ? kfree+0x274/0x3f0
[   11.778322]  ? kfree+0x274/0x3f0
[   11.778341]  __kasan_kfree_large+0x86/0xd0
[   11.778362]  free_large_kmalloc+0x4b/0x110
[   11.778385]  kfree+0x274/0x3f0
[   11.778410]  kmalloc_large_invalid_free+0x120/0x2b0
[   11.778433]  ? __pfx_kmalloc_large_invalid_free+0x10/0x10
[   11.778456]  ? __schedule+0x10cc/0x2b60
[   11.778479]  ? __pfx_read_tsc+0x10/0x10
[   11.778500]  ? ktime_get_ts64+0x86/0x230
[   11.778524]  kunit_try_run_case+0x1a5/0x480
[   11.778550]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.778572]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.778606]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.778629]  ? __kthread_parkme+0x82/0x180
[   11.778649]  ? preempt_count_sub+0x50/0x80
[   11.778674]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.778697]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.778720]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.778743]  kthread+0x337/0x6f0
[   11.778762]  ? trace_preempt_on+0x20/0xc0
[   11.778785]  ? __pfx_kthread+0x10/0x10
[   11.778805]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.778844]  ? calculate_sigpending+0x7b/0xa0
[   11.778869]  ? __pfx_kthread+0x10/0x10
[   11.778890]  ret_from_fork+0x116/0x1d0
[   11.778908]  ? __pfx_kthread+0x10/0x10
[   11.778927]  ret_from_fork_asm+0x1a/0x30
[   11.778960]  </TASK>
[   11.778970] 
[   11.792541] The buggy address belongs to the physical page:
[   11.793117] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10294c
[   11.793377] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   11.793643] flags: 0x200000000000040(head|node=0|zone=2)
[   11.794175] page_type: f8(unknown)
[   11.794501] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   11.795240] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   11.796370] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   11.797193] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   11.797437] head: 0200000000000002 ffffea00040a5301 00000000ffffffff 00000000ffffffff
[   11.797877] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   11.798580] page dumped because: kasan: bad access detected
[   11.799080] 
[   11.799294] Memory state around the buggy address:
[   11.799779]  ffff88810294bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.800254]  ffff88810294bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.800478] >ffff88810294c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.800864]                    ^
[   11.801466]  ffff88810294c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.802199]  ffff88810294c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.802903] ==================================================================