Hay
Date
July 19, 2025, 11:12 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.333734] ==================================================================
[   17.333794] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x314/0x340
[   17.333844] Read of size 1 at addr fff00000c78cc240 by task kunit_try_catch/231
[   17.333893] 
[   17.333924] CPU: 0 UID: 0 PID: 231 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   17.334478] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.334508] Hardware name: linux,dummy-virt (DT)
[   17.334544] Call trace:
[   17.334659]  show_stack+0x20/0x38 (C)
[   17.334773]  dump_stack_lvl+0x8c/0xd0
[   17.334887]  print_report+0x118/0x5d0
[   17.334957]  kasan_report+0xdc/0x128
[   17.335002]  __asan_report_load1_noabort+0x20/0x30
[   17.335053]  mempool_uaf_helper+0x314/0x340
[   17.335104]  mempool_slab_uaf+0xc0/0x118
[   17.335314]  kunit_try_run_case+0x170/0x3f0
[   17.335394]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.335454]  kthread+0x328/0x630
[   17.335650]  ret_from_fork+0x10/0x20
[   17.335724] 
[   17.335742] Allocated by task 231:
[   17.335769]  kasan_save_stack+0x3c/0x68
[   17.335810]  kasan_save_track+0x20/0x40
[   17.335846]  kasan_save_alloc_info+0x40/0x58
[   17.335886]  __kasan_mempool_unpoison_object+0xbc/0x180
[   17.335928]  remove_element+0x16c/0x1f8
[   17.335965]  mempool_alloc_preallocated+0x58/0xc0
[   17.336004]  mempool_uaf_helper+0xa4/0x340
[   17.336040]  mempool_slab_uaf+0xc0/0x118
[   17.336077]  kunit_try_run_case+0x170/0x3f0
[   17.336120]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.336247]  kthread+0x328/0x630
[   17.336314]  ret_from_fork+0x10/0x20
[   17.336351] 
[   17.336369] Freed by task 231:
[   17.336402]  kasan_save_stack+0x3c/0x68
[   17.336571]  kasan_save_track+0x20/0x40
[   17.337472]  kasan_save_free_info+0x4c/0x78
[   17.337594]  __kasan_mempool_poison_object+0xc0/0x150
[   17.337640]  mempool_free+0x28c/0x328
[   17.337673]  mempool_uaf_helper+0x104/0x340
[   17.337718]  mempool_slab_uaf+0xc0/0x118
[   17.337756]  kunit_try_run_case+0x170/0x3f0
[   17.337792]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.337834]  kthread+0x328/0x630
[   17.337865]  ret_from_fork+0x10/0x20
[   17.337901] 
[   17.337931] The buggy address belongs to the object at fff00000c78cc240
[   17.337931]  which belongs to the cache test_cache of size 123
[   17.337988] The buggy address is located 0 bytes inside of
[   17.337988]  freed 123-byte region [fff00000c78cc240, fff00000c78cc2bb)
[   17.338048] 
[   17.338068] The buggy address belongs to the physical page:
[   17.338100] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078cc
[   17.338151] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.338199] page_type: f5(slab)
[   17.338299] raw: 0bfffe0000000000 fff00000c3e3e640 dead000000000122 0000000000000000
[   17.338368] raw: 0000000000000000 0000000080150015 00000000f5000000 0000000000000000
[   17.338410] page dumped because: kasan: bad access detected
[   17.338442] 
[   17.338460] Memory state around the buggy address:
[   17.338501]  fff00000c78cc100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   17.338659]  fff00000c78cc180: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.338731] >fff00000c78cc200: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
[   17.338953]                                            ^
[   17.338988]  fff00000c78cc280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   17.339033]  fff00000c78cc300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.339072] ==================================================================
[   17.311631] ==================================================================
[   17.311710] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x314/0x340
[   17.311769] Read of size 1 at addr fff00000c63eb900 by task kunit_try_catch/227
[   17.311818] 
[   17.311852] CPU: 0 UID: 0 PID: 227 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   17.312025] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.312054] Hardware name: linux,dummy-virt (DT)
[   17.312085] Call trace:
[   17.312109]  show_stack+0x20/0x38 (C)
[   17.312158]  dump_stack_lvl+0x8c/0xd0
[   17.312206]  print_report+0x118/0x5d0
[   17.312252]  kasan_report+0xdc/0x128
[   17.312297]  __asan_report_load1_noabort+0x20/0x30
[   17.312347]  mempool_uaf_helper+0x314/0x340
[   17.312395]  mempool_kmalloc_uaf+0xc4/0x120
[   17.312440]  kunit_try_run_case+0x170/0x3f0
[   17.312494]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.312567]  kthread+0x328/0x630
[   17.312610]  ret_from_fork+0x10/0x20
[   17.312659] 
[   17.312678] Allocated by task 227:
[   17.312717]  kasan_save_stack+0x3c/0x68
[   17.312757]  kasan_save_track+0x20/0x40
[   17.312795]  kasan_save_alloc_info+0x40/0x58
[   17.312844]  __kasan_mempool_unpoison_object+0x11c/0x180
[   17.312887]  remove_element+0x130/0x1f8
[   17.312924]  mempool_alloc_preallocated+0x58/0xc0
[   17.312961]  mempool_uaf_helper+0xa4/0x340
[   17.312998]  mempool_kmalloc_uaf+0xc4/0x120
[   17.313035]  kunit_try_run_case+0x170/0x3f0
[   17.313074]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.313161]  kthread+0x328/0x630
[   17.313196]  ret_from_fork+0x10/0x20
[   17.313232] 
[   17.313290] Freed by task 227:
[   17.313345]  kasan_save_stack+0x3c/0x68
[   17.313383]  kasan_save_track+0x20/0x40
[   17.313420]  kasan_save_free_info+0x4c/0x78
[   17.313460]  __kasan_mempool_poison_object+0xc0/0x150
[   17.313501]  mempool_free+0x28c/0x328
[   17.313536]  mempool_uaf_helper+0x104/0x340
[   17.313573]  mempool_kmalloc_uaf+0xc4/0x120
[   17.313614]  kunit_try_run_case+0x170/0x3f0
[   17.313652]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.313715]  kthread+0x328/0x630
[   17.313772]  ret_from_fork+0x10/0x20
[   17.313913] 
[   17.313932] The buggy address belongs to the object at fff00000c63eb900
[   17.313932]  which belongs to the cache kmalloc-128 of size 128
[   17.314000] The buggy address is located 0 bytes inside of
[   17.314000]  freed 128-byte region [fff00000c63eb900, fff00000c63eb980)
[   17.314118] 
[   17.314144] The buggy address belongs to the physical page:
[   17.314275] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1063eb
[   17.314363] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.314466] page_type: f5(slab)
[   17.314564] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   17.314615] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.314657] page dumped because: kasan: bad access detected
[   17.314721] 
[   17.314739] Memory state around the buggy address:
[   17.314813]  fff00000c63eb800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.315003]  fff00000c63eb880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.315205] >fff00000c63eb900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.315244]                    ^
[   17.315273]  fff00000c63eb980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.315315]  fff00000c63eba00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.315353] ==================================================================

[   13.512165] ==================================================================
[   13.513326] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x392/0x400
[   13.513815] Read of size 1 at addr ffff8881027d6e00 by task kunit_try_catch/244
[   13.514056] 
[   13.514148] CPU: 1 UID: 0 PID: 244 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   13.514194] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.514205] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.514226] Call Trace:
[   13.514237]  <TASK>
[   13.514251]  dump_stack_lvl+0x73/0xb0
[   13.514278]  print_report+0xd1/0x610
[   13.514299]  ? __virt_addr_valid+0x1db/0x2d0
[   13.514320]  ? mempool_uaf_helper+0x392/0x400
[   13.514341]  ? kasan_complete_mode_report_info+0x64/0x200
[   13.514408]  ? mempool_uaf_helper+0x392/0x400
[   13.514429]  kasan_report+0x141/0x180
[   13.514451]  ? mempool_uaf_helper+0x392/0x400
[   13.514476]  __asan_report_load1_noabort+0x18/0x20
[   13.514499]  mempool_uaf_helper+0x392/0x400
[   13.514520]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   13.514543]  ? __kasan_check_write+0x18/0x20
[   13.514561]  ? __pfx_sched_clock_cpu+0x10/0x10
[   13.514583]  ? finish_task_switch.isra.0+0x153/0x700
[   13.514609]  mempool_kmalloc_uaf+0xef/0x140
[   13.514630]  ? __pfx_mempool_kmalloc_uaf+0x10/0x10
[   13.514673]  ? __pfx_mempool_kmalloc+0x10/0x10
[   13.514706]  ? __pfx_mempool_kfree+0x10/0x10
[   13.514730]  ? __pfx_read_tsc+0x10/0x10
[   13.514751]  ? ktime_get_ts64+0x86/0x230
[   13.514784]  kunit_try_run_case+0x1a5/0x480
[   13.514807]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.514829]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.514851]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.514873]  ? __kthread_parkme+0x82/0x180
[   13.514892]  ? preempt_count_sub+0x50/0x80
[   13.514914]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.514937]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.514958]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.514981]  kthread+0x337/0x6f0
[   13.514999]  ? trace_preempt_on+0x20/0xc0
[   13.515031]  ? __pfx_kthread+0x10/0x10
[   13.515051]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.515072]  ? calculate_sigpending+0x7b/0xa0
[   13.515095]  ? __pfx_kthread+0x10/0x10
[   13.515115]  ret_from_fork+0x116/0x1d0
[   13.515143]  ? __pfx_kthread+0x10/0x10
[   13.515163]  ret_from_fork_asm+0x1a/0x30
[   13.515192]  </TASK>
[   13.515214] 
[   13.531475] Allocated by task 244:
[   13.531879]  kasan_save_stack+0x45/0x70
[   13.532184]  kasan_save_track+0x18/0x40
[   13.532320]  kasan_save_alloc_info+0x3b/0x50
[   13.532477]  __kasan_mempool_unpoison_object+0x1a9/0x200
[   13.532652]  remove_element+0x11e/0x190
[   13.532791]  mempool_alloc_preallocated+0x4d/0x90
[   13.532946]  mempool_uaf_helper+0x96/0x400
[   13.533331]  mempool_kmalloc_uaf+0xef/0x140
[   13.533803]  kunit_try_run_case+0x1a5/0x480
[   13.534289]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.534854]  kthread+0x337/0x6f0
[   13.535176]  ret_from_fork+0x116/0x1d0
[   13.535568]  ret_from_fork_asm+0x1a/0x30
[   13.536023] 
[   13.536204] Freed by task 244:
[   13.536586]  kasan_save_stack+0x45/0x70
[   13.536988]  kasan_save_track+0x18/0x40
[   13.537355]  kasan_save_free_info+0x3f/0x60
[   13.537805]  __kasan_mempool_poison_object+0x131/0x1d0
[   13.538280]  mempool_free+0x2ec/0x380
[   13.538706]  mempool_uaf_helper+0x11a/0x400
[   13.539129]  mempool_kmalloc_uaf+0xef/0x140
[   13.539708]  kunit_try_run_case+0x1a5/0x480
[   13.539928]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.540114]  kthread+0x337/0x6f0
[   13.540234]  ret_from_fork+0x116/0x1d0
[   13.540378]  ret_from_fork_asm+0x1a/0x30
[   13.540743] 
[   13.540924] The buggy address belongs to the object at ffff8881027d6e00
[   13.540924]  which belongs to the cache kmalloc-128 of size 128
[   13.542337] The buggy address is located 0 bytes inside of
[   13.542337]  freed 128-byte region [ffff8881027d6e00, ffff8881027d6e80)
[   13.543562] 
[   13.543750] The buggy address belongs to the physical page:
[   13.544254] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027d6
[   13.544943] flags: 0x200000000000000(node=0|zone=2)
[   13.545169] page_type: f5(slab)
[   13.545394] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   13.545885] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   13.546126] page dumped because: kasan: bad access detected
[   13.546297] 
[   13.546367] Memory state around the buggy address:
[   13.546612]  ffff8881027d6d00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.547158]  ffff8881027d6d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.547789] >ffff8881027d6e00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.548020]                    ^
[   13.548137]  ffff8881027d6e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.548352]  ffff8881027d6f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.548566] ==================================================================
[   13.576751] ==================================================================
[   13.577246] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x392/0x400
[   13.577799] Read of size 1 at addr ffff8881039b7240 by task kunit_try_catch/248
[   13.578593] 
[   13.578706] CPU: 1 UID: 0 PID: 248 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   13.578750] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.578788] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.578809] Call Trace:
[   13.578820]  <TASK>
[   13.578834]  dump_stack_lvl+0x73/0xb0
[   13.579018]  print_report+0xd1/0x610
[   13.579042]  ? __virt_addr_valid+0x1db/0x2d0
[   13.579064]  ? mempool_uaf_helper+0x392/0x400
[   13.579086]  ? kasan_complete_mode_report_info+0x64/0x200
[   13.579108]  ? mempool_uaf_helper+0x392/0x400
[   13.579129]  kasan_report+0x141/0x180
[   13.579151]  ? mempool_uaf_helper+0x392/0x400
[   13.579177]  __asan_report_load1_noabort+0x18/0x20
[   13.579200]  mempool_uaf_helper+0x392/0x400
[   13.579222]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   13.579251]  mempool_slab_uaf+0xea/0x140
[   13.579274]  ? __pfx_mempool_slab_uaf+0x10/0x10
[   13.579296]  ? schedule+0x7c/0x2e0
[   13.579317]  ? __pfx_mempool_alloc_slab+0x10/0x10
[   13.579341]  ? __pfx_mempool_free_slab+0x10/0x10
[   13.579366]  ? __pfx_read_tsc+0x10/0x10
[   13.579386]  ? ktime_get_ts64+0x86/0x230
[   13.579410]  kunit_try_run_case+0x1a5/0x480
[   13.579433]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.579454]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.579476]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.579498]  ? __kthread_parkme+0x82/0x180
[   13.579518]  ? preempt_count_sub+0x50/0x80
[   13.579540]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.579563]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.579586]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.579608]  kthread+0x337/0x6f0
[   13.579626]  ? trace_preempt_on+0x20/0xc0
[   13.579648]  ? __pfx_kthread+0x10/0x10
[   13.579668]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.579689]  ? calculate_sigpending+0x7b/0xa0
[   13.579710]  ? __pfx_kthread+0x10/0x10
[   13.579731]  ret_from_fork+0x116/0x1d0
[   13.579749]  ? __pfx_kthread+0x10/0x10
[   13.579770]  ret_from_fork_asm+0x1a/0x30
[   13.579799]  </TASK>
[   13.579809] 
[   13.590861] Allocated by task 248:
[   13.591065]  kasan_save_stack+0x45/0x70
[   13.591245]  kasan_save_track+0x18/0x40
[   13.591913]  kasan_save_alloc_info+0x3b/0x50
[   13.592130]  __kasan_mempool_unpoison_object+0x1bb/0x200
[   13.592473]  remove_element+0x11e/0x190
[   13.592663]  mempool_alloc_preallocated+0x4d/0x90
[   13.593121]  mempool_uaf_helper+0x96/0x400
[   13.593437]  mempool_slab_uaf+0xea/0x140
[   13.593664]  kunit_try_run_case+0x1a5/0x480
[   13.594032]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.594368]  kthread+0x337/0x6f0
[   13.594547]  ret_from_fork+0x116/0x1d0
[   13.594900]  ret_from_fork_asm+0x1a/0x30
[   13.595228] 
[   13.595305] Freed by task 248:
[   13.595501]  kasan_save_stack+0x45/0x70
[   13.595902]  kasan_save_track+0x18/0x40
[   13.596143]  kasan_save_free_info+0x3f/0x60
[   13.596556]  __kasan_mempool_poison_object+0x131/0x1d0
[   13.596886]  mempool_free+0x2ec/0x380
[   13.597079]  mempool_uaf_helper+0x11a/0x400
[   13.597455]  mempool_slab_uaf+0xea/0x140
[   13.597776]  kunit_try_run_case+0x1a5/0x480
[   13.597992]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.598247]  kthread+0x337/0x6f0
[   13.598403]  ret_from_fork+0x116/0x1d0
[   13.598884]  ret_from_fork_asm+0x1a/0x30
[   13.599049] 
[   13.599338] The buggy address belongs to the object at ffff8881039b7240
[   13.599338]  which belongs to the cache test_cache of size 123
[   13.600135] The buggy address is located 0 bytes inside of
[   13.600135]  freed 123-byte region [ffff8881039b7240, ffff8881039b72bb)
[   13.600759] 
[   13.600869] The buggy address belongs to the physical page:
[   13.601148] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039b7
[   13.601824] flags: 0x200000000000000(node=0|zone=2)
[   13.602066] page_type: f5(slab)
[   13.602240] raw: 0200000000000000 ffff8881027f2140 dead000000000122 0000000000000000
[   13.602763] raw: 0000000000000000 0000000080150015 00000000f5000000 0000000000000000
[   13.603225] page dumped because: kasan: bad access detected
[   13.603622] 
[   13.603724] Memory state around the buggy address:
[   13.603928]  ffff8881039b7100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   13.604260]  ffff8881039b7180: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.604797] >ffff8881039b7200: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
[   13.605180]                                            ^
[   13.605531]  ffff8881039b7280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   13.605994]  ffff8881039b7300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.606324] ==================================================================