Hay
Date
July 9, 2025, 12:11 a.m.

Environment
qemu-arm64
qemu-x86_64

[   19.392222] ==================================================================
[   19.392277] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   19.392328] Read of size 1 at addr fff00000c7770000 by task kunit_try_catch/155
[   19.392376] 
[   19.392420] CPU: 1 UID: 0 PID: 155 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   19.392500] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.392526] Hardware name: linux,dummy-virt (DT)
[   19.392556] Call trace:
[   19.392576]  show_stack+0x20/0x38 (C)
[   19.392655]  dump_stack_lvl+0x8c/0xd0
[   19.392723]  print_report+0x118/0x608
[   19.392770]  kasan_report+0xdc/0x128
[   19.392817]  __asan_report_load1_noabort+0x20/0x30
[   19.392867]  page_alloc_uaf+0x328/0x350
[   19.392913]  kunit_try_run_case+0x170/0x3f0
[   19.393154]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.393210]  kthread+0x328/0x630
[   19.393260]  ret_from_fork+0x10/0x20
[   19.393348] 
[   19.393469] The buggy address belongs to the physical page:
[   19.393499] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107770
[   19.393561] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.393608] page_type: f0(buddy)
[   19.393646] raw: 0bfffe0000000000 fff00000ff6160a0 fff00000ff6160a0 0000000000000000
[   19.393879] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   19.394025] page dumped because: kasan: bad access detected
[   19.394055] 
[   19.394115] Memory state around the buggy address:
[   19.394147]  fff00000c776ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.394195]  fff00000c776ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.394257] >fff00000c7770000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.394295]                    ^
[   19.394322]  fff00000c7770080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.394369]  fff00000c7770100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.394446] ==================================================================

[   12.188494] ==================================================================
[   12.189162] BUG: KASAN: use-after-free in page_alloc_uaf+0x356/0x3d0
[   12.189642] Read of size 1 at addr ffff88810a680000 by task kunit_try_catch/171
[   12.190073] 
[   12.190169] CPU: 1 UID: 0 PID: 171 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.190280] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.190293] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.190327] Call Trace:
[   12.190339]  <TASK>
[   12.190357]  dump_stack_lvl+0x73/0xb0
[   12.190391]  print_report+0xd1/0x650
[   12.190414]  ? __virt_addr_valid+0x1db/0x2d0
[   12.190439]  ? page_alloc_uaf+0x356/0x3d0
[   12.190460]  ? kasan_addr_to_slab+0x11/0xa0
[   12.190490]  ? page_alloc_uaf+0x356/0x3d0
[   12.190513]  kasan_report+0x141/0x180
[   12.190534]  ? page_alloc_uaf+0x356/0x3d0
[   12.190572]  __asan_report_load1_noabort+0x18/0x20
[   12.190596]  page_alloc_uaf+0x356/0x3d0
[   12.190618]  ? __pfx_page_alloc_uaf+0x10/0x10
[   12.190649]  ? __schedule+0x10cc/0x2b60
[   12.190672]  ? __pfx_read_tsc+0x10/0x10
[   12.190694]  ? ktime_get_ts64+0x86/0x230
[   12.190736]  kunit_try_run_case+0x1a5/0x480
[   12.190764]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.190789]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.190813]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.190837]  ? __kthread_parkme+0x82/0x180
[   12.190858]  ? preempt_count_sub+0x50/0x80
[   12.190885]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.190909]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.190989]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.191019]  kthread+0x337/0x6f0
[   12.191039]  ? trace_preempt_on+0x20/0xc0
[   12.191063]  ? __pfx_kthread+0x10/0x10
[   12.191083]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.191105]  ? calculate_sigpending+0x7b/0xa0
[   12.191129]  ? __pfx_kthread+0x10/0x10
[   12.191150]  ret_from_fork+0x116/0x1d0
[   12.191169]  ? __pfx_kthread+0x10/0x10
[   12.191190]  ret_from_fork_asm+0x1a/0x30
[   12.191223]  </TASK>
[   12.191236] 
[   12.198825] The buggy address belongs to the physical page:
[   12.199382] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10a680
[   12.199765] flags: 0x200000000000000(node=0|zone=2)
[   12.200061] page_type: f0(buddy)
[   12.200211] raw: 0200000000000000 ffff88817fffc538 ffff88817fffc538 0000000000000000
[   12.200572] raw: 0000000000000000 0000000000000007 00000000f0000000 0000000000000000
[   12.200909] page dumped because: kasan: bad access detected
[   12.201319] 
[   12.201420] Memory state around the buggy address:
[   12.201578]  ffff88810a67ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.201791]  ffff88810a67ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.202111] >ffff88810a680000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.202425]                    ^
[   12.202822]  ffff88810a680080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.203204]  ffff88810a680100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.203719] ==================================================================