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

Environment
qemu-arm64
qemu-x86_64

[   17.361635] ==================================================================
[   17.361922] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   17.362116] Read of size 1 at addr fff00000c78e4000 by task kunit_try_catch/233
[   17.362321] 
[   17.362446] CPU: 0 UID: 0 PID: 233 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   17.362590] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.362617] Hardware name: linux,dummy-virt (DT)
[   17.362650] Call trace:
[   17.362674]  show_stack+0x20/0x38 (C)
[   17.362857]  dump_stack_lvl+0x8c/0xd0
[   17.362940]  print_report+0x118/0x5d0
[   17.363207]  kasan_report+0xdc/0x128
[   17.363419]  __asan_report_load1_noabort+0x20/0x30
[   17.363640]  mempool_uaf_helper+0x314/0x340
[   17.363756]  mempool_page_alloc_uaf+0xc0/0x118
[   17.363802]  kunit_try_run_case+0x170/0x3f0
[   17.363860]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.363910]  kthread+0x328/0x630
[   17.363977]  ret_from_fork+0x10/0x20
[   17.364213] 
[   17.364236] The buggy address belongs to the physical page:
[   17.364347] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078e4
[   17.364414] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.364480] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   17.364529] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   17.364571] page dumped because: kasan: bad access detected
[   17.364601] 
[   17.364621] Memory state around the buggy address:
[   17.364652]  fff00000c78e3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.364705]  fff00000c78e3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.364748] >fff00000c78e4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.364785]                    ^
[   17.364824]  fff00000c78e4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.364866]  fff00000c78e4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.364904] ==================================================================
[   17.321435] ==================================================================
[   17.321490] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   17.321537] Read of size 1 at addr fff00000c78e4000 by task kunit_try_catch/229
[   17.321585] 
[   17.321625] CPU: 0 UID: 0 PID: 229 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   17.321758] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.321786] Hardware name: linux,dummy-virt (DT)
[   17.321818] Call trace:
[   17.321841]  show_stack+0x20/0x38 (C)
[   17.321944]  dump_stack_lvl+0x8c/0xd0
[   17.321991]  print_report+0x118/0x5d0
[   17.322038]  kasan_report+0xdc/0x128
[   17.322351]  __asan_report_load1_noabort+0x20/0x30
[   17.322402]  mempool_uaf_helper+0x314/0x340
[   17.322448]  mempool_kmalloc_large_uaf+0xc4/0x120
[   17.322496]  kunit_try_run_case+0x170/0x3f0
[   17.322553]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.322606]  kthread+0x328/0x630
[   17.322648]  ret_from_fork+0x10/0x20
[   17.322705] 
[   17.322726] The buggy address belongs to the physical page:
[   17.322758] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078e4
[   17.322817] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   17.322883] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   17.323140] page_type: f8(unknown)
[   17.323322] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   17.323564] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   17.323703] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   17.323754] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   17.323803] head: 0bfffe0000000002 ffffc1ffc31e3901 00000000ffffffff 00000000ffffffff
[   17.323854] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   17.323904] page dumped because: kasan: bad access detected
[   17.323935] 
[   17.323953] Memory state around the buggy address:
[   17.323986]  fff00000c78e3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.324108]  fff00000c78e3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.324153] >fff00000c78e4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.324191]                    ^
[   17.324220]  fff00000c78e4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.324263]  fff00000c78e4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.324302] ==================================================================

[   13.614591] ==================================================================
[   13.615128] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   13.615369] Read of size 1 at addr ffff888103a68000 by task kunit_try_catch/250
[   13.616226] 
[   13.616425] CPU: 0 UID: 0 PID: 250 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   13.616471] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.616483] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.616505] Call Trace:
[   13.616517]  <TASK>
[   13.616532]  dump_stack_lvl+0x73/0xb0
[   13.616612]  print_report+0xd1/0x610
[   13.616635]  ? __virt_addr_valid+0x1db/0x2d0
[   13.616886]  ? mempool_uaf_helper+0x392/0x400
[   13.616907]  ? kasan_addr_to_slab+0x11/0xa0
[   13.616926]  ? mempool_uaf_helper+0x392/0x400
[   13.616948]  kasan_report+0x141/0x180
[   13.616973]  ? mempool_uaf_helper+0x392/0x400
[   13.616999]  __asan_report_load1_noabort+0x18/0x20
[   13.617032]  mempool_uaf_helper+0x392/0x400
[   13.617054]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   13.617076]  ? __kasan_check_write+0x18/0x20
[   13.617095]  ? __pfx_sched_clock_cpu+0x10/0x10
[   13.617117]  ? finish_task_switch.isra.0+0x153/0x700
[   13.617141]  mempool_page_alloc_uaf+0xed/0x140
[   13.617164]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   13.617190]  ? __pfx_mempool_alloc_pages+0x10/0x10
[   13.617213]  ? __pfx_mempool_free_pages+0x10/0x10
[   13.617238]  ? __pfx_read_tsc+0x10/0x10
[   13.617258]  ? ktime_get_ts64+0x86/0x230
[   13.617281]  kunit_try_run_case+0x1a5/0x480
[   13.617306]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.617327]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.617350]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.617385]  ? __kthread_parkme+0x82/0x180
[   13.617407]  ? preempt_count_sub+0x50/0x80
[   13.617429]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.617452]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.617474]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.617496]  kthread+0x337/0x6f0
[   13.617515]  ? trace_preempt_on+0x20/0xc0
[   13.617537]  ? __pfx_kthread+0x10/0x10
[   13.617557]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.617577]  ? calculate_sigpending+0x7b/0xa0
[   13.617599]  ? __pfx_kthread+0x10/0x10
[   13.617619]  ret_from_fork+0x116/0x1d0
[   13.617637]  ? __pfx_kthread+0x10/0x10
[   13.617657]  ret_from_fork_asm+0x1a/0x30
[   13.617687]  </TASK>
[   13.617698] 
[   13.633979] The buggy address belongs to the physical page:
[   13.634737] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a68
[   13.635192] flags: 0x200000000000000(node=0|zone=2)
[   13.635429] raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000
[   13.636116] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   13.636347] page dumped because: kasan: bad access detected
[   13.636936] 
[   13.637129] Memory state around the buggy address:
[   13.637619]  ffff888103a67f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.638042]  ffff888103a67f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.638261] >ffff888103a68000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.638949]                    ^
[   13.639275]  ffff888103a68080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.640001]  ffff888103a68100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.640679] ==================================================================
[   13.552734] ==================================================================
[   13.553707] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   13.554017] Read of size 1 at addr ffff8881039f4000 by task kunit_try_catch/246
[   13.554315] 
[   13.554703] CPU: 1 UID: 0 PID: 246 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   13.554751] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.554763] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.554784] Call Trace:
[   13.554795]  <TASK>
[   13.554810]  dump_stack_lvl+0x73/0xb0
[   13.554839]  print_report+0xd1/0x610
[   13.554873]  ? __virt_addr_valid+0x1db/0x2d0
[   13.554895]  ? mempool_uaf_helper+0x392/0x400
[   13.554916]  ? kasan_addr_to_slab+0x11/0xa0
[   13.554948]  ? mempool_uaf_helper+0x392/0x400
[   13.554970]  kasan_report+0x141/0x180
[   13.554991]  ? mempool_uaf_helper+0x392/0x400
[   13.555026]  __asan_report_load1_noabort+0x18/0x20
[   13.555059]  mempool_uaf_helper+0x392/0x400
[   13.555081]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   13.555102]  ? update_load_avg+0x1be/0x21b0
[   13.555139]  ? finish_task_switch.isra.0+0x153/0x700
[   13.555164]  mempool_kmalloc_large_uaf+0xef/0x140
[   13.555186]  ? __pfx_mempool_kmalloc_large_uaf+0x10/0x10
[   13.555211]  ? __pfx_mempool_kmalloc+0x10/0x10
[   13.555234]  ? __pfx_mempool_kfree+0x10/0x10
[   13.555267]  ? __pfx_read_tsc+0x10/0x10
[   13.555287]  ? ktime_get_ts64+0x86/0x230
[   13.555310]  kunit_try_run_case+0x1a5/0x480
[   13.555343]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.555436]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.555465]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.555488]  ? __kthread_parkme+0x82/0x180
[   13.555508]  ? preempt_count_sub+0x50/0x80
[   13.555531]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.555554]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.555576]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.555599]  kthread+0x337/0x6f0
[   13.555617]  ? trace_preempt_on+0x20/0xc0
[   13.555639]  ? __pfx_kthread+0x10/0x10
[   13.555658]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.555679]  ? calculate_sigpending+0x7b/0xa0
[   13.555701]  ? __pfx_kthread+0x10/0x10
[   13.555722]  ret_from_fork+0x116/0x1d0
[   13.555739]  ? __pfx_kthread+0x10/0x10
[   13.555759]  ret_from_fork_asm+0x1a/0x30
[   13.555789]  </TASK>
[   13.555799] 
[   13.565744] The buggy address belongs to the physical page:
[   13.566058] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039f4
[   13.566619] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   13.566984] flags: 0x200000000000040(head|node=0|zone=2)
[   13.567214] page_type: f8(unknown)
[   13.567461] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.567787] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   13.568129] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.568590] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   13.568934] head: 0200000000000002 ffffea00040e7d01 00000000ffffffff 00000000ffffffff
[   13.569262] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   13.569653] page dumped because: kasan: bad access detected
[   13.569877] 
[   13.569994] Memory state around the buggy address:
[   13.570209]  ffff8881039f3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.570726]  ffff8881039f3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.571104] >ffff8881039f4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.571438]                    ^
[   13.571569]  ffff8881039f4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.571784]  ffff8881039f4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.572001] ==================================================================