Hay
Date
July 5, 2025, 5:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   20.200520] ==================================================================
[   20.200605] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   20.200689] Read of size 1 at addr fff00000c7964000 by task kunit_try_catch/233
[   20.200850] 
[   20.200908] CPU: 0 UID: 0 PID: 233 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   20.200993] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.201019] Hardware name: linux,dummy-virt (DT)
[   20.201072] Call trace:
[   20.201121]  show_stack+0x20/0x38 (C)
[   20.201176]  dump_stack_lvl+0x8c/0xd0
[   20.201244]  print_report+0x118/0x608
[   20.201290]  kasan_report+0xdc/0x128
[   20.201363]  __asan_report_load1_noabort+0x20/0x30
[   20.201421]  mempool_uaf_helper+0x314/0x340
[   20.201477]  mempool_page_alloc_uaf+0xc0/0x118
[   20.201523]  kunit_try_run_case+0x170/0x3f0
[   20.201572]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.201729]  kthread+0x328/0x630
[   20.201817]  ret_from_fork+0x10/0x20
[   20.201908] 
[   20.201933] The buggy address belongs to the physical page:
[   20.201972] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107964
[   20.202026] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.202088] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   20.202138] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   20.202178] page dumped because: kasan: bad access detected
[   20.202210] 
[   20.202227] Memory state around the buggy address:
[   20.202259]  fff00000c7963f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.202302]  fff00000c7963f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.202345] >fff00000c7964000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.202383]                    ^
[   20.202409]  fff00000c7964080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.202449]  fff00000c7964100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.202485] ==================================================================
[   20.133931] ==================================================================
[   20.133996] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   20.134051] Read of size 1 at addr fff00000c7918000 by task kunit_try_catch/229
[   20.135813] 
[   20.135992] CPU: 1 UID: 0 PID: 229 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   20.136856] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.137160] Hardware name: linux,dummy-virt (DT)
[   20.137905] Call trace:
[   20.137930]  show_stack+0x20/0x38 (C)
[   20.138544]  dump_stack_lvl+0x8c/0xd0
[   20.138650]  print_report+0x118/0x608
[   20.139161]  kasan_report+0xdc/0x128
[   20.139380]  __asan_report_load1_noabort+0x20/0x30
[   20.140082]  mempool_uaf_helper+0x314/0x340
[   20.140235]  mempool_kmalloc_large_uaf+0xc4/0x120
[   20.140285]  kunit_try_run_case+0x170/0x3f0
[   20.140710]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.141168]  kthread+0x328/0x630
[   20.141831]  ret_from_fork+0x10/0x20
[   20.142694] 
[   20.142887] The buggy address belongs to the physical page:
[   20.142924] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107918
[   20.143273] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   20.143844] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   20.144371] page_type: f8(unknown)
[   20.144778] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   20.144951] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   20.145760] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   20.146220] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   20.146581] head: 0bfffe0000000002 ffffc1ffc31e4601 00000000ffffffff 00000000ffffffff
[   20.146928] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   20.146970] page dumped because: kasan: bad access detected
[   20.147003] 
[   20.148014] Memory state around the buggy address:
[   20.148151]  fff00000c7917f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.148381]  fff00000c7917f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.149560] >fff00000c7918000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.149670]                    ^
[   20.149829]  fff00000c7918080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.149894]  fff00000c7918100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.149933] ==================================================================

[   13.136378] ==================================================================
[   13.136921] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   13.137211] Read of size 1 at addr ffff88810395c000 by task kunit_try_catch/247
[   13.137665] 
[   13.137774] CPU: 1 UID: 0 PID: 247 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   13.137819] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.137832] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.137854] Call Trace:
[   13.137866]  <TASK>
[   13.137883]  dump_stack_lvl+0x73/0xb0
[   13.137912]  print_report+0xd1/0x650
[   13.137934]  ? __virt_addr_valid+0x1db/0x2d0
[   13.137958]  ? mempool_uaf_helper+0x392/0x400
[   13.137980]  ? kasan_addr_to_slab+0x11/0xa0
[   13.138002]  ? mempool_uaf_helper+0x392/0x400
[   13.138025]  kasan_report+0x141/0x180
[   13.138048]  ? mempool_uaf_helper+0x392/0x400
[   13.138075]  __asan_report_load1_noabort+0x18/0x20
[   13.138099]  mempool_uaf_helper+0x392/0x400
[   13.138123]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   13.138144]  ? update_load_avg+0x1be/0x21b0
[   13.138167]  ? update_load_avg+0x1be/0x21b0
[   13.138187]  ? update_curr+0x80/0x810
[   13.138210]  ? finish_task_switch.isra.0+0x153/0x700
[   13.138235]  mempool_kmalloc_large_uaf+0xef/0x140
[   13.138327]  ? __pfx_mempool_kmalloc_large_uaf+0x10/0x10
[   13.138357]  ? __pfx_mempool_kmalloc+0x10/0x10
[   13.138382]  ? __pfx_mempool_kfree+0x10/0x10
[   13.138407]  ? __pfx_read_tsc+0x10/0x10
[   13.138428]  ? ktime_get_ts64+0x86/0x230
[   13.138463]  kunit_try_run_case+0x1a5/0x480
[   13.138488]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.138512]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.138535]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.138558]  ? __kthread_parkme+0x82/0x180
[   13.138579]  ? preempt_count_sub+0x50/0x80
[   13.138602]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.138625]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.138649]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.138672]  kthread+0x337/0x6f0
[   13.138691]  ? trace_preempt_on+0x20/0xc0
[   13.138713]  ? __pfx_kthread+0x10/0x10
[   13.138734]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.138755]  ? calculate_sigpending+0x7b/0xa0
[   13.138779]  ? __pfx_kthread+0x10/0x10
[   13.138801]  ret_from_fork+0x116/0x1d0
[   13.138819]  ? __pfx_kthread+0x10/0x10
[   13.138839]  ret_from_fork_asm+0x1a/0x30
[   13.138870]  </TASK>
[   13.138882] 
[   13.147602] The buggy address belongs to the physical page:
[   13.148542] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10395c
[   13.149174] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   13.149428] flags: 0x200000000000040(head|node=0|zone=2)
[   13.150157] page_type: f8(unknown)
[   13.150440] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.151211] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   13.151449] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.151713] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   13.152590] head: 0200000000000002 ffffea00040e5701 00000000ffffffff 00000000ffffffff
[   13.153485] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   13.154170] page dumped because: kasan: bad access detected
[   13.154785] 
[   13.155059] Memory state around the buggy address:
[   13.155478]  ffff88810395bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.155919]  ffff88810395bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.156598] >ffff88810395c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.157246]                    ^
[   13.157449]  ffff88810395c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.158180]  ffff88810395c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.158668] ==================================================================
[   13.204860] ==================================================================
[   13.205590] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   13.206189] Read of size 1 at addr ffff888103960000 by task kunit_try_catch/251
[   13.206689] 
[   13.206811] CPU: 1 UID: 0 PID: 251 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   13.206858] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.206871] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.206894] Call Trace:
[   13.206907]  <TASK>
[   13.206923]  dump_stack_lvl+0x73/0xb0
[   13.206953]  print_report+0xd1/0x650
[   13.206975]  ? __virt_addr_valid+0x1db/0x2d0
[   13.206997]  ? mempool_uaf_helper+0x392/0x400
[   13.207019]  ? kasan_addr_to_slab+0x11/0xa0
[   13.207040]  ? mempool_uaf_helper+0x392/0x400
[   13.207062]  kasan_report+0x141/0x180
[   13.207084]  ? mempool_uaf_helper+0x392/0x400
[   13.207111]  __asan_report_load1_noabort+0x18/0x20
[   13.207135]  mempool_uaf_helper+0x392/0x400
[   13.207158]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   13.207181]  ? __kasan_check_write+0x18/0x20
[   13.207201]  ? __pfx_sched_clock_cpu+0x10/0x10
[   13.207222]  ? finish_task_switch.isra.0+0x153/0x700
[   13.207247]  mempool_page_alloc_uaf+0xed/0x140
[   13.207289]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   13.207316]  ? __pfx_mempool_alloc_pages+0x10/0x10
[   13.207336]  ? __pfx_mempool_free_pages+0x10/0x10
[   13.207359]  ? __pfx_read_tsc+0x10/0x10
[   13.207380]  ? ktime_get_ts64+0x86/0x230
[   13.207403]  kunit_try_run_case+0x1a5/0x480
[   13.207428]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.207450]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.207485]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.207508]  ? __kthread_parkme+0x82/0x180
[   13.207528]  ? preempt_count_sub+0x50/0x80
[   13.207551]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.207575]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.207598]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.207621]  kthread+0x337/0x6f0
[   13.207640]  ? trace_preempt_on+0x20/0xc0
[   13.207663]  ? __pfx_kthread+0x10/0x10
[   13.207732]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.207754]  ? calculate_sigpending+0x7b/0xa0
[   13.207778]  ? __pfx_kthread+0x10/0x10
[   13.207801]  ret_from_fork+0x116/0x1d0
[   13.207818]  ? __pfx_kthread+0x10/0x10
[   13.207838]  ret_from_fork_asm+0x1a/0x30
[   13.207869]  </TASK>
[   13.207881] 
[   13.218086] The buggy address belongs to the physical page:
[   13.218440] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103960
[   13.218800] flags: 0x200000000000000(node=0|zone=2)
[   13.218984] raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000
[   13.219378] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   13.219647] page dumped because: kasan: bad access detected
[   13.219818] 
[   13.219913] Memory state around the buggy address:
[   13.220134]  ffff88810395ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.220537]  ffff88810395ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.220896] >ffff888103960000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.221188]                    ^
[   13.221414]  ffff888103960080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.221702]  ffff888103960100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.222078] ==================================================================