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

Environment
qemu-arm64
qemu-x86_64

[   27.144066] ==================================================================
[   27.145173] BUG: KASAN: invalid-free in mempool_kmalloc_invalid_free_helper+0x118/0x2a8
[   27.145327] Free of addr fff00000c5a7b601 by task kunit_try_catch/243
[   27.145782] 
[   27.145904] CPU: 1 UID: 0 PID: 243 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc2 #1 PREEMPT 
[   27.147652] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.147724] Hardware name: linux,dummy-virt (DT)
[   27.149641] Call trace:
[   27.149792]  show_stack+0x20/0x38 (C)
[   27.149950]  dump_stack_lvl+0x8c/0xd0
[   27.150076]  print_report+0x118/0x608
[   27.150204]  kasan_report_invalid_free+0xc0/0xe8
[   27.150998]  check_slab_allocation+0xfc/0x108
[   27.152145]  __kasan_mempool_poison_object+0x78/0x150
[   27.152324]  mempool_free+0x28c/0x328
[   27.152488]  mempool_kmalloc_invalid_free_helper+0x118/0x2a8
[   27.152639]  mempool_kmalloc_invalid_free+0xc0/0x118
[   27.152777]  kunit_try_run_case+0x170/0x3f0
[   27.153788]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.154502]  kthread+0x328/0x630
[   27.154642]  ret_from_fork+0x10/0x20
[   27.154948] 
[   27.155118] Allocated by task 243:
[   27.155190]  kasan_save_stack+0x3c/0x68
[   27.155288]  kasan_save_track+0x20/0x40
[   27.156192]  kasan_save_alloc_info+0x40/0x58
[   27.156571]  __kasan_mempool_unpoison_object+0x11c/0x180
[   27.156684]  remove_element+0x130/0x1f8
[   27.157213]  mempool_alloc_preallocated+0x58/0xc0
[   27.157343]  mempool_kmalloc_invalid_free_helper+0x94/0x2a8
[   27.157463]  mempool_kmalloc_invalid_free+0xc0/0x118
[   27.157516]  kunit_try_run_case+0x170/0x3f0
[   27.157572]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.157689]  kthread+0x328/0x630
[   27.157781]  ret_from_fork+0x10/0x20
[   27.158128] 
[   27.158531] The buggy address belongs to the object at fff00000c5a7b600
[   27.158531]  which belongs to the cache kmalloc-128 of size 128
[   27.158680] The buggy address is located 1 bytes inside of
[   27.158680]  128-byte region [fff00000c5a7b600, fff00000c5a7b680)
[   27.159495] 
[   27.159569] The buggy address belongs to the physical page:
[   27.159650] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a7b
[   27.159846] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   27.160044] page_type: f5(slab)
[   27.160847] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   27.161004] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   27.161111] page dumped because: kasan: bad access detected
[   27.161186] 
[   27.161231] Memory state around the buggy address:
[   27.161334]  fff00000c5a7b500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   27.161475]  fff00000c5a7b580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.161605] >fff00000c5a7b600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   27.161729]                    ^
[   27.161799]  fff00000c5a7b680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.161915]  fff00000c5a7b700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   27.162047] ==================================================================
[   27.179916] ==================================================================
[   27.180049] BUG: KASAN: invalid-free in mempool_kmalloc_invalid_free_helper+0x118/0x2a8
[   27.180329] Free of addr fff00000c78b0001 by task kunit_try_catch/245
[   27.180562] 
[   27.181239] CPU: 1 UID: 0 PID: 245 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc2 #1 PREEMPT 
[   27.181481] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.181646] Hardware name: linux,dummy-virt (DT)
[   27.181731] Call trace:
[   27.181842]  show_stack+0x20/0x38 (C)
[   27.181999]  dump_stack_lvl+0x8c/0xd0
[   27.182355]  print_report+0x118/0x608
[   27.182539]  kasan_report_invalid_free+0xc0/0xe8
[   27.182765]  __kasan_mempool_poison_object+0xfc/0x150
[   27.182893]  mempool_free+0x28c/0x328
[   27.183010]  mempool_kmalloc_invalid_free_helper+0x118/0x2a8
[   27.183146]  mempool_kmalloc_large_invalid_free+0xc0/0x118
[   27.183642]  kunit_try_run_case+0x170/0x3f0
[   27.183838]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.184151]  kthread+0x328/0x630
[   27.184297]  ret_from_fork+0x10/0x20
[   27.184460] 
[   27.184518] The buggy address belongs to the physical page:
[   27.184666] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078b0
[   27.184840] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   27.185069] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   27.185224] page_type: f8(unknown)
[   27.185428] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   27.185647] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   27.185807] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   27.185935] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   27.186064] head: 0bfffe0000000002 ffffc1ffc31e2c01 00000000ffffffff 00000000ffffffff
[   27.186192] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   27.186300] page dumped because: kasan: bad access detected
[   27.186413] 
[   27.186467] Memory state around the buggy address:
[   27.186609]  fff00000c78aff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.186784]  fff00000c78aff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.187133] >fff00000c78b0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   27.187269]                    ^
[   27.187491]  fff00000c78b0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   27.187747]  fff00000c78b0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   27.187849] ==================================================================

[   13.713113] ==================================================================
[   13.713599] BUG: KASAN: invalid-free in mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.714117] Free of addr ffff8881029daf01 by task kunit_try_catch/261
[   13.714404] 
[   13.714554] CPU: 1 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc2 #1 PREEMPT(voluntary) 
[   13.714672] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.714701] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.714750] Call Trace:
[   13.714773]  <TASK>
[   13.714803]  dump_stack_lvl+0x73/0xb0
[   13.714845]  print_report+0xd1/0x650
[   13.714877]  ? __virt_addr_valid+0x1db/0x2d0
[   13.714910]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.714944]  ? mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.714968]  kasan_report_invalid_free+0x10a/0x130
[   13.714991]  ? mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.715016]  ? mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.715038]  ? mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.715060]  check_slab_allocation+0x11f/0x130
[   13.715080]  __kasan_mempool_poison_object+0x91/0x1d0
[   13.715103]  mempool_free+0x2ec/0x380
[   13.715127]  mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.715150]  ? __pfx_mempool_kmalloc_invalid_free_helper+0x10/0x10
[   13.715173]  ? update_load_avg+0x1be/0x21b0
[   13.715192]  ? dequeue_entities+0x27e/0x1740
[   13.715213]  ? finish_task_switch.isra.0+0x153/0x700
[   13.715237]  mempool_kmalloc_invalid_free+0xed/0x140
[   13.715261]  ? __pfx_mempool_kmalloc_invalid_free+0x10/0x10
[   13.715282]  ? dequeue_task_fair+0x166/0x4e0
[   13.715303]  ? __pfx_mempool_kmalloc+0x10/0x10
[   13.715320]  ? __pfx_mempool_kfree+0x10/0x10
[   13.715341]  ? __pfx_read_tsc+0x10/0x10
[   13.715359]  ? ktime_get_ts64+0x86/0x230
[   13.715383]  kunit_try_run_case+0x1a5/0x480
[   13.715408]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.715427]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.715451]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.715472]  ? __kthread_parkme+0x82/0x180
[   13.715494]  ? preempt_count_sub+0x50/0x80
[   13.715517]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.715539]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.715561]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.715582]  kthread+0x337/0x6f0
[   13.715599]  ? trace_preempt_on+0x20/0xc0
[   13.715769]  ? __pfx_kthread+0x10/0x10
[   13.715814]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.715850]  ? calculate_sigpending+0x7b/0xa0
[   13.715882]  ? __pfx_kthread+0x10/0x10
[   13.715912]  ret_from_fork+0x41/0x80
[   13.715946]  ? __pfx_kthread+0x10/0x10
[   13.715976]  ret_from_fork_asm+0x1a/0x30
[   13.716027]  </TASK>
[   13.716051] 
[   13.731064] Allocated by task 261:
[   13.731564]  kasan_save_stack+0x45/0x70
[   13.731908]  kasan_save_track+0x18/0x40
[   13.732145]  kasan_save_alloc_info+0x3b/0x50
[   13.732477]  __kasan_mempool_unpoison_object+0x1a9/0x200
[   13.732944]  remove_element+0x11e/0x190
[   13.733255]  mempool_alloc_preallocated+0x4d/0x90
[   13.733434]  mempool_kmalloc_invalid_free_helper+0x83/0x2e0
[   13.734032]  mempool_kmalloc_invalid_free+0xed/0x140
[   13.734228]  kunit_try_run_case+0x1a5/0x480
[   13.735117]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.735468]  kthread+0x337/0x6f0
[   13.735941]  ret_from_fork+0x41/0x80
[   13.736099]  ret_from_fork_asm+0x1a/0x30
[   13.736371] 
[   13.736514] The buggy address belongs to the object at ffff8881029daf00
[   13.736514]  which belongs to the cache kmalloc-128 of size 128
[   13.737076] The buggy address is located 1 bytes inside of
[   13.737076]  128-byte region [ffff8881029daf00, ffff8881029daf80)
[   13.737531] 
[   13.738325] The buggy address belongs to the physical page:
[   13.738778] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029da
[   13.739127] flags: 0x200000000000000(node=0|zone=2)
[   13.739707] page_type: f5(slab)
[   13.739869] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   13.740048] raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
[   13.740219] page dumped because: kasan: bad access detected
[   13.740325] 
[   13.740593] Memory state around the buggy address:
[   13.740961]  ffff8881029dae00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.741390]  ffff8881029dae80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.741771] >ffff8881029daf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.742092]                    ^
[   13.742354]  ffff8881029daf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.742921]  ffff8881029db000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.743439] ==================================================================
[   13.750939] ==================================================================
[   13.751427] BUG: KASAN: invalid-free in mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.752001] Free of addr ffff888103b04001 by task kunit_try_catch/263
[   13.752428] 
[   13.752567] CPU: 1 UID: 0 PID: 263 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc2 #1 PREEMPT(voluntary) 
[   13.752671] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.752694] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.752735] Call Trace:
[   13.752763]  <TASK>
[   13.752801]  dump_stack_lvl+0x73/0xb0
[   13.752860]  print_report+0xd1/0x650
[   13.752908]  ? __virt_addr_valid+0x1db/0x2d0
[   13.752946]  ? kasan_addr_to_slab+0x11/0xa0
[   13.752977]  ? mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.753015]  kasan_report_invalid_free+0x10a/0x130
[   13.753053]  ? mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.753101]  ? mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.753143]  __kasan_mempool_poison_object+0x102/0x1d0
[   13.753191]  mempool_free+0x2ec/0x380
[   13.753242]  mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.753292]  ? __pfx_mempool_kmalloc_invalid_free_helper+0x10/0x10
[   13.753337]  ? update_load_avg+0x1be/0x21b0
[   13.753372]  ? dequeue_entities+0x27e/0x1740
[   13.753418]  ? finish_task_switch.isra.0+0x153/0x700
[   13.753462]  mempool_kmalloc_large_invalid_free+0xed/0x140
[   13.753504]  ? __pfx_mempool_kmalloc_large_invalid_free+0x10/0x10
[   13.753546]  ? dequeue_task_fair+0x166/0x4e0
[   13.753582]  ? __pfx_mempool_kmalloc+0x10/0x10
[   13.753614]  ? __pfx_mempool_kfree+0x10/0x10
[   13.753666]  ? __pfx_read_tsc+0x10/0x10
[   13.753705]  ? ktime_get_ts64+0x86/0x230
[   13.753746]  kunit_try_run_case+0x1a5/0x480
[   13.753788]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.753821]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.753859]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.753948]  ? __kthread_parkme+0x82/0x180
[   13.753996]  ? preempt_count_sub+0x50/0x80
[   13.754048]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.754091]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.754116]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.754138]  kthread+0x337/0x6f0
[   13.754154]  ? trace_preempt_on+0x20/0xc0
[   13.754178]  ? __pfx_kthread+0x10/0x10
[   13.754194]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.754214]  ? calculate_sigpending+0x7b/0xa0
[   13.754234]  ? __pfx_kthread+0x10/0x10
[   13.754252]  ret_from_fork+0x41/0x80
[   13.754270]  ? __pfx_kthread+0x10/0x10
[   13.754287]  ret_from_fork_asm+0x1a/0x30
[   13.754316]  </TASK>
[   13.754328] 
[   13.763725] The buggy address belongs to the physical page:
[   13.764246] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103b04
[   13.764812] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   13.765155] flags: 0x200000000000040(head|node=0|zone=2)
[   13.765383] page_type: f8(unknown)
[   13.765568] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.766080] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   13.766512] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.766919] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   13.767223] head: 0200000000000002 ffffea00040ec101 00000000ffffffff 00000000ffffffff
[   13.767470] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   13.768043] page dumped because: kasan: bad access detected
[   13.768396] 
[   13.768493] Memory state around the buggy address:
[   13.768902]  ffff888103b03f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.769208]  ffff888103b03f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.769510] >ffff888103b04000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.769940]                    ^
[   13.770164]  ffff888103b04080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.770458]  ffff888103b04100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.771040] ==================================================================