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

Environment
qemu-arm64
qemu-x86_64

[   26.957303] ==================================================================
[   26.957475] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x314/0x340
[   26.957621] Read of size 1 at addr fff00000c5a6e240 by task kunit_try_catch/233
[   26.957738] 
[   26.957814] CPU: 1 UID: 0 PID: 233 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc2 #1 PREEMPT 
[   26.958014] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.958076] Hardware name: linux,dummy-virt (DT)
[   26.958150] Call trace:
[   26.958205]  show_stack+0x20/0x38 (C)
[   26.958323]  dump_stack_lvl+0x8c/0xd0
[   26.958473]  print_report+0x118/0x608
[   26.958645]  kasan_report+0xdc/0x128
[   26.958856]  __asan_report_load1_noabort+0x20/0x30
[   26.959029]  mempool_uaf_helper+0x314/0x340
[   26.959173]  mempool_slab_uaf+0xc0/0x118
[   26.959295]  kunit_try_run_case+0x170/0x3f0
[   26.959529]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   26.959670]  kthread+0x328/0x630
[   26.959807]  ret_from_fork+0x10/0x20
[   26.960085] 
[   26.960171] Allocated by task 233:
[   26.960342]  kasan_save_stack+0x3c/0x68
[   26.960984]  kasan_save_track+0x20/0x40
[   26.961055]  kasan_save_alloc_info+0x40/0x58
[   26.961156]  __kasan_mempool_unpoison_object+0xbc/0x180
[   26.961281]  remove_element+0x16c/0x1f8
[   26.961409]  mempool_alloc_preallocated+0x58/0xc0
[   26.961598]  mempool_uaf_helper+0xa4/0x340
[   26.962067]  mempool_slab_uaf+0xc0/0x118
[   26.962573]  kunit_try_run_case+0x170/0x3f0
[   26.962678]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   26.963662]  kthread+0x328/0x630
[   26.963830]  ret_from_fork+0x10/0x20
[   26.964623] 
[   26.964684] Freed by task 233:
[   26.964768]  kasan_save_stack+0x3c/0x68
[   26.964870]  kasan_save_track+0x20/0x40
[   26.964974]  kasan_save_free_info+0x4c/0x78
[   26.965064]  __kasan_mempool_poison_object+0xc0/0x150
[   26.965166]  mempool_free+0x28c/0x328
[   26.965258]  mempool_uaf_helper+0x104/0x340
[   26.965363]  mempool_slab_uaf+0xc0/0x118
[   26.965474]  kunit_try_run_case+0x170/0x3f0
[   26.965573]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   26.965737]  kthread+0x328/0x630
[   26.965874]  ret_from_fork+0x10/0x20
[   26.966123] 
[   26.966238] The buggy address belongs to the object at fff00000c5a6e240
[   26.966238]  which belongs to the cache test_cache of size 123
[   26.966411] The buggy address is located 0 bytes inside of
[   26.966411]  freed 123-byte region [fff00000c5a6e240, fff00000c5a6e2bb)
[   26.966561] 
[   26.966619] The buggy address belongs to the physical page:
[   26.966706] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a6e
[   26.966849] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   26.966986] page_type: f5(slab)
[   26.967100] raw: 0bfffe0000000000 fff00000c5a5d280 dead000000000122 0000000000000000
[   26.967311] raw: 0000000000000000 0000000080150015 00000000f5000000 0000000000000000
[   26.967450] page dumped because: kasan: bad access detected
[   26.967543] 
[   26.967597] Memory state around the buggy address:
[   26.967689]  fff00000c5a6e100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   26.967817]  fff00000c5a6e180: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   26.967990] >fff00000c5a6e200: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
[   26.968138]                                            ^
[   26.968248]  fff00000c5a6e280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   26.968781]  fff00000c5a6e300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.968905] ==================================================================
[   26.882112] ==================================================================
[   26.882574] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x314/0x340
[   26.882759] Read of size 1 at addr fff00000c597ae00 by task kunit_try_catch/229
[   26.883063] 
[   26.883150] CPU: 1 UID: 0 PID: 229 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc2 #1 PREEMPT 
[   26.883353] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.883434] Hardware name: linux,dummy-virt (DT)
[   26.883528] Call trace:
[   26.883597]  show_stack+0x20/0x38 (C)
[   26.883830]  dump_stack_lvl+0x8c/0xd0
[   26.883999]  print_report+0x118/0x608
[   26.884273]  kasan_report+0xdc/0x128
[   26.884406]  __asan_report_load1_noabort+0x20/0x30
[   26.884564]  mempool_uaf_helper+0x314/0x340
[   26.884799]  mempool_kmalloc_uaf+0xc4/0x120
[   26.884931]  kunit_try_run_case+0x170/0x3f0
[   26.885100]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   26.885277]  kthread+0x328/0x630
[   26.885528]  ret_from_fork+0x10/0x20
[   26.885783] 
[   26.885866] Allocated by task 229:
[   26.886065]  kasan_save_stack+0x3c/0x68
[   26.886177]  kasan_save_track+0x20/0x40
[   26.886460]  kasan_save_alloc_info+0x40/0x58
[   26.886606]  __kasan_mempool_unpoison_object+0x11c/0x180
[   26.886760]  remove_element+0x130/0x1f8
[   26.886926]  mempool_alloc_preallocated+0x58/0xc0
[   26.888130]  mempool_uaf_helper+0xa4/0x340
[   26.888245]  mempool_kmalloc_uaf+0xc4/0x120
[   26.888357]  kunit_try_run_case+0x170/0x3f0
[   26.888486]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   26.888600]  kthread+0x328/0x630
[   26.889349]  ret_from_fork+0x10/0x20
[   26.889913] 
[   26.889963] Freed by task 229:
[   26.890036]  kasan_save_stack+0x3c/0x68
[   26.890842]  kasan_save_track+0x20/0x40
[   26.891036]  kasan_save_free_info+0x4c/0x78
[   26.891392]  __kasan_mempool_poison_object+0xc0/0x150
[   26.891573]  mempool_free+0x28c/0x328
[   26.892206]  mempool_uaf_helper+0x104/0x340
[   26.892729]  mempool_kmalloc_uaf+0xc4/0x120
[   26.892835]  kunit_try_run_case+0x170/0x3f0
[   26.894500]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   26.894675]  kthread+0x328/0x630
[   26.894766]  ret_from_fork+0x10/0x20
[   26.894855] 
[   26.894906] The buggy address belongs to the object at fff00000c597ae00
[   26.894906]  which belongs to the cache kmalloc-128 of size 128
[   26.896847] The buggy address is located 0 bytes inside of
[   26.896847]  freed 128-byte region [fff00000c597ae00, fff00000c597ae80)
[   26.898081] 
[   26.898186] The buggy address belongs to the physical page:
[   26.898352] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10597a
[   26.899625] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   26.899894] page_type: f5(slab)
[   26.900059] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   26.900197] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   26.900404] page dumped because: kasan: bad access detected
[   26.901000] 
[   26.901054] Memory state around the buggy address:
[   26.901132]  fff00000c597ad00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   26.901912]  fff00000c597ad80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.902128] >fff00000c597ae00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   26.902460]                    ^
[   26.902547]  fff00000c597ae80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.902720]  fff00000c597af00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   26.902827] ==================================================================

[   13.533219] ==================================================================
[   13.533763] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x392/0x400
[   13.534124] Read of size 1 at addr ffff8881029eb240 by task kunit_try_catch/251
[   13.534676] 
[   13.534913] CPU: 1 UID: 0 PID: 251 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc2 #1 PREEMPT(voluntary) 
[   13.535005] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.535027] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.535061] Call Trace:
[   13.535087]  <TASK>
[   13.535120]  dump_stack_lvl+0x73/0xb0
[   13.535177]  print_report+0xd1/0x650
[   13.535214]  ? __virt_addr_valid+0x1db/0x2d0
[   13.535243]  ? mempool_uaf_helper+0x392/0x400
[   13.535271]  ? kasan_complete_mode_report_info+0x64/0x200
[   13.535306]  ? mempool_uaf_helper+0x392/0x400
[   13.535339]  kasan_report+0x141/0x180
[   13.535371]  ? mempool_uaf_helper+0x392/0x400
[   13.535409]  __asan_report_load1_noabort+0x18/0x20
[   13.535437]  mempool_uaf_helper+0x392/0x400
[   13.535469]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   13.535504]  ? finish_task_switch.isra.0+0x153/0x700
[   13.535542]  mempool_slab_uaf+0xea/0x140
[   13.535573]  ? __pfx_mempool_slab_uaf+0x10/0x10
[   13.535598]  ? dequeue_task_fair+0x166/0x4e0
[   13.535645]  ? __pfx_mempool_alloc_slab+0x10/0x10
[   13.535678]  ? __pfx_mempool_free_slab+0x10/0x10
[   13.535708]  ? __pfx_read_tsc+0x10/0x10
[   13.535738]  ? ktime_get_ts64+0x86/0x230
[   13.535770]  kunit_try_run_case+0x1a5/0x480
[   13.535795]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.535816]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.535839]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.535861]  ? __kthread_parkme+0x82/0x180
[   13.535884]  ? preempt_count_sub+0x50/0x80
[   13.535905]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.535927]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.535949]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.535970]  kthread+0x337/0x6f0
[   13.535986]  ? trace_preempt_on+0x20/0xc0
[   13.536009]  ? __pfx_kthread+0x10/0x10
[   13.536026]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.536046]  ? calculate_sigpending+0x7b/0xa0
[   13.536066]  ? __pfx_kthread+0x10/0x10
[   13.536083]  ret_from_fork+0x41/0x80
[   13.536102]  ? __pfx_kthread+0x10/0x10
[   13.536119]  ret_from_fork_asm+0x1a/0x30
[   13.536149]  </TASK>
[   13.536162] 
[   13.549809] Allocated by task 251:
[   13.550165]  kasan_save_stack+0x45/0x70
[   13.550940]  kasan_save_track+0x18/0x40
[   13.551167]  kasan_save_alloc_info+0x3b/0x50
[   13.551521]  __kasan_mempool_unpoison_object+0x1bb/0x200
[   13.551799]  remove_element+0x11e/0x190
[   13.551988]  mempool_alloc_preallocated+0x4d/0x90
[   13.552198]  mempool_uaf_helper+0x96/0x400
[   13.553185]  mempool_slab_uaf+0xea/0x140
[   13.553349]  kunit_try_run_case+0x1a5/0x480
[   13.554157]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.554613]  kthread+0x337/0x6f0
[   13.554798]  ret_from_fork+0x41/0x80
[   13.555396]  ret_from_fork_asm+0x1a/0x30
[   13.555665] 
[   13.556090] Freed by task 251:
[   13.556256]  kasan_save_stack+0x45/0x70
[   13.556554]  kasan_save_track+0x18/0x40
[   13.557448]  kasan_save_free_info+0x3f/0x60
[   13.558206]  __kasan_mempool_poison_object+0x131/0x1d0
[   13.558536]  mempool_free+0x2ec/0x380
[   13.558844]  mempool_uaf_helper+0x11a/0x400
[   13.558976]  mempool_slab_uaf+0xea/0x140
[   13.559097]  kunit_try_run_case+0x1a5/0x480
[   13.559274]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.560244]  kthread+0x337/0x6f0
[   13.560684]  ret_from_fork+0x41/0x80
[   13.561025]  ret_from_fork_asm+0x1a/0x30
[   13.561199] 
[   13.561342] The buggy address belongs to the object at ffff8881029eb240
[   13.561342]  which belongs to the cache test_cache of size 123
[   13.561949] The buggy address is located 0 bytes inside of
[   13.561949]  freed 123-byte region [ffff8881029eb240, ffff8881029eb2bb)
[   13.563227] 
[   13.563405] The buggy address belongs to the physical page:
[   13.564088] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029eb
[   13.564731] flags: 0x200000000000000(node=0|zone=2)
[   13.565161] page_type: f5(slab)
[   13.565567] raw: 0200000000000000 ffff888101ab5640 dead000000000122 0000000000000000
[   13.565956] raw: 0000000000000000 0000000080150015 00000000f5000000 0000000000000000
[   13.566383] page dumped because: kasan: bad access detected
[   13.567114] 
[   13.567232] Memory state around the buggy address:
[   13.567412]  ffff8881029eb100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   13.567726]  ffff8881029eb180: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.567935] >ffff8881029eb200: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
[   13.568141]                                            ^
[   13.568322]  ffff8881029eb280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   13.568459]  ffff8881029eb300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.568996] ==================================================================
[   13.457066] ==================================================================
[   13.457746] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x392/0x400
[   13.458203] Read of size 1 at addr ffff8881029da700 by task kunit_try_catch/247
[   13.458826] 
[   13.458969] CPU: 1 UID: 0 PID: 247 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc2 #1 PREEMPT(voluntary) 
[   13.459065] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.459089] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.459128] Call Trace:
[   13.459154]  <TASK>
[   13.459191]  dump_stack_lvl+0x73/0xb0
[   13.459248]  print_report+0xd1/0x650
[   13.459291]  ? __virt_addr_valid+0x1db/0x2d0
[   13.459333]  ? mempool_uaf_helper+0x392/0x400
[   13.459363]  ? kasan_complete_mode_report_info+0x64/0x200
[   13.459385]  ? mempool_uaf_helper+0x392/0x400
[   13.459413]  kasan_report+0x141/0x180
[   13.459434]  ? mempool_uaf_helper+0x392/0x400
[   13.459459]  __asan_report_load1_noabort+0x18/0x20
[   13.459478]  mempool_uaf_helper+0x392/0x400
[   13.459506]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   13.459539]  ? dequeue_entities+0x852/0x1740
[   13.459583]  ? finish_task_switch.isra.0+0x153/0x700
[   13.459837]  mempool_kmalloc_uaf+0xef/0x140
[   13.459900]  ? __pfx_mempool_kmalloc_uaf+0x10/0x10
[   13.459944]  ? dequeue_task_fair+0x166/0x4e0
[   13.459989]  ? __pfx_mempool_kmalloc+0x10/0x10
[   13.460030]  ? __pfx_mempool_kfree+0x10/0x10
[   13.460073]  ? __pfx_read_tsc+0x10/0x10
[   13.460115]  ? ktime_get_ts64+0x86/0x230
[   13.460168]  kunit_try_run_case+0x1a5/0x480
[   13.460220]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.460258]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.460307]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.460354]  ? __kthread_parkme+0x82/0x180
[   13.460398]  ? preempt_count_sub+0x50/0x80
[   13.460447]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.460572]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.460614]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.460665]  kthread+0x337/0x6f0
[   13.460692]  ? trace_preempt_on+0x20/0xc0
[   13.460717]  ? __pfx_kthread+0x10/0x10
[   13.460734]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.460755]  ? calculate_sigpending+0x7b/0xa0
[   13.460776]  ? __pfx_kthread+0x10/0x10
[   13.460794]  ret_from_fork+0x41/0x80
[   13.460813]  ? __pfx_kthread+0x10/0x10
[   13.460830]  ret_from_fork_asm+0x1a/0x30
[   13.460859]  </TASK>
[   13.460873] 
[   13.472786] Allocated by task 247:
[   13.473031]  kasan_save_stack+0x45/0x70
[   13.473390]  kasan_save_track+0x18/0x40
[   13.474022]  kasan_save_alloc_info+0x3b/0x50
[   13.474573]  __kasan_mempool_unpoison_object+0x1a9/0x200
[   13.474864]  remove_element+0x11e/0x190
[   13.475126]  mempool_alloc_preallocated+0x4d/0x90
[   13.475660]  mempool_uaf_helper+0x96/0x400
[   13.475912]  mempool_kmalloc_uaf+0xef/0x140
[   13.476187]  kunit_try_run_case+0x1a5/0x480
[   13.476704]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.477105]  kthread+0x337/0x6f0
[   13.477683]  ret_from_fork+0x41/0x80
[   13.478012]  ret_from_fork_asm+0x1a/0x30
[   13.478249] 
[   13.478586] Freed by task 247:
[   13.478799]  kasan_save_stack+0x45/0x70
[   13.479111]  kasan_save_track+0x18/0x40
[   13.479568]  kasan_save_free_info+0x3f/0x60
[   13.479821]  __kasan_mempool_poison_object+0x131/0x1d0
[   13.480213]  mempool_free+0x2ec/0x380
[   13.480664]  mempool_uaf_helper+0x11a/0x400
[   13.481003]  mempool_kmalloc_uaf+0xef/0x140
[   13.481254]  kunit_try_run_case+0x1a5/0x480
[   13.481910]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.482456]  kthread+0x337/0x6f0
[   13.482691]  ret_from_fork+0x41/0x80
[   13.482971]  ret_from_fork_asm+0x1a/0x30
[   13.483198] 
[   13.483521] The buggy address belongs to the object at ffff8881029da700
[   13.483521]  which belongs to the cache kmalloc-128 of size 128
[   13.484016] The buggy address is located 0 bytes inside of
[   13.484016]  freed 128-byte region [ffff8881029da700, ffff8881029da780)
[   13.485001] 
[   13.485142] The buggy address belongs to the physical page:
[   13.485769] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029da
[   13.486164] flags: 0x200000000000000(node=0|zone=2)
[   13.486746] page_type: f5(slab)
[   13.487041] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   13.487532] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   13.487981] page dumped because: kasan: bad access detected
[   13.488249] 
[   13.488587] Memory state around the buggy address:
[   13.488848]  ffff8881029da600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.489260]  ffff8881029da680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.489848] >ffff8881029da700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.490590]                    ^
[   13.490769]  ffff8881029da780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.491137]  ffff8881029da800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.491792] ==================================================================