Hay
Date
May 12, 2025, 6:12 p.m.

Environment
qemu-arm64
qemu-x86_64

[   20.435841] ==================================================================
[   20.436296] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   20.436533] Read of size 1 at addr fff00000c6658000 by task kunit_try_catch/218
[   20.437288] 
[   20.437427] CPU: 0 UID: 0 PID: 218 Comm: kunit_try_catch Tainted: G    B            N 6.14.7-rc1 #1
[   20.437530] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.437562] Hardware name: linux,dummy-virt (DT)
[   20.437600] Call trace:
[   20.437627]  show_stack+0x20/0x38 (C)
[   20.437687]  dump_stack_lvl+0x8c/0xd0
[   20.437757]  print_report+0x118/0x608
[   20.437817]  kasan_report+0xdc/0x128
[   20.437866]  __asan_report_load1_noabort+0x20/0x30
[   20.437918]  mempool_uaf_helper+0x314/0x340
[   20.437967]  mempool_kmalloc_large_uaf+0xc4/0x120
[   20.438019]  kunit_try_run_case+0x170/0x3f0
[   20.438114]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.438174]  kthread+0x318/0x620
[   20.438226]  ret_from_fork+0x10/0x20
[   20.438282] 
[   20.441700] The buggy address belongs to the physical page:
[   20.441971] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106658
[   20.442264] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   20.443191] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   20.444442] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   20.445069] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   20.445445] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   20.445861] head: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   20.446271] head: 0bfffe0000000002 ffffc1ffc3199601 ffffffffffffffff 0000000000000000
[   20.446733] head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
[   20.447120] page dumped because: kasan: bad access detected
[   20.447393] 
[   20.447564] Memory state around the buggy address:
[   20.447843]  fff00000c6657f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.448226]  fff00000c6657f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.448580] >fff00000c6658000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.449214]                    ^
[   20.449574]  fff00000c6658080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.450002]  fff00000c6658100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.450279] ==================================================================
[   20.496383] ==================================================================
[   20.497008] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   20.497514] Read of size 1 at addr fff00000c65fc000 by task kunit_try_catch/222
[   20.497883] 
[   20.498142] CPU: 1 UID: 0 PID: 222 Comm: kunit_try_catch Tainted: G    B            N 6.14.7-rc1 #1
[   20.498244] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.498276] Hardware name: linux,dummy-virt (DT)
[   20.498314] Call trace:
[   20.498343]  show_stack+0x20/0x38 (C)
[   20.498404]  dump_stack_lvl+0x8c/0xd0
[   20.498476]  print_report+0x118/0x608
[   20.498557]  kasan_report+0xdc/0x128
[   20.498612]  __asan_report_load1_noabort+0x20/0x30
[   20.498684]  mempool_uaf_helper+0x314/0x340
[   20.498840]  mempool_page_alloc_uaf+0xc0/0x118
[   20.498929]  kunit_try_run_case+0x170/0x3f0
[   20.499081]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.499238]  kthread+0x318/0x620
[   20.499375]  ret_from_fork+0x10/0x20
[   20.499438] 
[   20.503274] The buggy address belongs to the physical page:
[   20.504077] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1065fc
[   20.504508] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.504876] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   20.505232] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   20.505561] page dumped because: kasan: bad access detected
[   20.506191] 
[   20.506756] Memory state around the buggy address:
[   20.506969]  fff00000c65fbf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.507540]  fff00000c65fbf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.507834] >fff00000c65fc000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.508386]                    ^
[   20.508657]  fff00000c65fc080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.509051]  fff00000c65fc100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.509490] ==================================================================

[   14.002595] ==================================================================
[   14.004902] BUG: KASAN: use-after-free in mempool_uaf_helper+0x394/0x400
[   14.005867] Read of size 1 at addr ffff888102d1c000 by task kunit_try_catch/241
[   14.006959] 
[   14.007359] CPU: 0 UID: 0 PID: 241 Comm: kunit_try_catch Tainted: G    B            N 6.14.7-rc1 #1
[   14.007417] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.007430] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.007454] Call Trace:
[   14.007479]  <TASK>
[   14.007502]  dump_stack_lvl+0x73/0xb0
[   14.007538]  print_report+0xd1/0x650
[   14.007607]  ? __virt_addr_valid+0x1db/0x2d0
[   14.007646]  ? mempool_uaf_helper+0x394/0x400
[   14.007670]  ? kasan_addr_to_slab+0x11/0xa0
[   14.007691]  ? mempool_uaf_helper+0x394/0x400
[   14.007724]  kasan_report+0x140/0x180
[   14.007746]  ? mempool_uaf_helper+0x394/0x400
[   14.007772]  __asan_report_load1_noabort+0x18/0x20
[   14.007797]  mempool_uaf_helper+0x394/0x400
[   14.007819]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   14.007854]  ? finish_task_switch.isra.0+0x153/0x700
[   14.007883]  mempool_page_alloc_uaf+0xee/0x140
[   14.007908]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   14.007933]  ? __pfx_mempool_alloc_pages+0x10/0x10
[   14.007957]  ? __pfx_mempool_free_pages+0x10/0x10
[   14.007979]  ? __pfx_read_tsc+0x10/0x10
[   14.008001]  ? ktime_get_ts64+0x86/0x230
[   14.008028]  kunit_try_run_case+0x1a6/0x480
[   14.008073]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.008094]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   14.008117]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.008158]  ? __kthread_parkme+0x82/0x160
[   14.008194]  ? preempt_count_sub+0x50/0x80
[   14.008219]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.008242]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.008267]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.008293]  kthread+0x324/0x6e0
[   14.008314]  ? trace_preempt_on+0x20/0xc0
[   14.008339]  ? __pfx_kthread+0x10/0x10
[   14.008361]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.008384]  ? calculate_sigpending+0x7b/0xa0
[   14.008407]  ? __pfx_kthread+0x10/0x10
[   14.008429]  ret_from_fork+0x41/0x80
[   14.008449]  ? __pfx_kthread+0x10/0x10
[   14.008470]  ret_from_fork_asm+0x1a/0x30
[   14.008502]  </TASK>
[   14.008514] 
[   14.020474] The buggy address belongs to the physical page:
[   14.020762] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102d1c
[   14.022116] flags: 0x200000000000000(node=0|zone=2)
[   14.023389] raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000
[   14.023652] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   14.023899] page dumped because: kasan: bad access detected
[   14.024217] 
[   14.024385] Memory state around the buggy address:
[   14.024876]  ffff888102d1bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.025852]  ffff888102d1bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.026655] >ffff888102d1c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.027652]                    ^
[   14.027783]  ffff888102d1c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.028012]  ffff888102d1c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.028902] ==================================================================
[   13.944765] ==================================================================
[   13.945281] BUG: KASAN: use-after-free in mempool_uaf_helper+0x394/0x400
[   13.945737] Read of size 1 at addr ffff888102d1c000 by task kunit_try_catch/237
[   13.946142] 
[   13.946234] CPU: 0 UID: 0 PID: 237 Comm: kunit_try_catch Tainted: G    B            N 6.14.7-rc1 #1
[   13.946343] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.946358] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.946381] Call Trace:
[   13.946436]  <TASK>
[   13.946457]  dump_stack_lvl+0x73/0xb0
[   13.946489]  print_report+0xd1/0x650
[   13.946513]  ? __virt_addr_valid+0x1db/0x2d0
[   13.946537]  ? mempool_uaf_helper+0x394/0x400
[   13.946610]  ? kasan_addr_to_slab+0x11/0xa0
[   13.946631]  ? mempool_uaf_helper+0x394/0x400
[   13.946653]  kasan_report+0x140/0x180
[   13.946674]  ? mempool_uaf_helper+0x394/0x400
[   13.946699]  __asan_report_load1_noabort+0x18/0x20
[   13.946723]  mempool_uaf_helper+0x394/0x400
[   13.946776]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   13.946801]  ? finish_task_switch.isra.0+0x153/0x700
[   13.946833]  mempool_kmalloc_large_uaf+0xf0/0x140
[   13.946866]  ? __pfx_mempool_kmalloc_large_uaf+0x10/0x10
[   13.946891]  ? __pfx_mempool_kmalloc+0x10/0x10
[   13.946940]  ? __pfx_mempool_kfree+0x10/0x10
[   13.946962]  ? __pfx_read_tsc+0x10/0x10
[   13.946985]  ? ktime_get_ts64+0x86/0x230
[   13.947058]  kunit_try_run_case+0x1a6/0x480
[   13.947087]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.947109]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   13.947132]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.947157]  ? __kthread_parkme+0x82/0x160
[   13.947182]  ? preempt_count_sub+0x50/0x80
[   13.947209]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.947231]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.947257]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.947283]  kthread+0x324/0x6e0
[   13.947306]  ? trace_preempt_on+0x20/0xc0
[   13.947330]  ? __pfx_kthread+0x10/0x10
[   13.947353]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.947377]  ? calculate_sigpending+0x7b/0xa0
[   13.947400]  ? __pfx_kthread+0x10/0x10
[   13.947423]  ret_from_fork+0x41/0x80
[   13.947443]  ? __pfx_kthread+0x10/0x10
[   13.947465]  ret_from_fork_asm+0x1a/0x30
[   13.947497]  </TASK>
[   13.947508] 
[   13.957952] The buggy address belongs to the physical page:
[   13.958447] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102d1c
[   13.958800] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   13.959463] flags: 0x200000000000040(head|node=0|zone=2)
[   13.959802] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.960457] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   13.960885] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.961675] head: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   13.962287] head: 0200000000000002 ffffea00040b4701 ffffffffffffffff 0000000000000000
[   13.962786] head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
[   13.963731] page dumped because: kasan: bad access detected
[   13.964132] 
[   13.964229] Memory state around the buggy address:
[   13.964683]  ffff888102d1bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.964981]  ffff888102d1bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.965681] >ffff888102d1c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.966131]                    ^
[   13.966295]  ffff888102d1c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.966590]  ffff888102d1c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.966886] ==================================================================