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

Environment
qemu-arm64
qemu-x86_64

[   17.537436] ==================================================================
[   17.537493] BUG: KASAN: invalid-free in mempool_kmalloc_invalid_free_helper+0x118/0x2a8
[   17.537549] Free of addr fff00000c7820001 by task kunit_try_catch/243
[   17.537608] 
[   17.537641] CPU: 0 UID: 0 PID: 243 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   17.537731] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.537760] Hardware name: linux,dummy-virt (DT)
[   17.537792] Call trace:
[   17.537813]  show_stack+0x20/0x38 (C)
[   17.537863]  dump_stack_lvl+0x8c/0xd0
[   17.537909]  print_report+0x118/0x5d0
[   17.537956]  kasan_report_invalid_free+0xc0/0xe8
[   17.538014]  __kasan_mempool_poison_object+0xfc/0x150
[   17.538066]  mempool_free+0x28c/0x328
[   17.538110]  mempool_kmalloc_invalid_free_helper+0x118/0x2a8
[   17.538171]  mempool_kmalloc_large_invalid_free+0xc0/0x118
[   17.538233]  kunit_try_run_case+0x170/0x3f0
[   17.538281]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.539154]  kthread+0x328/0x630
[   17.539256]  ret_from_fork+0x10/0x20
[   17.539350] 
[   17.539688] The buggy address belongs to the physical page:
[   17.539737] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107820
[   17.539826] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   17.539893] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   17.540436] page_type: f8(unknown)
[   17.540516] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   17.540625] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   17.540732] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   17.541078] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   17.541177] head: 0bfffe0000000002 ffffc1ffc31e0801 00000000ffffffff 00000000ffffffff
[   17.541381] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   17.541515] page dumped because: kasan: bad access detected
[   17.541596] 
[   17.541738] Memory state around the buggy address:
[   17.541839]  fff00000c781ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.542243]  fff00000c781ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.542384] >fff00000c7820000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.542508]                    ^
[   17.542601]  fff00000c7820080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.542770]  fff00000c7820100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.542849] ==================================================================
[   17.519933] ==================================================================
[   17.520045] BUG: KASAN: invalid-free in mempool_kmalloc_invalid_free_helper+0x118/0x2a8
[   17.520099] Free of addr fff00000c7711d01 by task kunit_try_catch/241
[   17.520144] 
[   17.520368] CPU: 0 UID: 0 PID: 241 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   17.520465] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.520493] Hardware name: linux,dummy-virt (DT)
[   17.520634] Call trace:
[   17.520911]  show_stack+0x20/0x38 (C)
[   17.521016]  dump_stack_lvl+0x8c/0xd0
[   17.521072]  print_report+0x118/0x5d0
[   17.521485]  kasan_report_invalid_free+0xc0/0xe8
[   17.521635]  check_slab_allocation+0xfc/0x108
[   17.521778]  __kasan_mempool_poison_object+0x78/0x150
[   17.521886]  mempool_free+0x28c/0x328
[   17.521961]  mempool_kmalloc_invalid_free_helper+0x118/0x2a8
[   17.522466]  mempool_kmalloc_invalid_free+0xc0/0x118
[   17.522563]  kunit_try_run_case+0x170/0x3f0
[   17.522699]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.522875]  kthread+0x328/0x630
[   17.522998]  ret_from_fork+0x10/0x20
[   17.523050] 
[   17.523348] Allocated by task 241:
[   17.523655]  kasan_save_stack+0x3c/0x68
[   17.523732]  kasan_save_track+0x20/0x40
[   17.523845]  kasan_save_alloc_info+0x40/0x58
[   17.523977]  __kasan_mempool_unpoison_object+0x11c/0x180
[   17.524024]  remove_element+0x130/0x1f8
[   17.524353]  mempool_alloc_preallocated+0x58/0xc0
[   17.524443]  mempool_kmalloc_invalid_free_helper+0x94/0x2a8
[   17.524540]  mempool_kmalloc_invalid_free+0xc0/0x118
[   17.524640]  kunit_try_run_case+0x170/0x3f0
[   17.524702]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.525008]  kthread+0x328/0x630
[   17.525143]  ret_from_fork+0x10/0x20
[   17.525286] 
[   17.525367] The buggy address belongs to the object at fff00000c7711d00
[   17.525367]  which belongs to the cache kmalloc-128 of size 128
[   17.525516] The buggy address is located 1 bytes inside of
[   17.525516]  128-byte region [fff00000c7711d00, fff00000c7711d80)
[   17.525633] 
[   17.525679] The buggy address belongs to the physical page:
[   17.525713] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107711
[   17.525767] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.525817] page_type: f5(slab)
[   17.526300] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   17.526395] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.526559] page dumped because: kasan: bad access detected
[   17.526668] 
[   17.527060] Memory state around the buggy address:
[   17.527127]  fff00000c7711c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.527196]  fff00000c7711c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.527371] >fff00000c7711d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.527514]                    ^
[   17.527585]  fff00000c7711d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.527663]  fff00000c7711e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.528011] ==================================================================

[   13.915669] ==================================================================
[   13.916353] BUG: KASAN: invalid-free in mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.916626] Free of addr ffff888103a6c001 by task kunit_try_catch/262
[   13.916826] 
[   13.916914] CPU: 0 UID: 0 PID: 262 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   13.916965] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.916977] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.916997] Call Trace:
[   13.917010]  <TASK>
[   13.917025]  dump_stack_lvl+0x73/0xb0
[   13.917056]  print_report+0xd1/0x610
[   13.917077]  ? __virt_addr_valid+0x1db/0x2d0
[   13.917102]  ? kasan_addr_to_slab+0x11/0xa0
[   13.917122]  ? mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.917149]  kasan_report_invalid_free+0x10a/0x130
[   13.917174]  ? mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.917202]  ? mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.917228]  __kasan_mempool_poison_object+0x102/0x1d0
[   13.917252]  mempool_free+0x2ec/0x380
[   13.917278]  mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.918339]  ? __pfx_mempool_kmalloc_invalid_free_helper+0x10/0x10
[   13.918378]  ? __pfx_sched_clock_cpu+0x10/0x10
[   13.918404]  ? finish_task_switch.isra.0+0x153/0x700
[   13.918430]  mempool_kmalloc_large_invalid_free+0xed/0x140
[   13.918475]  ? __pfx_mempool_kmalloc_large_invalid_free+0x10/0x10
[   13.918504]  ? __pfx_mempool_kmalloc+0x10/0x10
[   13.918527]  ? __pfx_mempool_kfree+0x10/0x10
[   13.918552]  ? __pfx_read_tsc+0x10/0x10
[   13.918573]  ? ktime_get_ts64+0x86/0x230
[   13.918598]  kunit_try_run_case+0x1a5/0x480
[   13.918623]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.918646]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.918672]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.918696]  ? __kthread_parkme+0x82/0x180
[   13.918718]  ? preempt_count_sub+0x50/0x80
[   13.918741]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.918764]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.918788]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.918812]  kthread+0x337/0x6f0
[   13.918831]  ? trace_preempt_on+0x20/0xc0
[   13.918855]  ? __pfx_kthread+0x10/0x10
[   13.918875]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.918896]  ? calculate_sigpending+0x7b/0xa0
[   13.918920]  ? __pfx_kthread+0x10/0x10
[   13.918940]  ret_from_fork+0x116/0x1d0
[   13.918958]  ? __pfx_kthread+0x10/0x10
[   13.918978]  ret_from_fork_asm+0x1a/0x30
[   13.919028]  </TASK>
[   13.919038] 
[   13.939645] The buggy address belongs to the physical page:
[   13.939896] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a6c
[   13.940328] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   13.940703] flags: 0x200000000000040(head|node=0|zone=2)
[   13.940986] page_type: f8(unknown)
[   13.941264] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.941546] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   13.941830] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.942260] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   13.942584] head: 0200000000000002 ffffea00040e9b01 00000000ffffffff 00000000ffffffff
[   13.942937] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   13.943390] page dumped because: kasan: bad access detected
[   13.943666] 
[   13.943759] Memory state around the buggy address:
[   13.943984]  ffff888103a6bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.944395]  ffff888103a6bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.944750] >ffff888103a6c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.945132]                    ^
[   13.945310]  ffff888103a6c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.945675]  ffff888103a6c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.945930] ==================================================================
[   13.879652] ==================================================================
[   13.880440] BUG: KASAN: invalid-free in mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.880791] Free of addr ffff8881039ee101 by task kunit_try_catch/260
[   13.881087] 
[   13.881415] CPU: 1 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   13.881464] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.881476] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.881497] Call Trace:
[   13.881509]  <TASK>
[   13.881522]  dump_stack_lvl+0x73/0xb0
[   13.881550]  print_report+0xd1/0x610
[   13.881593]  ? __virt_addr_valid+0x1db/0x2d0
[   13.881616]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.881650]  ? mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.881677]  kasan_report_invalid_free+0x10a/0x130
[   13.881701]  ? mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.881729]  ? mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.881754]  ? mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.881779]  check_slab_allocation+0x11f/0x130
[   13.881810]  __kasan_mempool_poison_object+0x91/0x1d0
[   13.881834]  mempool_free+0x2ec/0x380
[   13.881860]  mempool_kmalloc_invalid_free_helper+0x132/0x2e0
[   13.881897]  ? __pfx_mempool_kmalloc_invalid_free_helper+0x10/0x10
[   13.881923]  ? update_load_avg+0x1be/0x21b0
[   13.881949]  ? finish_task_switch.isra.0+0x153/0x700
[   13.881984]  mempool_kmalloc_invalid_free+0xed/0x140
[   13.882008]  ? __pfx_mempool_kmalloc_invalid_free+0x10/0x10
[   13.882034]  ? __pfx_mempool_kmalloc+0x10/0x10
[   13.882067]  ? __pfx_mempool_kfree+0x10/0x10
[   13.882091]  ? __pfx_read_tsc+0x10/0x10
[   13.882216]  ? ktime_get_ts64+0x86/0x230
[   13.882244]  kunit_try_run_case+0x1a5/0x480
[   13.882268]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.882291]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.882327]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.882350]  ? __kthread_parkme+0x82/0x180
[   13.882371]  ? preempt_count_sub+0x50/0x80
[   13.882394]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.882418]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.882442]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.882466]  kthread+0x337/0x6f0
[   13.882495]  ? trace_preempt_on+0x20/0xc0
[   13.882518]  ? __pfx_kthread+0x10/0x10
[   13.882538]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.882559]  ? calculate_sigpending+0x7b/0xa0
[   13.882583]  ? __pfx_kthread+0x10/0x10
[   13.882604]  ret_from_fork+0x116/0x1d0
[   13.882622]  ? __pfx_kthread+0x10/0x10
[   13.882642]  ret_from_fork_asm+0x1a/0x30
[   13.882671]  </TASK>
[   13.882682] 
[   13.899167] Allocated by task 260:
[   13.899613]  kasan_save_stack+0x45/0x70
[   13.899919]  kasan_save_track+0x18/0x40
[   13.900191]  kasan_save_alloc_info+0x3b/0x50
[   13.900696]  __kasan_mempool_unpoison_object+0x1a9/0x200
[   13.901280]  remove_element+0x11e/0x190
[   13.901548]  mempool_alloc_preallocated+0x4d/0x90
[   13.901887]  mempool_kmalloc_invalid_free_helper+0x83/0x2e0
[   13.902234]  mempool_kmalloc_invalid_free+0xed/0x140
[   13.902832]  kunit_try_run_case+0x1a5/0x480
[   13.903323]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.903782]  kthread+0x337/0x6f0
[   13.903966]  ret_from_fork+0x116/0x1d0
[   13.904354]  ret_from_fork_asm+0x1a/0x30
[   13.904519] 
[   13.904697] The buggy address belongs to the object at ffff8881039ee100
[   13.904697]  which belongs to the cache kmalloc-128 of size 128
[   13.905955] The buggy address is located 1 bytes inside of
[   13.905955]  128-byte region [ffff8881039ee100, ffff8881039ee180)
[   13.906901] 
[   13.907094] The buggy address belongs to the physical page:
[   13.907459] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039ee
[   13.908187] flags: 0x200000000000000(node=0|zone=2)
[   13.908367] page_type: f5(slab)
[   13.908489] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   13.908724] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   13.908961] page dumped because: kasan: bad access detected
[   13.909148] 
[   13.909215] Memory state around the buggy address:
[   13.909507]  ffff8881039ee000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.909898]  ffff8881039ee080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.910349] >ffff8881039ee100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.910883]                    ^
[   13.911001]  ffff8881039ee180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.911346]  ffff8881039ee200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.911756] ==================================================================