Hay
Date
June 2, 2025, 2:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   21.851838] ==================================================================
[   21.852375] BUG: KASAN: invalid-free in mempool_kmalloc_invalid_free_helper+0x124/0x2b0
[   21.852912] Free of addr fff00000c6c7c001 by task kunit_try_catch/230
[   21.853192] 
[   21.853337] CPU: 1 UID: 0 PID: 230 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   21.853450] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.853504] Hardware name: linux,dummy-virt (DT)
[   21.853552] Call trace:
[   21.853580]  dump_backtrace+0x9c/0x128
[   21.853631]  show_stack+0x20/0x38
[   21.853673]  dump_stack_lvl+0x8c/0xd0
[   21.853721]  print_report+0x118/0x5f0
[   21.853765]  kasan_report_invalid_free+0xc0/0xe8
[   21.853811]  __kasan_mempool_poison_object+0xfc/0x150
[   21.853862]  mempool_free+0x28c/0x328
[   21.853910]  mempool_kmalloc_invalid_free_helper+0x124/0x2b0
[   21.853964]  mempool_kmalloc_large_invalid_free+0xc0/0x118
[   21.854016]  kunit_try_run_case+0x170/0x3f0
[   21.854063]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.854115]  kthread+0x24c/0x2d0
[   21.854157]  ret_from_fork+0x10/0x20
[   21.854206] 
[   21.859851] The buggy address belongs to the physical page:
[   21.860292] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106c7c
[   21.860802] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   21.861076] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   21.861576] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   21.862035] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   21.862559] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   21.862979] head: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   21.863479] head: 0bfffe0000000002 ffffc1ffc31b1f01 ffffffffffffffff 0000000000000000
[   21.864081] head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
[   21.864418] page dumped because: kasan: bad access detected
[   21.864772] 
[   21.864973] Memory state around the buggy address:
[   21.865275]  fff00000c6c7bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.865797]  fff00000c6c7bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.866052] >fff00000c6c7c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   21.866492]                    ^
[   21.866759]  fff00000c6c7c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   21.867534]  fff00000c6c7c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   21.868019] ==================================================================
[   21.824093] ==================================================================
[   21.824616] BUG: KASAN: invalid-free in mempool_kmalloc_invalid_free_helper+0x124/0x2b0
[   21.825026] Free of addr fff00000c6cf0801 by task kunit_try_catch/228
[   21.825343] 
[   21.825558] CPU: 0 UID: 0 PID: 228 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   21.825674] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.825708] Hardware name: linux,dummy-virt (DT)
[   21.825760] Call trace:
[   21.825793]  dump_backtrace+0x9c/0x128
[   21.825860]  show_stack+0x20/0x38
[   21.825905]  dump_stack_lvl+0x8c/0xd0
[   21.825953]  print_report+0x118/0x5f0
[   21.825999]  kasan_report_invalid_free+0xc0/0xe8
[   21.826046]  check_slab_allocation+0xfc/0x108
[   21.826089]  __kasan_mempool_poison_object+0x78/0x150
[   21.826151]  mempool_free+0x28c/0x328
[   21.826203]  mempool_kmalloc_invalid_free_helper+0x124/0x2b0
[   21.826284]  mempool_kmalloc_invalid_free+0xc0/0x118
[   21.826350]  kunit_try_run_case+0x170/0x3f0
[   21.826413]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.826468]  kthread+0x24c/0x2d0
[   21.826510]  ret_from_fork+0x10/0x20
[   21.826560] 
[   21.832537] Allocated by task 228:
[   21.832844]  kasan_save_stack+0x3c/0x68
[   21.833145]  kasan_save_track+0x20/0x40
[   21.833359]  kasan_save_alloc_info+0x40/0x58
[   21.833650]  __kasan_mempool_unpoison_object+0x11c/0x180
[   21.833943]  remove_element+0x130/0x1f8
[   21.834217]  mempool_alloc_preallocated+0x58/0xc0
[   21.834540]  mempool_kmalloc_invalid_free_helper+0x94/0x2b0
[   21.834964]  mempool_kmalloc_invalid_free+0xc0/0x118
[   21.835547]  kunit_try_run_case+0x170/0x3f0
[   21.835756]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.836179]  kthread+0x24c/0x2d0
[   21.836444]  ret_from_fork+0x10/0x20
[   21.836739] 
[   21.837451] The buggy address belongs to the object at fff00000c6cf0800
[   21.837451]  which belongs to the cache kmalloc-128 of size 128
[   21.838564] The buggy address is located 1 bytes inside of
[   21.838564]  128-byte region [fff00000c6cf0800, fff00000c6cf0880)
[   21.839688] 
[   21.839923] The buggy address belongs to the physical page:
[   21.840292] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106cf0
[   21.840756] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   21.841118] page_type: f5(slab)
[   21.841365] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   21.841786] raw: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000
[   21.842197] page dumped because: kasan: bad access detected
[   21.842492] 
[   21.842691] Memory state around the buggy address:
[   21.842993]  fff00000c6cf0700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   21.843417]  fff00000c6cf0780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.843858] >fff00000c6cf0800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   21.844488]                    ^
[   21.844773]  fff00000c6cf0880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.845130]  fff00000c6cf0900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   21.845587] ==================================================================

[   13.887013] ==================================================================
[   13.887585] BUG: KASAN: invalid-free in mempool_kmalloc_invalid_free_helper+0x133/0x2e0
[   13.888066] Free of addr ffff888102b90001 by task kunit_try_catch/248
[   13.888470] 
[   13.889006] CPU: 1 UID: 0 PID: 248 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   13.889119] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.889146] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.889187] Call Trace:
[   13.889214]  <TASK>
[   13.889245]  dump_stack_lvl+0x73/0xb0
[   13.889607]  print_report+0xd1/0x640
[   13.889675]  ? __virt_addr_valid+0x1db/0x2d0
[   13.889725]  ? kasan_addr_to_slab+0x11/0xa0
[   13.889766]  ? mempool_kmalloc_invalid_free_helper+0x133/0x2e0
[   13.889813]  kasan_report_invalid_free+0xfc/0x120
[   13.889855]  ? mempool_kmalloc_invalid_free_helper+0x133/0x2e0
[   13.889880]  ? mempool_kmalloc_invalid_free_helper+0x133/0x2e0
[   13.889913]  __kasan_mempool_poison_object+0x102/0x1d0
[   13.889941]  mempool_free+0x2ec/0x380
[   13.889965]  mempool_kmalloc_invalid_free_helper+0x133/0x2e0
[   13.889986]  ? __pfx_mempool_kmalloc_invalid_free_helper+0x10/0x10
[   13.890012]  ? finish_task_switch.isra.0+0x153/0x700
[   13.890037]  mempool_kmalloc_large_invalid_free+0xee/0x140
[   13.890063]  ? __pfx_mempool_kmalloc_large_invalid_free+0x10/0x10
[   13.890132]  ? __pfx_mempool_kmalloc+0x10/0x10
[   13.890167]  ? __pfx_mempool_kfree+0x10/0x10
[   13.890201]  ? __pfx_read_tsc+0x10/0x10
[   13.890230]  ? ktime_get_ts64+0x84/0x230
[   13.890258]  kunit_try_run_case+0x1a6/0x480
[   13.890281]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.890300]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   13.890321]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.890344]  ? __kthread_parkme+0x82/0x160
[   13.890363]  ? preempt_count_sub+0x50/0x80
[   13.890384]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.890403]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.890427]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.890451]  kthread+0x257/0x310
[   13.890470]  ? __pfx_kthread+0x10/0x10
[   13.890489]  ret_from_fork+0x41/0x80
[   13.890507]  ? __pfx_kthread+0x10/0x10
[   13.890525]  ret_from_fork_asm+0x1a/0x30
[   13.890554]  </TASK>
[   13.890567] 
[   13.901302] The buggy address belongs to the physical page:
[   13.901524] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b90
[   13.902847] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   13.903321] flags: 0x200000000000040(head|node=0|zone=2)
[   13.903798] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.904301] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   13.904634] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.905121] head: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   13.905362] head: 0200000000000002 ffffea00040ae401 ffffffffffffffff 0000000000000000
[   13.905837] head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
[   13.906326] page dumped because: kasan: bad access detected
[   13.906880] 
[   13.907048] Memory state around the buggy address:
[   13.907434]  ffff888102b8ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.907764]  ffff888102b8ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.908228] >ffff888102b90000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.908806]                    ^
[   13.909014]  ffff888102b90080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.909405]  ffff888102b90100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.909962] ==================================================================
[   13.856777] ==================================================================
[   13.857255] BUG: KASAN: invalid-free in mempool_kmalloc_invalid_free_helper+0x133/0x2e0
[   13.857816] Free of addr ffff888102631501 by task kunit_try_catch/246
[   13.858040] 
[   13.858267] CPU: 0 UID: 0 PID: 246 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   13.858640] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.858702] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.858747] Call Trace:
[   13.858778]  <TASK>
[   13.858809]  dump_stack_lvl+0x73/0xb0
[   13.858862]  print_report+0xd1/0x640
[   13.858896]  ? __virt_addr_valid+0x1db/0x2d0
[   13.858938]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.858979]  ? mempool_kmalloc_invalid_free_helper+0x133/0x2e0
[   13.859020]  kasan_report_invalid_free+0xfc/0x120
[   13.859068]  ? mempool_kmalloc_invalid_free_helper+0x133/0x2e0
[   13.859116]  ? mempool_kmalloc_invalid_free_helper+0x133/0x2e0
[   13.859154]  ? mempool_kmalloc_invalid_free_helper+0x133/0x2e0
[   13.859204]  check_slab_allocation+0x11f/0x130
[   13.859237]  __kasan_mempool_poison_object+0x91/0x1d0
[   13.859278]  mempool_free+0x2ec/0x380
[   13.859316]  mempool_kmalloc_invalid_free_helper+0x133/0x2e0
[   13.859360]  ? __pfx_mempool_kmalloc_invalid_free_helper+0x10/0x10
[   13.859415]  ? finish_task_switch.isra.0+0x153/0x700
[   13.859459]  mempool_kmalloc_invalid_free+0xee/0x140
[   13.859511]  ? __pfx_mempool_kmalloc_invalid_free+0x10/0x10
[   13.859547]  ? __pfx_mempool_kmalloc+0x10/0x10
[   13.859576]  ? __pfx_mempool_kfree+0x10/0x10
[   13.859612]  ? __pfx_read_tsc+0x10/0x10
[   13.859640]  ? ktime_get_ts64+0x84/0x230
[   13.859688]  kunit_try_run_case+0x1a6/0x480
[   13.859722]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.859748]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   13.859769]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.859792]  ? __kthread_parkme+0x82/0x160
[   13.859811]  ? preempt_count_sub+0x50/0x80
[   13.859831]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.859850]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.859874]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.859898]  kthread+0x257/0x310
[   13.859914]  ? __pfx_kthread+0x10/0x10
[   13.859932]  ret_from_fork+0x41/0x80
[   13.859950]  ? __pfx_kthread+0x10/0x10
[   13.859968]  ret_from_fork_asm+0x1a/0x30
[   13.859996]  </TASK>
[   13.860007] 
[   13.870677] Allocated by task 246:
[   13.870905]  kasan_save_stack+0x45/0x70
[   13.871289]  kasan_save_track+0x18/0x40
[   13.871497]  kasan_save_alloc_info+0x3b/0x50
[   13.871847]  __kasan_mempool_unpoison_object+0x1a9/0x200
[   13.872193]  remove_element+0x11e/0x190
[   13.872510]  mempool_alloc_preallocated+0x4d/0x90
[   13.872772]  mempool_kmalloc_invalid_free_helper+0x84/0x2e0
[   13.873188]  mempool_kmalloc_invalid_free+0xee/0x140
[   13.873389]  kunit_try_run_case+0x1a6/0x480
[   13.873569]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.873951]  kthread+0x257/0x310
[   13.874251]  ret_from_fork+0x41/0x80
[   13.874544]  ret_from_fork_asm+0x1a/0x30
[   13.874819] 
[   13.874943] The buggy address belongs to the object at ffff888102631500
[   13.874943]  which belongs to the cache kmalloc-128 of size 128
[   13.875518] The buggy address is located 1 bytes inside of
[   13.875518]  128-byte region [ffff888102631500, ffff888102631580)
[   13.876181] 
[   13.876357] The buggy address belongs to the physical page:
[   13.876638] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102631
[   13.877076] flags: 0x200000000000000(node=0|zone=2)
[   13.877360] page_type: f5(slab)
[   13.877605] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   13.877963] raw: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000
[   13.878333] page dumped because: kasan: bad access detected
[   13.878603] 
[   13.878780] Memory state around the buggy address:
[   13.879104]  ffff888102631400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.879455]  ffff888102631480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.879872] >ffff888102631500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.880295]                    ^
[   13.880474]  ffff888102631580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.880726]  ffff888102631600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.881181] ==================================================================