Hay
Date
July 23, 2025, 3:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   32.586762] ==================================================================
[   32.586830] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x314/0x340
[   32.586913] Read of size 1 at addr fff00000c9bd9600 by task kunit_try_catch/260
[   32.587135] 
[   32.587187] CPU: 1 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc7-next-20250723 #1 PREEMPT 
[   32.587388] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   32.587450] Hardware name: linux,dummy-virt (DT)
[   32.587485] Call trace:
[   32.587602]  show_stack+0x20/0x38 (C)
[   32.587670]  dump_stack_lvl+0x8c/0xd0
[   32.587934]  print_report+0x118/0x5e8
[   32.588000]  kasan_report+0xdc/0x128
[   32.588052]  __asan_report_load1_noabort+0x20/0x30
[   32.588103]  mempool_uaf_helper+0x314/0x340
[   32.588164]  mempool_kmalloc_uaf+0xc4/0x120
[   32.588286]  kunit_try_run_case+0x170/0x3f0
[   32.588362]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.588415]  kthread+0x328/0x630
[   32.588517]  ret_from_fork+0x10/0x20
[   32.588629] 
[   32.588677] Allocated by task 260:
[   32.588886]  kasan_save_stack+0x3c/0x68
[   32.588951]  kasan_save_track+0x20/0x40
[   32.589036]  kasan_save_alloc_info+0x40/0x58
[   32.589117]  __kasan_mempool_unpoison_object+0x11c/0x180
[   32.589574]  remove_element+0x130/0x1f8
[   32.589761]  mempool_alloc_preallocated+0x58/0xc0
[   32.589817]  mempool_uaf_helper+0xa4/0x340
[   32.589864]  mempool_kmalloc_uaf+0xc4/0x120
[   32.590201]  kunit_try_run_case+0x170/0x3f0
[   32.590309]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.590444]  kthread+0x328/0x630
[   32.590503]  ret_from_fork+0x10/0x20
[   32.590583] 
[   32.590664] Freed by task 260:
[   32.590803]  kasan_save_stack+0x3c/0x68
[   32.590872]  kasan_save_track+0x20/0x40
[   32.590922]  kasan_save_free_info+0x4c/0x78
[   32.591088]  __kasan_mempool_poison_object+0xc0/0x150
[   32.591147]  mempool_free+0x3f4/0x5f0
[   32.591196]  mempool_uaf_helper+0x104/0x340
[   32.591242]  mempool_kmalloc_uaf+0xc4/0x120
[   32.591300]  kunit_try_run_case+0x170/0x3f0
[   32.591366]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.591407]  kthread+0x328/0x630
[   32.591441]  ret_from_fork+0x10/0x20
[   32.591476] 
[   32.591506] The buggy address belongs to the object at fff00000c9bd9600
[   32.591506]  which belongs to the cache kmalloc-128 of size 128
[   32.591576] The buggy address is located 0 bytes inside of
[   32.591576]  freed 128-byte region [fff00000c9bd9600, fff00000c9bd9680)
[   32.591637] 
[   32.591667] The buggy address belongs to the physical page:
[   32.591705] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109bd9
[   32.591762] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   32.591813] page_type: f5(slab)
[   32.591851] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   32.591914] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   32.591957] page dumped because: kasan: bad access detected
[   32.591985] 
[   32.592015] Memory state around the buggy address:
[   32.592056]  fff00000c9bd9500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   32.592101]  fff00000c9bd9580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.592153] >fff00000c9bd9600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   32.592192]                    ^
[   32.592230]  fff00000c9bd9680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.592278]  fff00000c9bd9700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   32.592326] ==================================================================
[   32.614681] ==================================================================
[   32.614748] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x314/0x340
[   32.614800] Read of size 1 at addr fff00000c9c29240 by task kunit_try_catch/264
[   32.614894] 
[   32.616209] CPU: 1 UID: 0 PID: 264 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc7-next-20250723 #1 PREEMPT 
[   32.616328] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   32.616365] Hardware name: linux,dummy-virt (DT)
[   32.616407] Call trace:
[   32.616497]  show_stack+0x20/0x38 (C)
[   32.616627]  dump_stack_lvl+0x8c/0xd0
[   32.616724]  print_report+0x118/0x5e8
[   32.616802]  kasan_report+0xdc/0x128
[   32.617194]  __asan_report_load1_noabort+0x20/0x30
[   32.617279]  mempool_uaf_helper+0x314/0x340
[   32.617394]  mempool_slab_uaf+0xc0/0x118
[   32.617504]  kunit_try_run_case+0x170/0x3f0
[   32.617592]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.617719]  kthread+0x328/0x630
[   32.617795]  ret_from_fork+0x10/0x20
[   32.617931] 
[   32.617953] Allocated by task 264:
[   32.617991]  kasan_save_stack+0x3c/0x68
[   32.618331]  kasan_save_track+0x20/0x40
[   32.618396]  kasan_save_alloc_info+0x40/0x58
[   32.618436]  __kasan_mempool_unpoison_object+0xbc/0x180
[   32.618477]  remove_element+0x16c/0x1f8
[   32.618519]  mempool_alloc_preallocated+0x58/0xc0
[   32.618598]  mempool_uaf_helper+0xa4/0x340
[   32.618645]  mempool_slab_uaf+0xc0/0x118
[   32.618689]  kunit_try_run_case+0x170/0x3f0
[   32.618727]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.618770]  kthread+0x328/0x630
[   32.618802]  ret_from_fork+0x10/0x20
[   32.618849] 
[   32.618868] Freed by task 264:
[   32.618911]  kasan_save_stack+0x3c/0x68
[   32.618948]  kasan_save_track+0x20/0x40
[   32.618992]  kasan_save_free_info+0x4c/0x78
[   32.619029]  __kasan_mempool_poison_object+0xc0/0x150
[   32.619077]  mempool_free+0x3f4/0x5f0
[   32.619115]  mempool_uaf_helper+0x104/0x340
[   32.619163]  mempool_slab_uaf+0xc0/0x118
[   32.619200]  kunit_try_run_case+0x170/0x3f0
[   32.619237]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.619281]  kthread+0x328/0x630
[   32.619329]  ret_from_fork+0x10/0x20
[   32.619371] 
[   32.619392] The buggy address belongs to the object at fff00000c9c29240
[   32.619392]  which belongs to the cache test_cache of size 123
[   32.619470] The buggy address is located 0 bytes inside of
[   32.619470]  freed 123-byte region [fff00000c9c29240, fff00000c9c292bb)
[   32.619542] 
[   32.619562] The buggy address belongs to the physical page:
[   32.619611] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109c29
[   32.619676] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   32.619728] page_type: f5(slab)
[   32.619773] raw: 0bfffe0000000000 fff00000c1b0d8c0 dead000000000122 0000000000000000
[   32.619831] raw: 0000000000000000 0000000080150015 00000000f5000000 0000000000000000
[   32.619872] page dumped because: kasan: bad access detected
[   32.620375] 
[   32.620427] Memory state around the buggy address:
[   32.620719]  fff00000c9c29100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   32.621314]  fff00000c9c29180: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   32.621385] >fff00000c9c29200: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
[   32.621481]                                            ^
[   32.621521]  fff00000c9c29280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   32.621563]  fff00000c9c29300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.621601] ==================================================================

[   26.826001] ==================================================================
[   26.826627] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x392/0x400
[   26.827035] Read of size 1 at addr ffff8881060a7240 by task kunit_try_catch/280
[   26.827433] 
[   26.827559] CPU: 1 UID: 0 PID: 280 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250723 #1 PREEMPT(voluntary) 
[   26.827655] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.827670] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   26.827704] Call Trace:
[   26.827718]  <TASK>
[   26.827739]  dump_stack_lvl+0x73/0xb0
[   26.827772]  print_report+0xd1/0x640
[   26.827825]  ? __virt_addr_valid+0x1db/0x2d0
[   26.827852]  ? mempool_uaf_helper+0x392/0x400
[   26.827874]  ? kasan_complete_mode_report_info+0x64/0x200
[   26.827913]  ? mempool_uaf_helper+0x392/0x400
[   26.827952]  kasan_report+0x141/0x180
[   26.827975]  ? mempool_uaf_helper+0x392/0x400
[   26.828001]  __asan_report_load1_noabort+0x18/0x20
[   26.828026]  mempool_uaf_helper+0x392/0x400
[   26.828050]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   26.828104]  ? finish_task_switch.isra.0+0x153/0x700
[   26.828131]  mempool_slab_uaf+0xea/0x140
[   26.828170]  ? __pfx_mempool_slab_uaf+0x10/0x10
[   26.828196]  ? __pfx_mempool_alloc_slab+0x10/0x10
[   26.828224]  ? __pfx_mempool_free_slab+0x10/0x10
[   26.828268]  ? __pfx_read_tsc+0x10/0x10
[   26.828300]  ? ktime_get_ts64+0x86/0x230
[   26.828325]  kunit_try_run_case+0x1a5/0x480
[   26.828547]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.828581]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   26.828610]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   26.828636]  ? __kthread_parkme+0x82/0x180
[   26.828657]  ? preempt_count_sub+0x50/0x80
[   26.828681]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.828707]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.828732]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   26.828757]  kthread+0x337/0x6f0
[   26.828778]  ? trace_preempt_on+0x20/0xc0
[   26.828803]  ? __pfx_kthread+0x10/0x10
[   26.828825]  ? _raw_spin_unlock_irq+0x47/0x80
[   26.828849]  ? calculate_sigpending+0x7b/0xa0
[   26.828873]  ? __pfx_kthread+0x10/0x10
[   26.828894]  ret_from_fork+0x116/0x1d0
[   26.828915]  ? __pfx_kthread+0x10/0x10
[   26.828962]  ret_from_fork_asm+0x1a/0x30
[   26.828994]  </TASK>
[   26.829007] 
[   26.838225] Allocated by task 280:
[   26.838418]  kasan_save_stack+0x45/0x70
[   26.838761]  kasan_save_track+0x18/0x40
[   26.839000]  kasan_save_alloc_info+0x3b/0x50
[   26.839263]  __kasan_mempool_unpoison_object+0x1bb/0x200
[   26.839542]  remove_element+0x11e/0x190
[   26.839753]  mempool_alloc_preallocated+0x4d/0x90
[   26.840036]  mempool_uaf_helper+0x96/0x400
[   26.840271]  mempool_slab_uaf+0xea/0x140
[   26.840661]  kunit_try_run_case+0x1a5/0x480
[   26.840904]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.841183]  kthread+0x337/0x6f0
[   26.841354]  ret_from_fork+0x116/0x1d0
[   26.841506]  ret_from_fork_asm+0x1a/0x30
[   26.841678] 
[   26.841772] Freed by task 280:
[   26.841921]  kasan_save_stack+0x45/0x70
[   26.842117]  kasan_save_track+0x18/0x40
[   26.842311]  kasan_save_free_info+0x3f/0x60
[   26.842472]  __kasan_mempool_poison_object+0x131/0x1d0
[   26.842629]  mempool_free+0x490/0x640
[   26.842801]  mempool_uaf_helper+0x11a/0x400
[   26.843000]  mempool_slab_uaf+0xea/0x140
[   26.843337]  kunit_try_run_case+0x1a5/0x480
[   26.843653]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.843909]  kthread+0x337/0x6f0
[   26.844089]  ret_from_fork+0x116/0x1d0
[   26.844228]  ret_from_fork_asm+0x1a/0x30
[   26.844509] 
[   26.844608] The buggy address belongs to the object at ffff8881060a7240
[   26.844608]  which belongs to the cache test_cache of size 123
[   26.845299] The buggy address is located 0 bytes inside of
[   26.845299]  freed 123-byte region [ffff8881060a7240, ffff8881060a72bb)
[   26.845992] 
[   26.846099] The buggy address belongs to the physical page:
[   26.846365] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1060a7
[   26.846713] flags: 0x200000000000000(node=0|zone=2)
[   26.846915] page_type: f5(slab)
[   26.847074] raw: 0200000000000000 ffff888101242dc0 dead000000000122 0000000000000000
[   26.847455] raw: 0000000000000000 0000000080150015 00000000f5000000 0000000000000000
[   26.847702] page dumped because: kasan: bad access detected
[   26.847930] 
[   26.848018] Memory state around the buggy address:
[   26.848248]  ffff8881060a7100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   26.848865]  ffff8881060a7180: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   26.849218] >ffff8881060a7200: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
[   26.849664]                                            ^
[   26.849898]  ffff8881060a7280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   26.850230]  ffff8881060a7300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.850678] ==================================================================
[   26.756311] ==================================================================
[   26.758052] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x392/0x400
[   26.758343] Read of size 1 at addr ffff888104964d00 by task kunit_try_catch/276
[   26.758567] 
[   26.758657] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250723 #1 PREEMPT(voluntary) 
[   26.758713] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.758727] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   26.758750] Call Trace:
[   26.758764]  <TASK>
[   26.758784]  dump_stack_lvl+0x73/0xb0
[   26.758816]  print_report+0xd1/0x640
[   26.758840]  ? __virt_addr_valid+0x1db/0x2d0
[   26.758867]  ? mempool_uaf_helper+0x392/0x400
[   26.758889]  ? kasan_complete_mode_report_info+0x64/0x200
[   26.758915]  ? mempool_uaf_helper+0x392/0x400
[   26.758994]  kasan_report+0x141/0x180
[   26.759022]  ? mempool_uaf_helper+0x392/0x400
[   26.759050]  __asan_report_load1_noabort+0x18/0x20
[   26.759075]  mempool_uaf_helper+0x392/0x400
[   26.759098]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   26.759286]  ? dequeue_entities+0x23f/0x1630
[   26.759455]  ? __kasan_check_write+0x18/0x20
[   26.759483]  ? __pfx_sched_clock_cpu+0x10/0x10
[   26.759506]  ? finish_task_switch.isra.0+0x153/0x700
[   26.759534]  mempool_kmalloc_uaf+0xef/0x140
[   26.759558]  ? __pfx_mempool_kmalloc_uaf+0x10/0x10
[   26.759584]  ? __pfx_mempool_kmalloc+0x10/0x10
[   26.759610]  ? __pfx_mempool_kfree+0x10/0x10
[   26.759640]  ? __pfx_read_tsc+0x10/0x10
[   26.759664]  ? ktime_get_ts64+0x86/0x230
[   26.759690]  kunit_try_run_case+0x1a5/0x480
[   26.759718]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.759741]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   26.759768]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   26.759794]  ? __kthread_parkme+0x82/0x180
[   26.759814]  ? preempt_count_sub+0x50/0x80
[   26.759837]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.759861]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.759885]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   26.759908]  kthread+0x337/0x6f0
[   26.759929]  ? trace_preempt_on+0x20/0xc0
[   26.760273]  ? __pfx_kthread+0x10/0x10
[   26.760298]  ? _raw_spin_unlock_irq+0x47/0x80
[   26.760323]  ? calculate_sigpending+0x7b/0xa0
[   26.760348]  ? __pfx_kthread+0x10/0x10
[   26.760621]  ret_from_fork+0x116/0x1d0
[   26.760656]  ? __pfx_kthread+0x10/0x10
[   26.760681]  ret_from_fork_asm+0x1a/0x30
[   26.760714]  </TASK>
[   26.760726] 
[   26.778483] Allocated by task 276:
[   26.778711]  kasan_save_stack+0x45/0x70
[   26.778866]  kasan_save_track+0x18/0x40
[   26.779020]  kasan_save_alloc_info+0x3b/0x50
[   26.779405]  __kasan_mempool_unpoison_object+0x1a9/0x200
[   26.779960]  remove_element+0x11e/0x190
[   26.780330]  mempool_alloc_preallocated+0x4d/0x90
[   26.780800]  mempool_uaf_helper+0x96/0x400
[   26.781249]  mempool_kmalloc_uaf+0xef/0x140
[   26.781611]  kunit_try_run_case+0x1a5/0x480
[   26.781921]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.782278]  kthread+0x337/0x6f0
[   26.782395]  ret_from_fork+0x116/0x1d0
[   26.782736]  ret_from_fork_asm+0x1a/0x30
[   26.783161] 
[   26.783332] Freed by task 276:
[   26.783711]  kasan_save_stack+0x45/0x70
[   26.784091]  kasan_save_track+0x18/0x40
[   26.784535]  kasan_save_free_info+0x3f/0x60
[   26.784720]  __kasan_mempool_poison_object+0x131/0x1d0
[   26.784883]  mempool_free+0x490/0x640
[   26.785031]  mempool_uaf_helper+0x11a/0x400
[   26.785179]  mempool_kmalloc_uaf+0xef/0x140
[   26.785317]  kunit_try_run_case+0x1a5/0x480
[   26.785653]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.786166]  kthread+0x337/0x6f0
[   26.786454]  ret_from_fork+0x116/0x1d0
[   26.786885]  ret_from_fork_asm+0x1a/0x30
[   26.787270] 
[   26.787430] The buggy address belongs to the object at ffff888104964d00
[   26.787430]  which belongs to the cache kmalloc-128 of size 128
[   26.788225] The buggy address is located 0 bytes inside of
[   26.788225]  freed 128-byte region [ffff888104964d00, ffff888104964d80)
[   26.788563] 
[   26.788632] The buggy address belongs to the physical page:
[   26.788805] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104964
[   26.789733] flags: 0x200000000000000(node=0|zone=2)
[   26.790230] page_type: f5(slab)
[   26.790555] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   26.791480] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   26.792216] page dumped because: kasan: bad access detected
[   26.792736] 
[   26.792945] Memory state around the buggy address:
[   26.793384]  ffff888104964c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   26.794206]  ffff888104964c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.794853] >ffff888104964d00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   26.795264]                    ^
[   26.795558]  ffff888104964d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.796284]  ffff888104964e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   26.796816] ==================================================================