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

Environment
qemu-arm64
qemu-x86_64

[   20.519082] ==================================================================
[   20.520738] BUG: KASAN: use-after-free in page_alloc_uaf+0x33c/0x368
[   20.521271] Read of size 1 at addr fff00000c69d0000 by task kunit_try_catch/142
[   20.522033] 
[   20.522415] CPU: 0 UID: 0 PID: 142 Comm: kunit_try_catch Tainted: G    B            N 6.12.33-rc1 #1
[   20.522634] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.522712] Hardware name: linux,dummy-virt (DT)
[   20.522800] Call trace:
[   20.522869]  dump_backtrace+0x9c/0x128
[   20.523010]  show_stack+0x20/0x38
[   20.523119]  dump_stack_lvl+0x8c/0xd0
[   20.523209]  print_report+0x118/0x5f0
[   20.523319]  kasan_report+0xdc/0x128
[   20.523425]  __asan_report_load1_noabort+0x20/0x30
[   20.523770]  page_alloc_uaf+0x33c/0x368
[   20.523899]  kunit_try_run_case+0x170/0x3f0
[   20.524033]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.524117]  kthread+0x24c/0x2d0
[   20.524167]  ret_from_fork+0x10/0x20
[   20.524216] 
[   20.530953] The buggy address belongs to the physical page:
[   20.532430] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1069d0
[   20.533299] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.534069] page_type: f0(buddy)
[   20.534738] raw: 0bfffe0000000000 fff00000ff6162e0 fff00000ff6162e0 0000000000000000
[   20.535874] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   20.536652] page dumped because: kasan: bad access detected
[   20.537254] 
[   20.537560] Memory state around the buggy address:
[   20.538117]  fff00000c69cff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.538874]  fff00000c69cff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.539632] >fff00000c69d0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.540829]                    ^
[   20.541162]  fff00000c69d0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.541939]  fff00000c69d0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.542946] ==================================================================

[   16.648780] ==================================================================
[   16.650161] BUG: KASAN: use-after-free in page_alloc_uaf+0x358/0x3d0
[   16.651088] Read of size 1 at addr ffff888102c50000 by task kunit_try_catch/159
[   16.652277] 
[   16.653341] CPU: 0 UID: 0 PID: 159 Comm: kunit_try_catch Tainted: G    B            N 6.12.33-rc1 #1
[   16.653592] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.653615] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.653646] Call Trace:
[   16.653668]  <TASK>
[   16.653692]  dump_stack_lvl+0x73/0xb0
[   16.653778]  print_report+0xd1/0x640
[   16.653868]  ? __virt_addr_valid+0x1db/0x2d0
[   16.653909]  ? page_alloc_uaf+0x358/0x3d0
[   16.653937]  ? kasan_addr_to_slab+0x11/0xa0
[   16.653967]  ? page_alloc_uaf+0x358/0x3d0
[   16.653993]  kasan_report+0x140/0x180
[   16.654028]  ? page_alloc_uaf+0x358/0x3d0
[   16.654060]  __asan_report_load1_noabort+0x18/0x20
[   16.654091]  page_alloc_uaf+0x358/0x3d0
[   16.654118]  ? __pfx_page_alloc_uaf+0x10/0x10
[   16.654146]  ? __schedule+0xc49/0x27a0
[   16.654175]  ? __pfx_read_tsc+0x10/0x10
[   16.654203]  ? ktime_get_ts64+0x84/0x230
[   16.654271]  kunit_try_run_case+0x1a6/0x480
[   16.654305]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.654333]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   16.654361]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.654396]  ? __kthread_parkme+0x82/0x160
[   16.654424]  ? preempt_count_sub+0x50/0x80
[   16.654469]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.654574]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.654616]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.654653]  kthread+0x257/0x310
[   16.654678]  ? __pfx_kthread+0x10/0x10
[   16.654703]  ret_from_fork+0x41/0x80
[   16.654730]  ? __pfx_kthread+0x10/0x10
[   16.654754]  ret_from_fork_asm+0x1a/0x30
[   16.654798]  </TASK>
[   16.654835] 
[   16.671145] The buggy address belongs to the physical page:
[   16.671666] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102c50
[   16.672461] flags: 0x200000000000000(node=0|zone=2)
[   16.673144] page_type: f0(buddy)
[   16.674168] raw: 0200000000000000 ffff88817fffc4a0 ffff88817fffc4a0 0000000000000000
[   16.675050] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   16.675841] page dumped because: kasan: bad access detected
[   16.676286] 
[   16.676686] Memory state around the buggy address:
[   16.677173]  ffff888102c4ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.678323]  ffff888102c4ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.679077] >ffff888102c50000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.679941]                    ^
[   16.680361]  ffff888102c50080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.681126]  ffff888102c50100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.682264] ==================================================================