Hay
Date
July 15, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   17.590260] ==================================================================
[   17.590324] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   17.590385] Read of size 1 at addr fff00000c78f4000 by task kunit_try_catch/234
[   17.590435] 
[   17.590469] CPU: 1 UID: 0 PID: 234 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   17.590554] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.590580] Hardware name: linux,dummy-virt (DT)
[   17.590611] Call trace:
[   17.590642]  show_stack+0x20/0x38 (C)
[   17.590896]  dump_stack_lvl+0x8c/0xd0
[   17.590976]  print_report+0x118/0x5d0
[   17.591493]  kasan_report+0xdc/0x128
[   17.591902]  __asan_report_load1_noabort+0x20/0x30
[   17.592467]  mempool_uaf_helper+0x314/0x340
[   17.592779]  mempool_page_alloc_uaf+0xc0/0x118
[   17.592854]  kunit_try_run_case+0x170/0x3f0
[   17.593030]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.593503]  kthread+0x328/0x630
[   17.593876]  ret_from_fork+0x10/0x20
[   17.593929] 
[   17.593950] The buggy address belongs to the physical page:
[   17.594057] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078f4
[   17.594120] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.594194] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   17.594389] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   17.594432] page dumped because: kasan: bad access detected
[   17.594465] 
[   17.594679] Memory state around the buggy address:
[   17.594731]  fff00000c78f3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.594776]  fff00000c78f3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.594821] >fff00000c78f4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.594860]                    ^
[   17.594896]  fff00000c78f4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.595091]  fff00000c78f4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.595158] ==================================================================
[   17.535121] ==================================================================
[   17.535205] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   17.537749] Read of size 1 at addr fff00000c78ec000 by task kunit_try_catch/230
[   17.538290] 
[   17.539020] CPU: 1 UID: 0 PID: 230 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   17.539655] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.539717] Hardware name: linux,dummy-virt (DT)
[   17.540487] Call trace:
[   17.540810]  show_stack+0x20/0x38 (C)
[   17.541045]  dump_stack_lvl+0x8c/0xd0
[   17.541101]  print_report+0x118/0x5d0
[   17.542167]  kasan_report+0xdc/0x128
[   17.542411]  __asan_report_load1_noabort+0x20/0x30
[   17.542598]  mempool_uaf_helper+0x314/0x340
[   17.543534]  mempool_kmalloc_large_uaf+0xc4/0x120
[   17.543712]  kunit_try_run_case+0x170/0x3f0
[   17.544096]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.544157]  kthread+0x328/0x630
[   17.544747]  ret_from_fork+0x10/0x20
[   17.545223] 
[   17.545398] The buggy address belongs to the physical page:
[   17.545617] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078ec
[   17.546345] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   17.547058] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   17.547465] page_type: f8(unknown)
[   17.548068] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   17.548266] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   17.548574] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   17.549066] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   17.549438] head: 0bfffe0000000002 ffffc1ffc31e3b01 00000000ffffffff 00000000ffffffff
[   17.549881] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   17.550198] page dumped because: kasan: bad access detected
[   17.550235] 
[   17.550453] Memory state around the buggy address:
[   17.550692]  fff00000c78ebf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.551785]  fff00000c78ebf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.551858] >fff00000c78ec000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.551901]                    ^
[   17.551930]  fff00000c78ec080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.551973]  fff00000c78ec100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.552481] ==================================================================

[   14.066282] ==================================================================
[   14.066961] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   14.067244] Read of size 1 at addr ffff8881039c8000 by task kunit_try_catch/246
[   14.067586] 
[   14.067691] CPU: 1 UID: 0 PID: 246 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   14.067734] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.067746] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.067778] Call Trace:
[   14.067790]  <TASK>
[   14.067804]  dump_stack_lvl+0x73/0xb0
[   14.067834]  print_report+0xd1/0x610
[   14.067856]  ? __virt_addr_valid+0x1db/0x2d0
[   14.067879]  ? mempool_uaf_helper+0x392/0x400
[   14.067903]  ? kasan_addr_to_slab+0x11/0xa0
[   14.067924]  ? mempool_uaf_helper+0x392/0x400
[   14.067949]  kasan_report+0x141/0x180
[   14.067974]  ? mempool_uaf_helper+0x392/0x400
[   14.068002]  __asan_report_load1_noabort+0x18/0x20
[   14.068029]  mempool_uaf_helper+0x392/0x400
[   14.068053]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   14.068076]  ? update_load_avg+0x1be/0x21b0
[   14.068101]  ? update_load_avg+0x1be/0x21b0
[   14.068122]  ? update_curr+0x80/0x810
[   14.068145]  ? finish_task_switch.isra.0+0x153/0x700
[   14.068172]  mempool_kmalloc_large_uaf+0xef/0x140
[   14.068199]  ? __pfx_mempool_kmalloc_large_uaf+0x10/0x10
[   14.068226]  ? __pfx_mempool_kmalloc+0x10/0x10
[   14.068251]  ? __pfx_mempool_kfree+0x10/0x10
[   14.068277]  ? __pfx_read_tsc+0x10/0x10
[   14.068299]  ? ktime_get_ts64+0x86/0x230
[   14.068323]  kunit_try_run_case+0x1a5/0x480
[   14.068349]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.068373]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.068398]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.068422]  ? __kthread_parkme+0x82/0x180
[   14.068443]  ? preempt_count_sub+0x50/0x80
[   14.068475]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.068501]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.068527]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.068553]  kthread+0x337/0x6f0
[   14.068573]  ? trace_preempt_on+0x20/0xc0
[   14.068597]  ? __pfx_kthread+0x10/0x10
[   14.068618]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.068640]  ? calculate_sigpending+0x7b/0xa0
[   14.068664]  ? __pfx_kthread+0x10/0x10
[   14.068687]  ret_from_fork+0x116/0x1d0
[   14.068706]  ? __pfx_kthread+0x10/0x10
[   14.068727]  ret_from_fork_asm+0x1a/0x30
[   14.068769]  </TASK>
[   14.068779] 
[   14.076845] The buggy address belongs to the physical page:
[   14.077062] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039c8
[   14.077317] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   14.077746] flags: 0x200000000000040(head|node=0|zone=2)
[   14.078008] page_type: f8(unknown)
[   14.078146] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   14.078378] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   14.078610] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   14.078957] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   14.079297] head: 0200000000000002 ffffea00040e7201 00000000ffffffff 00000000ffffffff
[   14.079719] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   14.079985] page dumped because: kasan: bad access detected
[   14.080240] 
[   14.080334] Memory state around the buggy address:
[   14.080599]  ffff8881039c7f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.080827]  ffff8881039c7f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.081044] >ffff8881039c8000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.081362]                    ^
[   14.081647]  ffff8881039c8080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.081979]  ffff8881039c8100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.082262] ==================================================================
[   14.124644] ==================================================================
[   14.125080] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   14.125313] Read of size 1 at addr ffff8881029d4000 by task kunit_try_catch/250
[   14.126047] 
[   14.126240] CPU: 0 UID: 0 PID: 250 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   14.126288] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.126301] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.126335] Call Trace:
[   14.126348]  <TASK>
[   14.126366]  dump_stack_lvl+0x73/0xb0
[   14.126402]  print_report+0xd1/0x610
[   14.126424]  ? __virt_addr_valid+0x1db/0x2d0
[   14.126510]  ? mempool_uaf_helper+0x392/0x400
[   14.126534]  ? kasan_addr_to_slab+0x11/0xa0
[   14.126568]  ? mempool_uaf_helper+0x392/0x400
[   14.126590]  kasan_report+0x141/0x180
[   14.126614]  ? mempool_uaf_helper+0x392/0x400
[   14.126643]  __asan_report_load1_noabort+0x18/0x20
[   14.126668]  mempool_uaf_helper+0x392/0x400
[   14.126692]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   14.126715]  ? update_load_avg+0x1be/0x21b0
[   14.126748]  ? dequeue_entities+0x27e/0x1740
[   14.126788]  ? finish_task_switch.isra.0+0x153/0x700
[   14.126816]  mempool_page_alloc_uaf+0xed/0x140
[   14.126840]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   14.126868]  ? __pfx_mempool_alloc_pages+0x10/0x10
[   14.126896]  ? __pfx_mempool_free_pages+0x10/0x10
[   14.126924]  ? __pfx_read_tsc+0x10/0x10
[   14.126946]  ? ktime_get_ts64+0x86/0x230
[   14.126971]  kunit_try_run_case+0x1a5/0x480
[   14.126998]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.127021]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.127047]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.127071]  ? __kthread_parkme+0x82/0x180
[   14.127093]  ? preempt_count_sub+0x50/0x80
[   14.127116]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.127141]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.127166]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.127193]  kthread+0x337/0x6f0
[   14.127212]  ? trace_preempt_on+0x20/0xc0
[   14.127237]  ? __pfx_kthread+0x10/0x10
[   14.127258]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.127280]  ? calculate_sigpending+0x7b/0xa0
[   14.127304]  ? __pfx_kthread+0x10/0x10
[   14.127327]  ret_from_fork+0x116/0x1d0
[   14.127426]  ? __pfx_kthread+0x10/0x10
[   14.127460]  ret_from_fork_asm+0x1a/0x30
[   14.127493]  </TASK>
[   14.127503] 
[   14.142314] The buggy address belongs to the physical page:
[   14.142837] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029d4
[   14.143089] flags: 0x200000000000000(node=0|zone=2)
[   14.143267] raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000
[   14.143992] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   14.144693] page dumped because: kasan: bad access detected
[   14.145305] 
[   14.145544] Memory state around the buggy address:
[   14.146008]  ffff8881029d3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.146669]  ffff8881029d3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.147094] >ffff8881029d4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.147312]                    ^
[   14.147772]  ffff8881029d4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.148438]  ffff8881029d4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.149137] ==================================================================