Hay
Date
June 24, 2025, 12:47 p.m.

Environment
qemu-arm64
qemu-x86_64

[   23.363425] ==================================================================
[   23.364008] BUG: KASAN: invalid-free in kfree+0x270/0x3c8
[   23.364226] Free of addr fff00000c77dc001 by task kunit_try_catch/152
[   23.364402] 
[   23.364490] CPU: 0 UID: 0 PID: 152 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc2 #1 PREEMPT 
[   23.364864] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.364987] Hardware name: linux,dummy-virt (DT)
[   23.365072] Call trace:
[   23.365137]  show_stack+0x20/0x38 (C)
[   23.365777]  dump_stack_lvl+0x8c/0xd0
[   23.367427]  print_report+0x118/0x608
[   23.367601]  kasan_report_invalid_free+0xc0/0xe8
[   23.367747]  __kasan_kfree_large+0x5c/0xa8
[   23.367940]  free_large_kmalloc+0x64/0x190
[   23.368085]  kfree+0x270/0x3c8
[   23.368199]  kmalloc_large_invalid_free+0x108/0x270
[   23.369143]  kunit_try_run_case+0x170/0x3f0
[   23.370162]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.370693]  kthread+0x328/0x630
[   23.370966]  ret_from_fork+0x10/0x20
[   23.371100] 
[   23.371152] The buggy address belongs to the physical page:
[   23.371307] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077dc
[   23.371675] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   23.371941] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   23.372070] page_type: f8(unknown)
[   23.372241] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   23.372464] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   23.372625] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   23.372765] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   23.372967] head: 0bfffe0000000002 ffffc1ffc31df701 00000000ffffffff 00000000ffffffff
[   23.373232] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   23.373345] page dumped because: kasan: bad access detected
[   23.373480] 
[   23.373534] Memory state around the buggy address:
[   23.373619]  fff00000c77dbf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   23.374044]  fff00000c77dbf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   23.374208] >fff00000c77dc000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   23.374323]                    ^
[   23.374564]  fff00000c77dc080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   23.374679]  fff00000c77dc100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   23.374847] ==================================================================

[   11.134698] ==================================================================
[   11.135186] BUG: KASAN: invalid-free in kfree+0x274/0x3f0
[   11.135772] Free of addr ffff888102858001 by task kunit_try_catch/170
[   11.136688] 
[   11.136837] CPU: 1 UID: 0 PID: 170 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc2 #1 PREEMPT(voluntary) 
[   11.136927] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.136948] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.136986] Call Trace:
[   11.137011]  <TASK>
[   11.137046]  dump_stack_lvl+0x73/0xb0
[   11.137106]  print_report+0xd1/0x650
[   11.137147]  ? __virt_addr_valid+0x1db/0x2d0
[   11.137185]  ? kasan_addr_to_slab+0x11/0xa0
[   11.137219]  ? kfree+0x274/0x3f0
[   11.137250]  kasan_report_invalid_free+0x10a/0x130
[   11.137290]  ? kfree+0x274/0x3f0
[   11.137329]  ? kfree+0x274/0x3f0
[   11.137364]  __kasan_kfree_large+0x86/0xd0
[   11.137405]  free_large_kmalloc+0x4b/0x110
[   11.137427]  kfree+0x274/0x3f0
[   11.137448]  kmalloc_large_invalid_free+0x120/0x2b0
[   11.137470]  ? __pfx_kmalloc_large_invalid_free+0x10/0x10
[   11.137493]  ? __pfx_kmalloc_large_invalid_free+0x10/0x10
[   11.137517]  kunit_try_run_case+0x1a5/0x480
[   11.137544]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.137573]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.137596]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.137618]  ? __kthread_parkme+0x82/0x180
[   11.137659]  ? preempt_count_sub+0x50/0x80
[   11.137683]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.137705]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.137726]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.137747]  kthread+0x337/0x6f0
[   11.137763]  ? trace_preempt_on+0x20/0xc0
[   11.137785]  ? __pfx_kthread+0x10/0x10
[   11.137802]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.137821]  ? calculate_sigpending+0x7b/0xa0
[   11.137841]  ? __pfx_kthread+0x10/0x10
[   11.137858]  ret_from_fork+0x41/0x80
[   11.137879]  ? __pfx_kthread+0x10/0x10
[   11.137895]  ret_from_fork_asm+0x1a/0x30
[   11.137925]  </TASK>
[   11.137937] 
[   11.147343] The buggy address belongs to the physical page:
[   11.147900] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102858
[   11.148395] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   11.148896] flags: 0x200000000000040(head|node=0|zone=2)
[   11.149219] page_type: f8(unknown)
[   11.149518] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   11.150089] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   11.150400] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   11.150929] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   11.151234] head: 0200000000000002 ffffea00040a1601 00000000ffffffff 00000000ffffffff
[   11.151740] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   11.152086] page dumped because: kasan: bad access detected
[   11.152348] 
[   11.152518] Memory state around the buggy address:
[   11.152750]  ffff888102857f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.153213]  ffff888102857f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.153702] >ffff888102858000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.154008]                    ^
[   11.154194]  ffff888102858080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.154727]  ffff888102858100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.155088] ==================================================================