Hay
Date
July 1, 2025, 12:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   19.426717] ==================================================================
[   19.427028] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   19.427108] Read of size 1 at addr fff00000c79b4000 by task kunit_try_catch/229
[   19.427159] 
[   19.427258] CPU: 0 UID: 0 PID: 229 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   19.427471] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.427502] Hardware name: linux,dummy-virt (DT)
[   19.427691] Call trace:
[   19.427734]  show_stack+0x20/0x38 (C)
[   19.427849]  dump_stack_lvl+0x8c/0xd0
[   19.428030]  print_report+0x118/0x608
[   19.428142]  kasan_report+0xdc/0x128
[   19.428509]  __asan_report_load1_noabort+0x20/0x30
[   19.428577]  mempool_uaf_helper+0x314/0x340
[   19.428789]  mempool_kmalloc_large_uaf+0xc4/0x120
[   19.428844]  kunit_try_run_case+0x170/0x3f0
[   19.429223]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.429334]  kthread+0x328/0x630
[   19.429381]  ret_from_fork+0x10/0x20
[   19.429893] 
[   19.430031] The buggy address belongs to the physical page:
[   19.430125] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1079b4
[   19.430361] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   19.430434] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   19.430503] page_type: f8(unknown)
[   19.431203] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   19.431262] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   19.431406] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   19.431475] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   19.431533] head: 0bfffe0000000002 ffffc1ffc31e6d01 00000000ffffffff 00000000ffffffff
[   19.431585] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   19.432374] page dumped because: kasan: bad access detected
[   19.432477] 
[   19.432587] Memory state around the buggy address:
[   19.432631]  fff00000c79b3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.432677]  fff00000c79b3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.433396] >fff00000c79b4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.433497]                    ^
[   19.433528]  fff00000c79b4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.433572]  fff00000c79b4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.433637] ==================================================================
[   19.502606] ==================================================================
[   19.502679] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   19.502746] Read of size 1 at addr fff00000c79b4000 by task kunit_try_catch/233
[   19.502799] 
[   19.502837] CPU: 0 UID: 0 PID: 233 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   19.502923] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.502950] Hardware name: linux,dummy-virt (DT)
[   19.503788] Call trace:
[   19.503824]  show_stack+0x20/0x38 (C)
[   19.504087]  dump_stack_lvl+0x8c/0xd0
[   19.504211]  print_report+0x118/0x608
[   19.504616]  kasan_report+0xdc/0x128
[   19.505186]  __asan_report_load1_noabort+0x20/0x30
[   19.505250]  mempool_uaf_helper+0x314/0x340
[   19.505298]  mempool_page_alloc_uaf+0xc0/0x118
[   19.505594]  kunit_try_run_case+0x170/0x3f0
[   19.506078]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.506150]  kthread+0x328/0x630
[   19.506494]  ret_from_fork+0x10/0x20
[   19.506687] 
[   19.506753] The buggy address belongs to the physical page:
[   19.507056] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1079b4
[   19.507278] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.507353] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   19.507429] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   19.507641] page dumped because: kasan: bad access detected
[   19.507839] 
[   19.507858] Memory state around the buggy address:
[   19.507894]  fff00000c79b3f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.508412]  fff00000c79b3f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.508708] >fff00000c79b4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.508755]                    ^
[   19.508946]  fff00000c79b4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.509282]  fff00000c79b4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.509328] ==================================================================

[   12.975864] ==================================================================
[   12.976812] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   12.977645] Read of size 1 at addr ffff888103990000 by task kunit_try_catch/246
[   12.977999] 
[   12.978125] CPU: 1 UID: 0 PID: 246 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   12.978170] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.978182] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.978202] Call Trace:
[   12.978216]  <TASK>
[   12.978230]  dump_stack_lvl+0x73/0xb0
[   12.978259]  print_report+0xd1/0x650
[   12.978282]  ? __virt_addr_valid+0x1db/0x2d0
[   12.978306]  ? mempool_uaf_helper+0x392/0x400
[   12.978330]  ? kasan_addr_to_slab+0x11/0xa0
[   12.978350]  ? mempool_uaf_helper+0x392/0x400
[   12.978372]  kasan_report+0x141/0x180
[   12.978394]  ? mempool_uaf_helper+0x392/0x400
[   12.978421]  __asan_report_load1_noabort+0x18/0x20
[   12.978445]  mempool_uaf_helper+0x392/0x400
[   12.978467]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   12.978491]  ? __pfx_sched_clock_cpu+0x10/0x10
[   12.978512]  ? finish_task_switch.isra.0+0x153/0x700
[   12.978537]  mempool_kmalloc_large_uaf+0xef/0x140
[   12.978560]  ? __pfx_mempool_kmalloc_large_uaf+0x10/0x10
[   12.978586]  ? __pfx_mempool_kmalloc+0x10/0x10
[   12.978629]  ? __pfx_mempool_kfree+0x10/0x10
[   12.978655]  ? __pfx_read_tsc+0x10/0x10
[   12.978690]  ? ktime_get_ts64+0x86/0x230
[   12.978714]  kunit_try_run_case+0x1a5/0x480
[   12.978739]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.978762]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.978787]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.978809]  ? __kthread_parkme+0x82/0x180
[   12.978829]  ? preempt_count_sub+0x50/0x80
[   12.978853]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.978878]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.978900]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.978924]  kthread+0x337/0x6f0
[   12.978943]  ? trace_preempt_on+0x20/0xc0
[   12.978966]  ? __pfx_kthread+0x10/0x10
[   12.978986]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.979006]  ? calculate_sigpending+0x7b/0xa0
[   12.979039]  ? __pfx_kthread+0x10/0x10
[   12.979064]  ret_from_fork+0x116/0x1d0
[   12.979083]  ? __pfx_kthread+0x10/0x10
[   12.979104]  ret_from_fork_asm+0x1a/0x30
[   12.979134]  </TASK>
[   12.979160] 
[   12.987357] The buggy address belongs to the physical page:
[   12.987613] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103990
[   12.987980] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.988364] flags: 0x200000000000040(head|node=0|zone=2)
[   12.988805] page_type: f8(unknown)
[   12.988991] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   12.989238] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   12.989482] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   12.989820] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   12.990434] head: 0200000000000002 ffffea00040e6401 00000000ffffffff 00000000ffffffff
[   12.990686] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   12.990914] page dumped because: kasan: bad access detected
[   12.991422] 
[   12.991521] Memory state around the buggy address:
[   12.991749]  ffff88810398ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.992047]  ffff88810398ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.992351] >ffff888103990000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.992677]                    ^
[   12.992833]  ffff888103990080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.993194]  ffff888103990100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.993446] ==================================================================
[   13.027650] ==================================================================
[   13.029158] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   13.030285] Read of size 1 at addr ffff888103990000 by task kunit_try_catch/250
[   13.031109] 
[   13.031243] CPU: 1 UID: 0 PID: 250 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   13.031329] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.031342] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.031364] Call Trace:
[   13.031378]  <TASK>
[   13.031394]  dump_stack_lvl+0x73/0xb0
[   13.031424]  print_report+0xd1/0x650
[   13.031447]  ? __virt_addr_valid+0x1db/0x2d0
[   13.031471]  ? mempool_uaf_helper+0x392/0x400
[   13.031493]  ? kasan_addr_to_slab+0x11/0xa0
[   13.031514]  ? mempool_uaf_helper+0x392/0x400
[   13.031536]  kasan_report+0x141/0x180
[   13.031557]  ? mempool_uaf_helper+0x392/0x400
[   13.031584]  __asan_report_load1_noabort+0x18/0x20
[   13.031608]  mempool_uaf_helper+0x392/0x400
[   13.031632]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   13.031655]  ? __kasan_check_write+0x18/0x20
[   13.031675]  ? __pfx_sched_clock_cpu+0x10/0x10
[   13.031695]  ? finish_task_switch.isra.0+0x153/0x700
[   13.031721]  mempool_page_alloc_uaf+0xed/0x140
[   13.031744]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   13.031771]  ? __pfx_mempool_alloc_pages+0x10/0x10
[   13.031791]  ? __pfx_mempool_free_pages+0x10/0x10
[   13.031812]  ? __pfx_read_tsc+0x10/0x10
[   13.031833]  ? ktime_get_ts64+0x86/0x230
[   13.031856]  kunit_try_run_case+0x1a5/0x480
[   13.031881]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.031906]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.031930]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.031952]  ? __kthread_parkme+0x82/0x180
[   13.031972]  ? preempt_count_sub+0x50/0x80
[   13.031994]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.032018]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.032055]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.032078]  kthread+0x337/0x6f0
[   13.032097]  ? trace_preempt_on+0x20/0xc0
[   13.032121]  ? __pfx_kthread+0x10/0x10
[   13.032141]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.032161]  ? calculate_sigpending+0x7b/0xa0
[   13.032185]  ? __pfx_kthread+0x10/0x10
[   13.032228]  ret_from_fork+0x116/0x1d0
[   13.032246]  ? __pfx_kthread+0x10/0x10
[   13.032267]  ret_from_fork_asm+0x1a/0x30
[   13.032296]  </TASK>
[   13.032308] 
[   13.046103] The buggy address belongs to the physical page:
[   13.046739] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103990
[   13.046992] flags: 0x200000000000000(node=0|zone=2)
[   13.047566] raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000
[   13.048325] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   13.048991] page dumped because: kasan: bad access detected
[   13.049633] 
[   13.049709] Memory state around the buggy address:
[   13.049860]  ffff88810398ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.050111]  ffff88810398ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.050850] >ffff888103990000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.051581]                    ^
[   13.051984]  ffff888103990080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.052760]  ffff888103990100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.053531] ==================================================================