Hay
Date
June 7, 2025, 10:40 a.m.

Environment
qemu-arm64
qemu-x86_64

[   22.097536] ==================================================================
[   22.097737] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   22.097900] Read of size 1 at addr fff00000c77b0000 by task kunit_try_catch/158
[   22.098033] 
[   22.098127] CPU: 1 UID: 0 PID: 158 Comm: kunit_try_catch Tainted: G    B            N  6.15.2-rc1 #1 PREEMPT 
[   22.098338] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.098422] Hardware name: linux,dummy-virt (DT)
[   22.098508] Call trace:
[   22.098567]  show_stack+0x20/0x38 (C)
[   22.098696]  dump_stack_lvl+0x8c/0xd0
[   22.098819]  print_report+0x118/0x608
[   22.098932]  kasan_report+0xdc/0x128
[   22.099043]  __asan_report_load1_noabort+0x20/0x30
[   22.099177]  page_alloc_uaf+0x328/0x350
[   22.099299]  kunit_try_run_case+0x170/0x3f0
[   22.099433]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.099553]  kthread+0x328/0x630
[   22.099657]  ret_from_fork+0x10/0x20
[   22.099801] 
[   22.100389] The buggy address belongs to the physical page:
[   22.100489] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077b0
[   22.100617] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   22.100721] page_type: f0(buddy)
[   22.100803] raw: 0bfffe0000000000 fff00000ff616020 fff00000ff616020 0000000000000000
[   22.100913] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   22.101101] page dumped because: kasan: bad access detected
[   22.101237] 
[   22.101455] Memory state around the buggy address:
[   22.101571]  fff00000c77aff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.101760]  fff00000c77aff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.101898] >fff00000c77b0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   22.102079]                    ^
[   22.102499]  fff00000c77b0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   22.102772]  fff00000c77b0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   22.103006] ==================================================================

[   13.068434] ==================================================================
[   13.069049] BUG: KASAN: use-after-free in page_alloc_uaf+0x356/0x3d0
[   13.069890] Read of size 1 at addr ffff888103910000 by task kunit_try_catch/174
[   13.070217] 
[   13.070356] CPU: 1 UID: 0 PID: 174 Comm: kunit_try_catch Tainted: G    B            N  6.15.2-rc1 #1 PREEMPT(voluntary) 
[   13.070446] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.070469] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.070505] Call Trace:
[   13.070533]  <TASK>
[   13.070582]  dump_stack_lvl+0x73/0xb0
[   13.070643]  print_report+0xd1/0x650
[   13.070689]  ? __virt_addr_valid+0x1db/0x2d0
[   13.070734]  ? page_alloc_uaf+0x356/0x3d0
[   13.070768]  ? kasan_addr_to_slab+0x11/0xa0
[   13.070800]  ? page_alloc_uaf+0x356/0x3d0
[   13.071248]  kasan_report+0x141/0x180
[   13.071280]  ? page_alloc_uaf+0x356/0x3d0
[   13.071305]  __asan_report_load1_noabort+0x18/0x20
[   13.071326]  page_alloc_uaf+0x356/0x3d0
[   13.071345]  ? __pfx_page_alloc_uaf+0x10/0x10
[   13.071364]  ? __schedule+0x10cc/0x2b30
[   13.071386]  ? __pfx_read_tsc+0x10/0x10
[   13.071405]  ? ktime_get_ts64+0x86/0x230
[   13.071432]  kunit_try_run_case+0x1a5/0x480
[   13.071456]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.071476]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.071498]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.071519]  ? __kthread_parkme+0x82/0x180
[   13.071540]  ? preempt_count_sub+0x50/0x80
[   13.071589]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.071623]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.071662]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.071694]  kthread+0x337/0x6f0
[   13.071721]  ? trace_preempt_on+0x20/0xc0
[   13.071773]  ? __pfx_kthread+0x10/0x10
[   13.071797]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.071817]  ? calculate_sigpending+0x7b/0xa0
[   13.071837]  ? __pfx_kthread+0x10/0x10
[   13.071855]  ret_from_fork+0x41/0x80
[   13.071875]  ? __pfx_kthread+0x10/0x10
[   13.071891]  ret_from_fork_asm+0x1a/0x30
[   13.071919]  </TASK>
[   13.071932] 
[   13.083045] The buggy address belongs to the physical page:
[   13.083533] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103910
[   13.084164] flags: 0x200000000000000(node=0|zone=2)
[   13.084441] page_type: f0(buddy)
[   13.084801] raw: 0200000000000000 ffff88817fffb3e0 ffff88817fffb3e0 0000000000000000
[   13.086019] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   13.087026] page dumped because: kasan: bad access detected
[   13.087290] 
[   13.087397] Memory state around the buggy address:
[   13.087730]  ffff88810390ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.088571]  ffff88810390ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.089738] >ffff888103910000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.090032]                    ^
[   13.090496]  ffff888103910080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.091281]  ffff888103910100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.091908] ==================================================================