Hay
Date
June 16, 2025, 7:07 a.m.

Environment
qemu-arm64
qemu-x86_64

[   21.907437] ==================================================================
[   21.907578] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   21.907703] Read of size 1 at addr fff00000c7888000 by task kunit_try_catch/238
[   21.907817] 
[   21.907882] CPU: 0 UID: 0 PID: 238 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250616 #1 PREEMPT 
[   21.907989] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.908024] Hardware name: linux,dummy-virt (DT)
[   21.908063] Call trace:
[   21.908095]  show_stack+0x20/0x38 (C)
[   21.908156]  dump_stack_lvl+0x8c/0xd0
[   21.908213]  print_report+0x118/0x608
[   21.908269]  kasan_report+0xdc/0x128
[   21.908322]  __asan_report_load1_noabort+0x20/0x30
[   21.908380]  mempool_uaf_helper+0x314/0x340
[   21.908436]  mempool_kmalloc_large_uaf+0xc4/0x120
[   21.908548]  kunit_try_run_case+0x170/0x3f0
[   21.908677]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.908752]  kthread+0x328/0x630
[   21.909486]  ret_from_fork+0x10/0x20
[   21.909569] 
[   21.909600] The buggy address belongs to the physical page:
[   21.909674] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107888
[   21.909745] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   21.909801] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   21.909891] page_type: f8(unknown)
[   21.909988] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   21.910051] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   21.910547] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   21.910696] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   21.910907] head: 0bfffe0000000002 ffffc1ffc31e2201 00000000ffffffff 00000000ffffffff
[   21.910966] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   21.911247] page dumped because: kasan: bad access detected
[   21.911327] 
[   21.911354] Memory state around the buggy address:
[   21.911817]  fff00000c7887f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.911891]  fff00000c7887f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.911945] >fff00000c7888000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.911989]                    ^
[   21.912026]  fff00000c7888080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.912607]  fff00000c7888100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.912852] ==================================================================
[   21.951757] ==================================================================
[   21.952061] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   21.952296] Read of size 1 at addr fff00000c788c000 by task kunit_try_catch/242
[   21.952597] 
[   21.952720] CPU: 0 UID: 0 PID: 242 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250616 #1 PREEMPT 
[   21.953260] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.953360] Hardware name: linux,dummy-virt (DT)
[   21.953464] Call trace:
[   21.953516]  show_stack+0x20/0x38 (C)
[   21.953616]  dump_stack_lvl+0x8c/0xd0
[   21.953677]  print_report+0x118/0x608
[   21.953736]  kasan_report+0xdc/0x128
[   21.953792]  __asan_report_load1_noabort+0x20/0x30
[   21.953885]  mempool_uaf_helper+0x314/0x340
[   21.953946]  mempool_page_alloc_uaf+0xc0/0x118
[   21.954037]  kunit_try_run_case+0x170/0x3f0
[   21.954269]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.954636]  kthread+0x328/0x630
[   21.954704]  ret_from_fork+0x10/0x20
[   21.954780] 
[   21.954817] The buggy address belongs to the physical page:
[   21.954874] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10788c
[   21.954946] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   21.955037] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   21.955104] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   21.955859] page dumped because: kasan: bad access detected
[   21.956296] 
[   21.956622] Memory state around the buggy address:
[   21.956860]  fff00000c788bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.957109]  fff00000c788bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.957170] >fff00000c788c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.957221]                    ^
[   21.957263]  fff00000c788c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.957318]  fff00000c788c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.957368] ==================================================================

[   13.087823] ==================================================================
[   13.088230] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   13.088461] Read of size 1 at addr ffff888102be8000 by task kunit_try_catch/258
[   13.088674] 
[   13.088758] CPU: 1 UID: 0 PID: 258 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250616 #1 PREEMPT(voluntary) 
[   13.088805] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.088817] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.088838] Call Trace:
[   13.088850]  <TASK>
[   13.088868]  dump_stack_lvl+0x73/0xb0
[   13.088894]  print_report+0xd1/0x650
[   13.088916]  ? __virt_addr_valid+0x1db/0x2d0
[   13.089346]  ? mempool_uaf_helper+0x392/0x400
[   13.089613]  ? kasan_addr_to_slab+0x11/0xa0
[   13.089647]  ? mempool_uaf_helper+0x392/0x400
[   13.089671]  kasan_report+0x141/0x180
[   13.089701]  ? mempool_uaf_helper+0x392/0x400
[   13.089730]  __asan_report_load1_noabort+0x18/0x20
[   13.089757]  mempool_uaf_helper+0x392/0x400
[   13.089781]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   13.089811]  mempool_page_alloc_uaf+0xed/0x140
[   13.089835]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   13.089862]  ? __pfx_mempool_alloc_pages+0x10/0x10
[   13.089887]  ? __pfx_mempool_free_pages+0x10/0x10
[   13.089912]  ? __pfx_read_tsc+0x10/0x10
[   13.089946]  ? ktime_get_ts64+0x86/0x230
[   13.089971]  kunit_try_run_case+0x1a5/0x480
[   13.089995]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.090016]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.090039]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.090061]  ? __kthread_parkme+0x82/0x180
[   13.090081]  ? preempt_count_sub+0x50/0x80
[   13.090104]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.090126]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.090148]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.090170]  kthread+0x337/0x6f0
[   13.090189]  ? trace_preempt_on+0x20/0xc0
[   13.090212]  ? __pfx_kthread+0x10/0x10
[   13.090232]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.090252]  ? calculate_sigpending+0x7b/0xa0
[   13.090276]  ? __pfx_kthread+0x10/0x10
[   13.090297]  ret_from_fork+0x116/0x1d0
[   13.090315]  ? __pfx_kthread+0x10/0x10
[   13.090335]  ret_from_fork_asm+0x1a/0x30
[   13.090365]  </TASK>
[   13.090400] 
[   13.108203] The buggy address belongs to the physical page:
[   13.108710] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102be8
[   13.109042] flags: 0x200000000000000(node=0|zone=2)
[   13.109224] raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000
[   13.109642] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   13.109957] page dumped because: kasan: bad access detected
[   13.110310] 
[   13.110443] Memory state around the buggy address:
[   13.110624]  ffff888102be7f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.111033]  ffff888102be7f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.111281] >ffff888102be8000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.111700]                    ^
[   13.111871]  ffff888102be8080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.112169]  ffff888102be8100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.112557] ==================================================================
[   13.011913] ==================================================================
[   13.012331] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   13.012568] Read of size 1 at addr ffff888102be8000 by task kunit_try_catch/254
[   13.012782] 
[   13.012867] CPU: 1 UID: 0 PID: 254 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250616 #1 PREEMPT(voluntary) 
[   13.012916] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.012928] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.012961] Call Trace:
[   13.012973]  <TASK>
[   13.012991]  dump_stack_lvl+0x73/0xb0
[   13.013022]  print_report+0xd1/0x650
[   13.013044]  ? __virt_addr_valid+0x1db/0x2d0
[   13.013067]  ? mempool_uaf_helper+0x392/0x400
[   13.013089]  ? kasan_addr_to_slab+0x11/0xa0
[   13.013109]  ? mempool_uaf_helper+0x392/0x400
[   13.013130]  kasan_report+0x141/0x180
[   13.013151]  ? mempool_uaf_helper+0x392/0x400
[   13.013177]  __asan_report_load1_noabort+0x18/0x20
[   13.013200]  mempool_uaf_helper+0x392/0x400
[   13.013222]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   13.013242]  ? update_load_avg+0x1be/0x21b0
[   13.013269]  ? finish_task_switch.isra.0+0x153/0x700
[   13.013295]  mempool_kmalloc_large_uaf+0xef/0x140
[   13.013317]  ? __pfx_mempool_kmalloc_large_uaf+0x10/0x10
[   13.013342]  ? __pfx_mempool_kmalloc+0x10/0x10
[   13.013366]  ? __pfx_mempool_kfree+0x10/0x10
[   13.013390]  ? __pfx_read_tsc+0x10/0x10
[   13.013411]  ? ktime_get_ts64+0x86/0x230
[   13.013435]  kunit_try_run_case+0x1a5/0x480
[   13.013461]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.013481]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.013504]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.013525]  ? __kthread_parkme+0x82/0x180
[   13.013545]  ? preempt_count_sub+0x50/0x80
[   13.013567]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.013590]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.013611]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.013633]  kthread+0x337/0x6f0
[   13.013651]  ? trace_preempt_on+0x20/0xc0
[   13.013675]  ? __pfx_kthread+0x10/0x10
[   13.013701]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.013720]  ? calculate_sigpending+0x7b/0xa0
[   13.013744]  ? __pfx_kthread+0x10/0x10
[   13.013764]  ret_from_fork+0x116/0x1d0
[   13.013782]  ? __pfx_kthread+0x10/0x10
[   13.013801]  ret_from_fork_asm+0x1a/0x30
[   13.013832]  </TASK>
[   13.013843] 
[   13.034946] The buggy address belongs to the physical page:
[   13.035160] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102be8
[   13.035412] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   13.035755] flags: 0x200000000000040(head|node=0|zone=2)
[   13.036019] page_type: f8(unknown)
[   13.036195] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.036416] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   13.036755] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.037331] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   13.037737] head: 0200000000000002 ffffea00040afa01 00000000ffffffff 00000000ffffffff
[   13.038077] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   13.038382] page dumped because: kasan: bad access detected
[   13.038603] 
[   13.038676] Memory state around the buggy address:
[   13.038882]  ffff888102be7f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.039181]  ffff888102be7f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.039976] >ffff888102be8000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.040324]                    ^
[   13.040486]  ffff888102be8080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.041003]  ffff888102be8100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.041373] ==================================================================