Hay
Date
July 9, 2025, 12:11 a.m.

Environment
qemu-arm64
qemu-x86_64

[   21.637338] ==================================================================
[   21.637429] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x314/0x340
[   21.637808] Read of size 1 at addr fff00000c64b5a00 by task kunit_try_catch/228
[   21.637871] 
[   21.638169] CPU: 1 UID: 0 PID: 228 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   21.638333] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.638363] Hardware name: linux,dummy-virt (DT)
[   21.638408] Call trace:
[   21.638434]  show_stack+0x20/0x38 (C)
[   21.638498]  dump_stack_lvl+0x8c/0xd0
[   21.638690]  print_report+0x118/0x608
[   21.638912]  kasan_report+0xdc/0x128
[   21.638967]  __asan_report_load1_noabort+0x20/0x30
[   21.639019]  mempool_uaf_helper+0x314/0x340
[   21.639334]  mempool_kmalloc_uaf+0xc4/0x120
[   21.639474]  kunit_try_run_case+0x170/0x3f0
[   21.639560]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.639616]  kthread+0x328/0x630
[   21.639791]  ret_from_fork+0x10/0x20
[   21.639844] 
[   21.639863] Allocated by task 228:
[   21.640063]  kasan_save_stack+0x3c/0x68
[   21.640164]  kasan_save_track+0x20/0x40
[   21.640212]  kasan_save_alloc_info+0x40/0x58
[   21.640280]  __kasan_mempool_unpoison_object+0x11c/0x180
[   21.640638]  remove_element+0x130/0x1f8
[   21.640758]  mempool_alloc_preallocated+0x58/0xc0
[   21.640833]  mempool_uaf_helper+0xa4/0x340
[   21.640956]  mempool_kmalloc_uaf+0xc4/0x120
[   21.640997]  kunit_try_run_case+0x170/0x3f0
[   21.641180]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.641387]  kthread+0x328/0x630
[   21.641486]  ret_from_fork+0x10/0x20
[   21.641563] 
[   21.641613] Freed by task 228:
[   21.642026]  kasan_save_stack+0x3c/0x68
[   21.642166]  kasan_save_track+0x20/0x40
[   21.642208]  kasan_save_free_info+0x4c/0x78
[   21.642440]  __kasan_mempool_poison_object+0xc0/0x150
[   21.642607]  mempool_free+0x28c/0x328
[   21.642674]  mempool_uaf_helper+0x104/0x340
[   21.642749]  mempool_kmalloc_uaf+0xc4/0x120
[   21.642813]  kunit_try_run_case+0x170/0x3f0
[   21.642873]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.642927]  kthread+0x328/0x630
[   21.642960]  ret_from_fork+0x10/0x20
[   21.643007] 
[   21.643028] The buggy address belongs to the object at fff00000c64b5a00
[   21.643028]  which belongs to the cache kmalloc-128 of size 128
[   21.643100] The buggy address is located 0 bytes inside of
[   21.643100]  freed 128-byte region [fff00000c64b5a00, fff00000c64b5a80)
[   21.643176] 
[   21.643207] The buggy address belongs to the physical page:
[   21.643240] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1064b5
[   21.643296] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   21.643354] page_type: f5(slab)
[   21.643416] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   21.643475] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   21.643518] page dumped because: kasan: bad access detected
[   21.643559] 
[   21.643577] Memory state around the buggy address:
[   21.643617]  fff00000c64b5900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   21.643678]  fff00000c64b5980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.643731] >fff00000c64b5a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   21.643769]                    ^
[   21.643796]  fff00000c64b5a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.643838]  fff00000c64b5b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   21.643877] ==================================================================
[   21.677748] ==================================================================
[   21.677860] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x314/0x340
[   21.677922] Read of size 1 at addr fff00000c6e92240 by task kunit_try_catch/232
[   21.678260] 
[   21.678347] CPU: 1 UID: 0 PID: 232 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   21.678450] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.678635] Hardware name: linux,dummy-virt (DT)
[   21.678877] Call trace:
[   21.678935]  show_stack+0x20/0x38 (C)
[   21.679010]  dump_stack_lvl+0x8c/0xd0
[   21.679066]  print_report+0x118/0x608
[   21.679227]  kasan_report+0xdc/0x128
[   21.679288]  __asan_report_load1_noabort+0x20/0x30
[   21.679548]  mempool_uaf_helper+0x314/0x340
[   21.679613]  mempool_slab_uaf+0xc0/0x118
[   21.679687]  kunit_try_run_case+0x170/0x3f0
[   21.679981]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.680118]  kthread+0x328/0x630
[   21.680187]  ret_from_fork+0x10/0x20
[   21.680417] 
[   21.680449] Allocated by task 232:
[   21.680688]  kasan_save_stack+0x3c/0x68
[   21.680778]  kasan_save_track+0x20/0x40
[   21.680901]  kasan_save_alloc_info+0x40/0x58
[   21.680978]  __kasan_mempool_unpoison_object+0xbc/0x180
[   21.681032]  remove_element+0x16c/0x1f8
[   21.681233]  mempool_alloc_preallocated+0x58/0xc0
[   21.681454]  mempool_uaf_helper+0xa4/0x340
[   21.681571]  mempool_slab_uaf+0xc0/0x118
[   21.681622]  kunit_try_run_case+0x170/0x3f0
[   21.681709]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.682039]  kthread+0x328/0x630
[   21.682174]  ret_from_fork+0x10/0x20
[   21.682233] 
[   21.682393] Freed by task 232:
[   21.682595]  kasan_save_stack+0x3c/0x68
[   21.682730]  kasan_save_track+0x20/0x40
[   21.682785]  kasan_save_free_info+0x4c/0x78
[   21.682853]  __kasan_mempool_poison_object+0xc0/0x150
[   21.683079]  mempool_free+0x28c/0x328
[   21.683284]  mempool_uaf_helper+0x104/0x340
[   21.683343]  mempool_slab_uaf+0xc0/0x118
[   21.683561]  kunit_try_run_case+0x170/0x3f0
[   21.683809]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.683953]  kthread+0x328/0x630
[   21.684050]  ret_from_fork+0x10/0x20
[   21.684100] 
[   21.684122] The buggy address belongs to the object at fff00000c6e92240
[   21.684122]  which belongs to the cache test_cache of size 123
[   21.684183] The buggy address is located 0 bytes inside of
[   21.684183]  freed 123-byte region [fff00000c6e92240, fff00000c6e922bb)
[   21.684244] 
[   21.684540] The buggy address belongs to the physical page:
[   21.684686] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106e92
[   21.684758] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   21.685096] page_type: f5(slab)
[   21.685425] raw: 0bfffe0000000000 fff00000c471ab40 dead000000000122 0000000000000000
[   21.685535] raw: 0000000000000000 0000000080150015 00000000f5000000 0000000000000000
[   21.685897] page dumped because: kasan: bad access detected
[   21.685949] 
[   21.685969] Memory state around the buggy address:
[   21.686131]  fff00000c6e92100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   21.686216]  fff00000c6e92180: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   21.686393] >fff00000c6e92200: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
[   21.686802]                                            ^
[   21.686890]  fff00000c6e92280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   21.686951]  fff00000c6e92300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.686991] ==================================================================

[   14.242873] ==================================================================
[   14.243382] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x392/0x400
[   14.243721] Read of size 1 at addr ffff888102abe240 by task kunit_try_catch/248
[   14.244030] 
[   14.244401] CPU: 1 UID: 0 PID: 248 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   14.244451] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.244463] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.244485] Call Trace:
[   14.244496]  <TASK>
[   14.244515]  dump_stack_lvl+0x73/0xb0
[   14.244547]  print_report+0xd1/0x650
[   14.244571]  ? __virt_addr_valid+0x1db/0x2d0
[   14.244595]  ? mempool_uaf_helper+0x392/0x400
[   14.244617]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.244641]  ? mempool_uaf_helper+0x392/0x400
[   14.244663]  kasan_report+0x141/0x180
[   14.244685]  ? mempool_uaf_helper+0x392/0x400
[   14.244711]  __asan_report_load1_noabort+0x18/0x20
[   14.244736]  mempool_uaf_helper+0x392/0x400
[   14.244759]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   14.244789]  mempool_slab_uaf+0xea/0x140
[   14.244812]  ? __pfx_mempool_slab_uaf+0x10/0x10
[   14.244835]  ? schedule+0x7c/0x2e0
[   14.244857]  ? __pfx_mempool_alloc_slab+0x10/0x10
[   14.244882]  ? __pfx_mempool_free_slab+0x10/0x10
[   14.244909]  ? __pfx_read_tsc+0x10/0x10
[   14.244946]  ? ktime_get_ts64+0x86/0x230
[   14.244991]  kunit_try_run_case+0x1a5/0x480
[   14.245017]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.245041]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.245068]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.245093]  ? __kthread_parkme+0x82/0x180
[   14.245116]  ? preempt_count_sub+0x50/0x80
[   14.245140]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.245164]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.245189]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.245214]  kthread+0x337/0x6f0
[   14.245234]  ? trace_preempt_on+0x20/0xc0
[   14.245258]  ? __pfx_kthread+0x10/0x10
[   14.245279]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.245301]  ? calculate_sigpending+0x7b/0xa0
[   14.245325]  ? __pfx_kthread+0x10/0x10
[   14.245346]  ret_from_fork+0x116/0x1d0
[   14.245382]  ? __pfx_kthread+0x10/0x10
[   14.245403]  ret_from_fork_asm+0x1a/0x30
[   14.245434]  </TASK>
[   14.245445] 
[   14.260918] Allocated by task 248:
[   14.261098]  kasan_save_stack+0x45/0x70
[   14.261256]  kasan_save_track+0x18/0x40
[   14.261454]  kasan_save_alloc_info+0x3b/0x50
[   14.261659]  __kasan_mempool_unpoison_object+0x1bb/0x200
[   14.261834]  remove_element+0x11e/0x190
[   14.262015]  mempool_alloc_preallocated+0x4d/0x90
[   14.262250]  mempool_uaf_helper+0x96/0x400
[   14.262604]  mempool_slab_uaf+0xea/0x140
[   14.262810]  kunit_try_run_case+0x1a5/0x480
[   14.263012]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.263189]  kthread+0x337/0x6f0
[   14.263343]  ret_from_fork+0x116/0x1d0
[   14.263531]  ret_from_fork_asm+0x1a/0x30
[   14.263742] 
[   14.263835] Freed by task 248:
[   14.264001]  kasan_save_stack+0x45/0x70
[   14.264149]  kasan_save_track+0x18/0x40
[   14.264414]  kasan_save_free_info+0x3f/0x60
[   14.264571]  __kasan_mempool_poison_object+0x131/0x1d0
[   14.264741]  mempool_free+0x2ec/0x380
[   14.264919]  mempool_uaf_helper+0x11a/0x400
[   14.265130]  mempool_slab_uaf+0xea/0x140
[   14.265322]  kunit_try_run_case+0x1a5/0x480
[   14.265532]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.265762]  kthread+0x337/0x6f0
[   14.265878]  ret_from_fork+0x116/0x1d0
[   14.266035]  ret_from_fork_asm+0x1a/0x30
[   14.266233] 
[   14.266327] The buggy address belongs to the object at ffff888102abe240
[   14.266327]  which belongs to the cache test_cache of size 123
[   14.267272] The buggy address is located 0 bytes inside of
[   14.267272]  freed 123-byte region [ffff888102abe240, ffff888102abe2bb)
[   14.267794] 
[   14.267905] The buggy address belongs to the physical page:
[   14.268213] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102abe
[   14.268567] flags: 0x200000000000000(node=0|zone=2)
[   14.268768] page_type: f5(slab)
[   14.268951] raw: 0200000000000000 ffff888100929c80 dead000000000122 0000000000000000
[   14.269252] raw: 0000000000000000 0000000080150015 00000000f5000000 0000000000000000
[   14.269470] page dumped because: kasan: bad access detected
[   14.269709] 
[   14.269802] Memory state around the buggy address:
[   14.270041]  ffff888102abe100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   14.270296]  ffff888102abe180: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   14.270498] >ffff888102abe200: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
[   14.271276]                                            ^
[   14.271537]  ffff888102abe280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   14.271755]  ffff888102abe300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.271992] ==================================================================
[   14.183840] ==================================================================
[   14.184940] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x392/0x400
[   14.185811] Read of size 1 at addr ffff888102ab9400 by task kunit_try_catch/244
[   14.186680] 
[   14.186791] CPU: 1 UID: 0 PID: 244 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   14.186839] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.186852] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.186875] Call Trace:
[   14.186889]  <TASK>
[   14.186909]  dump_stack_lvl+0x73/0xb0
[   14.186954]  print_report+0xd1/0x650
[   14.186977]  ? __virt_addr_valid+0x1db/0x2d0
[   14.187002]  ? mempool_uaf_helper+0x392/0x400
[   14.187051]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.187076]  ? mempool_uaf_helper+0x392/0x400
[   14.187234]  kasan_report+0x141/0x180
[   14.187437]  ? mempool_uaf_helper+0x392/0x400
[   14.187466]  __asan_report_load1_noabort+0x18/0x20
[   14.187493]  mempool_uaf_helper+0x392/0x400
[   14.187516]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   14.187541]  ? __kasan_check_write+0x18/0x20
[   14.187561]  ? __pfx_sched_clock_cpu+0x10/0x10
[   14.187587]  ? finish_task_switch.isra.0+0x153/0x700
[   14.187614]  mempool_kmalloc_uaf+0xef/0x140
[   14.187637]  ? __pfx_mempool_kmalloc_uaf+0x10/0x10
[   14.187663]  ? __pfx_mempool_kmalloc+0x10/0x10
[   14.187688]  ? __pfx_mempool_kfree+0x10/0x10
[   14.187712]  ? __pfx_read_tsc+0x10/0x10
[   14.187735]  ? ktime_get_ts64+0x86/0x230
[   14.187760]  kunit_try_run_case+0x1a5/0x480
[   14.187785]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.187808]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.187833]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.187857]  ? __kthread_parkme+0x82/0x180
[   14.187878]  ? preempt_count_sub+0x50/0x80
[   14.187901]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.187925]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.187999]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.188025]  kthread+0x337/0x6f0
[   14.188044]  ? trace_preempt_on+0x20/0xc0
[   14.188068]  ? __pfx_kthread+0x10/0x10
[   14.188088]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.188110]  ? calculate_sigpending+0x7b/0xa0
[   14.188135]  ? __pfx_kthread+0x10/0x10
[   14.188156]  ret_from_fork+0x116/0x1d0
[   14.188174]  ? __pfx_kthread+0x10/0x10
[   14.188195]  ret_from_fork_asm+0x1a/0x30
[   14.188225]  </TASK>
[   14.188238] 
[   14.199527] Allocated by task 244:
[   14.199730]  kasan_save_stack+0x45/0x70
[   14.199898]  kasan_save_track+0x18/0x40
[   14.200048]  kasan_save_alloc_info+0x3b/0x50
[   14.200198]  __kasan_mempool_unpoison_object+0x1a9/0x200
[   14.200446]  remove_element+0x11e/0x190
[   14.200698]  mempool_alloc_preallocated+0x4d/0x90
[   14.200926]  mempool_uaf_helper+0x96/0x400
[   14.201141]  mempool_kmalloc_uaf+0xef/0x140
[   14.201437]  kunit_try_run_case+0x1a5/0x480
[   14.201646]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.201844]  kthread+0x337/0x6f0
[   14.202081]  ret_from_fork+0x116/0x1d0
[   14.202289]  ret_from_fork_asm+0x1a/0x30
[   14.202508] 
[   14.202600] Freed by task 244:
[   14.202763]  kasan_save_stack+0x45/0x70
[   14.202927]  kasan_save_track+0x18/0x40
[   14.203207]  kasan_save_free_info+0x3f/0x60
[   14.203394]  __kasan_mempool_poison_object+0x131/0x1d0
[   14.203564]  mempool_free+0x2ec/0x380
[   14.203695]  mempool_uaf_helper+0x11a/0x400
[   14.203898]  mempool_kmalloc_uaf+0xef/0x140
[   14.204135]  kunit_try_run_case+0x1a5/0x480
[   14.204546]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.204780]  kthread+0x337/0x6f0
[   14.204901]  ret_from_fork+0x116/0x1d0
[   14.205310]  ret_from_fork_asm+0x1a/0x30
[   14.205494] 
[   14.205565] The buggy address belongs to the object at ffff888102ab9400
[   14.205565]  which belongs to the cache kmalloc-128 of size 128
[   14.206209] The buggy address is located 0 bytes inside of
[   14.206209]  freed 128-byte region [ffff888102ab9400, ffff888102ab9480)
[   14.206873] 
[   14.206960] The buggy address belongs to the physical page:
[   14.207132] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ab9
[   14.207462] flags: 0x200000000000000(node=0|zone=2)
[   14.207733] page_type: f5(slab)
[   14.207908] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   14.208270] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   14.208726] page dumped because: kasan: bad access detected
[   14.209032] 
[   14.209108] Memory state around the buggy address:
[   14.209265]  ffff888102ab9300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   14.209586]  ffff888102ab9380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.210083] >ffff888102ab9400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   14.210313]                    ^
[   14.210432]  ffff888102ab9480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.210756]  ffff888102ab9500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   14.211220] ==================================================================