Hay
Date
July 1, 2025, 11:08 a.m.

Environment
qemu-arm64
qemu-x86_64

[   18.225992] ==================================================================
[   18.226344] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   18.226491] Read of size 1 at addr fff00000c7770000 by task kunit_try_catch/155
[   18.226559] 
[   18.226605] CPU: 1 UID: 0 PID: 155 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   18.226720] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.226810] Hardware name: linux,dummy-virt (DT)
[   18.226848] Call trace:
[   18.226890]  show_stack+0x20/0x38 (C)
[   18.226947]  dump_stack_lvl+0x8c/0xd0
[   18.227004]  print_report+0x118/0x608
[   18.227081]  kasan_report+0xdc/0x128
[   18.227141]  __asan_report_load1_noabort+0x20/0x30
[   18.227241]  page_alloc_uaf+0x328/0x350
[   18.227564]  kunit_try_run_case+0x170/0x3f0
[   18.227628]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.227685]  kthread+0x328/0x630
[   18.227732]  ret_from_fork+0x10/0x20
[   18.227785] 
[   18.227811] The buggy address belongs to the physical page:
[   18.227847] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107770
[   18.228223] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.228316] page_type: f0(buddy)
[   18.228395] raw: 0bfffe0000000000 fff00000ff6160a0 fff00000ff6160a0 0000000000000000
[   18.228547] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   18.228650] page dumped because: kasan: bad access detected
[   18.228721] 
[   18.228833] Memory state around the buggy address:
[   18.228872]  fff00000c776ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.228919]  fff00000c776ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.228974] >fff00000c7770000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.229014]                    ^
[   18.229069]  fff00000c7770080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.229113]  fff00000c7770100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.229165] ==================================================================

[   11.132023] ==================================================================
[   11.132682] BUG: KASAN: use-after-free in page_alloc_uaf+0x356/0x3d0
[   11.134069] Read of size 1 at addr ffff888103a00000 by task kunit_try_catch/171
[   11.134508] 
[   11.134633] CPU: 1 UID: 0 PID: 171 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.134683] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.134820] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.134842] Call Trace:
[   11.134855]  <TASK>
[   11.134874]  dump_stack_lvl+0x73/0xb0
[   11.134909]  print_report+0xd1/0x650
[   11.134981]  ? __virt_addr_valid+0x1db/0x2d0
[   11.135008]  ? page_alloc_uaf+0x356/0x3d0
[   11.135028]  ? kasan_addr_to_slab+0x11/0xa0
[   11.135047]  ? page_alloc_uaf+0x356/0x3d0
[   11.135069]  kasan_report+0x141/0x180
[   11.135090]  ? page_alloc_uaf+0x356/0x3d0
[   11.135115]  __asan_report_load1_noabort+0x18/0x20
[   11.135137]  page_alloc_uaf+0x356/0x3d0
[   11.135158]  ? __pfx_page_alloc_uaf+0x10/0x10
[   11.135180]  ? __schedule+0x10cc/0x2b60
[   11.135202]  ? __pfx_read_tsc+0x10/0x10
[   11.135223]  ? ktime_get_ts64+0x86/0x230
[   11.135248]  kunit_try_run_case+0x1a5/0x480
[   11.135274]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.135294]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.135317]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.135338]  ? __kthread_parkme+0x82/0x180
[   11.135359]  ? preempt_count_sub+0x50/0x80
[   11.135397]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.135419]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.135440]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.135461]  kthread+0x337/0x6f0
[   11.135479]  ? trace_preempt_on+0x20/0xc0
[   11.135502]  ? __pfx_kthread+0x10/0x10
[   11.135521]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.135541]  ? calculate_sigpending+0x7b/0xa0
[   11.135564]  ? __pfx_kthread+0x10/0x10
[   11.135583]  ret_from_fork+0x116/0x1d0
[   11.135600]  ? __pfx_kthread+0x10/0x10
[   11.135620]  ret_from_fork_asm+0x1a/0x30
[   11.135650]  </TASK>
[   11.135660] 
[   11.146826] The buggy address belongs to the physical page:
[   11.147205] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a00
[   11.147866] flags: 0x200000000000000(node=0|zone=2)
[   11.148276] page_type: f0(buddy)
[   11.148546] raw: 0200000000000000 ffff88817fffb5c8 ffff88817fffb5c8 0000000000000000
[   11.149283] raw: 0000000000000000 0000000000000009 00000000f0000000 0000000000000000
[   11.149783] page dumped because: kasan: bad access detected
[   11.150220] 
[   11.150302] Memory state around the buggy address:
[   11.150569]  ffff8881039fff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.151237]  ffff8881039fff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.151539] >ffff888103a00000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.152029]                    ^
[   11.152185]  ffff888103a00080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.152532]  ffff888103a00100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.153224] ==================================================================