Hay
Date
June 19, 2025, 12:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   30.021077] ==================================================================
[   30.021361] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   30.021599] Read of size 1 at addr fff00000c7720000 by task kunit_try_catch/165
[   30.022218] 
[   30.022327] CPU: 1 UID: 0 PID: 165 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250619 #1 PREEMPT 
[   30.022548] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.022606] Hardware name: linux,dummy-virt (DT)
[   30.022668] Call trace:
[   30.022714]  show_stack+0x20/0x38 (C)
[   30.022829]  dump_stack_lvl+0x8c/0xd0
[   30.022943]  print_report+0x118/0x608
[   30.023062]  kasan_report+0xdc/0x128
[   30.023174]  __asan_report_load1_noabort+0x20/0x30
[   30.023305]  page_alloc_uaf+0x328/0x350
[   30.023422]  kunit_try_run_case+0x170/0x3f0
[   30.023547]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.024149]  kthread+0x328/0x630
[   30.024459]  ret_from_fork+0x10/0x20
[   30.024846] 
[   30.024937] The buggy address belongs to the physical page:
[   30.025171] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107720
[   30.025346] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.025500] page_type: f0(buddy)
[   30.025598] raw: 0bfffe0000000000 fff00000ff616108 fff00000ff616108 0000000000000000
[   30.025741] raw: 0000000000000000 0000000000000005 00000000f0000000 0000000000000000
[   30.025844] page dumped because: kasan: bad access detected
[   30.025926] 
[   30.026004] Memory state around the buggy address:
[   30.026138]  fff00000c771ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   30.026249]  fff00000c771ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   30.026348] >fff00000c7720000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   30.026431]                    ^
[   30.026489]  fff00000c7720080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   30.026612]  fff00000c7720100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   30.026728] ==================================================================

[   26.203724] ==================================================================
[   26.204585] BUG: KASAN: use-after-free in page_alloc_uaf+0x356/0x3d0
[   26.204996] Read of size 1 at addr ffff888103a00000 by task kunit_try_catch/183
[   26.205603] 
[   26.205769] CPU: 0 UID: 0 PID: 183 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250619 #1 PREEMPT(voluntary) 
[   26.205833] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.205847] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   26.205873] Call Trace:
[   26.205892]  <TASK>
[   26.205924]  dump_stack_lvl+0x73/0xb0
[   26.205964]  print_report+0xd1/0x650
[   26.205990]  ? __virt_addr_valid+0x1db/0x2d0
[   26.206016]  ? page_alloc_uaf+0x356/0x3d0
[   26.206040]  ? kasan_addr_to_slab+0x11/0xa0
[   26.206062]  ? page_alloc_uaf+0x356/0x3d0
[   26.206085]  kasan_report+0x141/0x180
[   26.206147]  ? page_alloc_uaf+0x356/0x3d0
[   26.206201]  __asan_report_load1_noabort+0x18/0x20
[   26.206247]  page_alloc_uaf+0x356/0x3d0
[   26.206288]  ? __pfx_page_alloc_uaf+0x10/0x10
[   26.206331]  ? __schedule+0x10cc/0x2b60
[   26.206375]  ? __pfx_read_tsc+0x10/0x10
[   26.206419]  ? ktime_get_ts64+0x86/0x230
[   26.206488]  kunit_try_run_case+0x1a5/0x480
[   26.206548]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.206596]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   26.206648]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   26.206692]  ? __kthread_parkme+0x82/0x180
[   26.207534]  ? preempt_count_sub+0x50/0x80
[   26.207616]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.207647]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.207676]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   26.207702]  kthread+0x337/0x6f0
[   26.207725]  ? trace_preempt_on+0x20/0xc0
[   26.207751]  ? __pfx_kthread+0x10/0x10
[   26.207773]  ? _raw_spin_unlock_irq+0x47/0x80
[   26.207798]  ? calculate_sigpending+0x7b/0xa0
[   26.207824]  ? __pfx_kthread+0x10/0x10
[   26.207847]  ret_from_fork+0x116/0x1d0
[   26.207869]  ? __pfx_kthread+0x10/0x10
[   26.207891]  ret_from_fork_asm+0x1a/0x30
[   26.207941]  </TASK>
[   26.207955] 
[   26.224133] The buggy address belongs to the physical page:
[   26.225405] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a00
[   26.226293] flags: 0x200000000000000(node=0|zone=2)
[   26.226660] page_type: f0(buddy)
[   26.226901] raw: 0200000000000000 ffff88817fffc5c8 ffff88817fffc5c8 0000000000000000
[   26.228072] raw: 0000000000000000 0000000000000009 00000000f0000000 0000000000000000
[   26.228611] page dumped because: kasan: bad access detected
[   26.229610] 
[   26.229760] Memory state around the buggy address:
[   26.230032]  ffff8881039fff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   26.230783]  ffff8881039fff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   26.231713] >ffff888103a00000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   26.231892]                    ^
[   26.232433]  ffff888103a00080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   26.233041]  ffff888103a00100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   26.233698] ==================================================================