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

Environment
qemu-arm64
qemu-x86_64

[   18.044711] ==================================================================
[   18.045272] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   18.045397] Read of size 1 at addr fff00000c780c000 by task kunit_try_catch/233
[   18.045451] 
[   18.045532] CPU: 0 UID: 0 PID: 233 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   18.046068] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.046154] Hardware name: linux,dummy-virt (DT)
[   18.046190] Call trace:
[   18.046221]  show_stack+0x20/0x38 (C)
[   18.046618]  dump_stack_lvl+0x8c/0xd0
[   18.046776]  print_report+0x118/0x608
[   18.046879]  kasan_report+0xdc/0x128
[   18.047243]  __asan_report_load1_noabort+0x20/0x30
[   18.047307]  mempool_uaf_helper+0x314/0x340
[   18.047618]  mempool_page_alloc_uaf+0xc0/0x118
[   18.047954]  kunit_try_run_case+0x170/0x3f0
[   18.048364]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.048506]  kthread+0x328/0x630
[   18.048851]  ret_from_fork+0x10/0x20
[   18.048986] 
[   18.049054] The buggy address belongs to the physical page:
[   18.049136] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10780c
[   18.049581] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.050049] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   18.050201] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   18.050291] page dumped because: kasan: bad access detected
[   18.050344] 
[   18.050423] Memory state around the buggy address:
[   18.050599]  fff00000c780bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.050816]  fff00000c780bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.050906] >fff00000c780c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.050984]                    ^
[   18.051296]  fff00000c780c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.051490]  fff00000c780c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.051537] ==================================================================
[   17.999999] ==================================================================
[   18.000106] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   18.000183] Read of size 1 at addr fff00000c780c000 by task kunit_try_catch/229
[   18.000251] 
[   18.000314] CPU: 0 UID: 0 PID: 229 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   18.000417] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.000444] Hardware name: linux,dummy-virt (DT)
[   18.000493] Call trace:
[   18.000516]  show_stack+0x20/0x38 (C)
[   18.000586]  dump_stack_lvl+0x8c/0xd0
[   18.000636]  print_report+0x118/0x608
[   18.000684]  kasan_report+0xdc/0x128
[   18.000906]  __asan_report_load1_noabort+0x20/0x30
[   18.001010]  mempool_uaf_helper+0x314/0x340
[   18.001096]  mempool_kmalloc_large_uaf+0xc4/0x120
[   18.001169]  kunit_try_run_case+0x170/0x3f0
[   18.001220]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.001358]  kthread+0x328/0x630
[   18.001504]  ret_from_fork+0x10/0x20
[   18.001602] 
[   18.001642] The buggy address belongs to the physical page:
[   18.001678] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10780c
[   18.001733] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   18.001868] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   18.001972] page_type: f8(unknown)
[   18.002050] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   18.002134] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   18.002186] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   18.002243] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   18.002289] head: 0bfffe0000000002 ffffc1ffc31e0301 00000000ffffffff 00000000ffffffff
[   18.002616] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   18.002707] page dumped because: kasan: bad access detected
[   18.002774] 
[   18.002854] Memory state around the buggy address:
[   18.002912]  fff00000c780bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.003006]  fff00000c780bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.003116] >fff00000c780c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.003153]                    ^
[   18.003198]  fff00000c780c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.003502]  fff00000c780c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.003582] ==================================================================

[   14.235558] ==================================================================
[   14.237052] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   14.238142] Read of size 1 at addr ffff8881039f4000 by task kunit_try_catch/246
[   14.239266] 
[   14.239584] CPU: 0 UID: 0 PID: 246 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   14.239633] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.239655] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.239677] Call Trace:
[   14.239689]  <TASK>
[   14.239705]  dump_stack_lvl+0x73/0xb0
[   14.239737]  print_report+0xd1/0x650
[   14.239758]  ? __virt_addr_valid+0x1db/0x2d0
[   14.239786]  ? mempool_uaf_helper+0x392/0x400
[   14.239808]  ? kasan_addr_to_slab+0x11/0xa0
[   14.239828]  ? mempool_uaf_helper+0x392/0x400
[   14.239850]  kasan_report+0x141/0x180
[   14.239871]  ? mempool_uaf_helper+0x392/0x400
[   14.239897]  __asan_report_load1_noabort+0x18/0x20
[   14.240023]  mempool_uaf_helper+0x392/0x400
[   14.240048]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   14.240074]  ? __pfx_sched_clock_cpu+0x10/0x10
[   14.240096]  ? irqentry_exit+0x2a/0x60
[   14.240119]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   14.240146]  mempool_kmalloc_large_uaf+0xef/0x140
[   14.240169]  ? __pfx_mempool_kmalloc_large_uaf+0x10/0x10
[   14.240204]  ? __pfx_mempool_kmalloc+0x10/0x10
[   14.240228]  ? __pfx_mempool_kfree+0x10/0x10
[   14.240253]  ? __pfx_mempool_kmalloc_large_uaf+0x10/0x10
[   14.240279]  ? __pfx_mempool_kmalloc_large_uaf+0x10/0x10
[   14.240305]  kunit_try_run_case+0x1a5/0x480
[   14.240330]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.240387]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.240412]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.240436]  ? __kthread_parkme+0x82/0x180
[   14.240457]  ? preempt_count_sub+0x50/0x80
[   14.240481]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.240505]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.240529]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.240564]  kthread+0x337/0x6f0
[   14.240583]  ? trace_preempt_on+0x20/0xc0
[   14.240606]  ? __pfx_kthread+0x10/0x10
[   14.240626]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.240649]  ? calculate_sigpending+0x7b/0xa0
[   14.240672]  ? __pfx_kthread+0x10/0x10
[   14.240693]  ret_from_fork+0x116/0x1d0
[   14.240712]  ? __pfx_kthread+0x10/0x10
[   14.240732]  ret_from_fork_asm+0x1a/0x30
[   14.240763]  </TASK>
[   14.240773] 
[   14.256985] The buggy address belongs to the physical page:
[   14.257271] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039f4
[   14.258114] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   14.258629] flags: 0x200000000000040(head|node=0|zone=2)
[   14.258872] page_type: f8(unknown)
[   14.259035] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   14.259344] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   14.259584] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   14.260090] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   14.260372] head: 0200000000000002 ffffea00040e7d01 00000000ffffffff 00000000ffffffff
[   14.260749] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   14.261046] page dumped because: kasan: bad access detected
[   14.261299] 
[   14.261401] Memory state around the buggy address:
[   14.261662]  ffff8881039f3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.261938]  ffff8881039f3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.262255] >ffff8881039f4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.262594]                    ^
[   14.262732]  ffff8881039f4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.263050]  ffff8881039f4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.263338] ==================================================================
[   14.304126] ==================================================================
[   14.305379] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   14.305930] Read of size 1 at addr ffff8881039f4000 by task kunit_try_catch/251
[   14.306160] 
[   14.306249] CPU: 0 UID: 0 PID: 251 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   14.306293] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.306304] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.306324] Call Trace:
[   14.306339]  <TASK>
[   14.306377]  dump_stack_lvl+0x73/0xb0
[   14.306411]  print_report+0xd1/0x650
[   14.306433]  ? __virt_addr_valid+0x1db/0x2d0
[   14.306458]  ? mempool_uaf_helper+0x392/0x400
[   14.306480]  ? kasan_addr_to_slab+0x11/0xa0
[   14.306500]  ? mempool_uaf_helper+0x392/0x400
[   14.306523]  kasan_report+0x141/0x180
[   14.306544]  ? mempool_uaf_helper+0x392/0x400
[   14.306572]  __asan_report_load1_noabort+0x18/0x20
[   14.306597]  mempool_uaf_helper+0x392/0x400
[   14.306619]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   14.306642]  ? update_load_avg+0x1be/0x21b0
[   14.306666]  ? dequeue_entities+0x27e/0x1740
[   14.306692]  ? finish_task_switch.isra.0+0x153/0x700
[   14.306718]  mempool_page_alloc_uaf+0xed/0x140
[   14.306742]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   14.306769]  ? __pfx_mempool_alloc_pages+0x10/0x10
[   14.306795]  ? __pfx_mempool_free_pages+0x10/0x10
[   14.306822]  ? __pfx_read_tsc+0x10/0x10
[   14.306843]  ? ktime_get_ts64+0x86/0x230
[   14.306868]  kunit_try_run_case+0x1a5/0x480
[   14.306893]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.306916]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.306940]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.306966]  ? __kthread_parkme+0x82/0x180
[   14.306987]  ? preempt_count_sub+0x50/0x80
[   14.307011]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.307039]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.307065]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.307091]  kthread+0x337/0x6f0
[   14.307109]  ? trace_preempt_on+0x20/0xc0
[   14.307133]  ? __pfx_kthread+0x10/0x10
[   14.307155]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.307177]  ? calculate_sigpending+0x7b/0xa0
[   14.307201]  ? __pfx_kthread+0x10/0x10
[   14.307223]  ret_from_fork+0x116/0x1d0
[   14.307241]  ? __pfx_kthread+0x10/0x10
[   14.307262]  ret_from_fork_asm+0x1a/0x30
[   14.307295]  </TASK>
[   14.307306] 
[   14.318841] The buggy address belongs to the physical page:
[   14.319160] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039f4
[   14.319805] flags: 0x200000000000000(node=0|zone=2)
[   14.320046] raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000
[   14.321250] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   14.321789] page dumped because: kasan: bad access detected
[   14.322070] 
[   14.322171] Memory state around the buggy address:
[   14.322471]  ffff8881039f3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.322895]  ffff8881039f3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.323309] >ffff8881039f4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.323792]                    ^
[   14.324268]  ffff8881039f4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.324695]  ffff8881039f4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.324981] ==================================================================