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

Environment
qemu-arm64
qemu-x86_64

[   21.928757] ==================================================================
[   21.930087] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   21.930641] Read of size 1 at addr fff00000c6510000 by task kunit_try_catch/143
[   21.932326] 
[   21.932589] CPU: 0 UID: 0 PID: 143 Comm: kunit_try_catch Tainted: G    B            N 6.14.11-rc1 #1
[   21.932799] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.932874] Hardware name: linux,dummy-virt (DT)
[   21.932979] Call trace:
[   21.933044]  show_stack+0x20/0x38 (C)
[   21.933492]  dump_stack_lvl+0x8c/0xd0
[   21.933629]  print_report+0x118/0x608
[   21.933743]  kasan_report+0xdc/0x128
[   21.933854]  __asan_report_load1_noabort+0x20/0x30
[   21.933993]  page_alloc_uaf+0x328/0x350
[   21.934100]  kunit_try_run_case+0x170/0x3f0
[   21.934231]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.934355]  kthread+0x318/0x620
[   21.934468]  ret_from_fork+0x10/0x20
[   21.934579] 
[   21.941929] The buggy address belongs to the physical page:
[   21.942578] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106510
[   21.943417] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   21.944137] page_type: f0(buddy)
[   21.944626] raw: 0bfffe0000000000 fff00000ff6150e0 fff00000ff6150e0 0000000000000000
[   21.945444] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   21.946154] page dumped because: kasan: bad access detected
[   21.946816] 
[   21.947970] Memory state around the buggy address:
[   21.948500]  fff00000c650ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.949713]  fff00000c650ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.950468] >fff00000c6510000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.951439]                    ^
[   21.951852]  fff00000c6510080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.952563]  fff00000c6510100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.953517] ==================================================================

[   16.809248] ==================================================================
[   16.810495] BUG: KASAN: use-after-free in page_alloc_uaf+0x358/0x3d0
[   16.811115] Read of size 1 at addr ffff888102cb0000 by task kunit_try_catch/162
[   16.811882] 
[   16.812130] CPU: 1 UID: 0 PID: 162 Comm: kunit_try_catch Tainted: G    B            N 6.14.11-rc1 #1
[   16.812238] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.812266] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.812358] Call Trace:
[   16.812401]  <TASK>
[   16.812447]  dump_stack_lvl+0x73/0xb0
[   16.812545]  print_report+0xd1/0x650
[   16.812596]  ? __virt_addr_valid+0x1db/0x2d0
[   16.812645]  ? page_alloc_uaf+0x358/0x3d0
[   16.812693]  ? kasan_addr_to_slab+0x11/0xa0
[   16.812741]  ? page_alloc_uaf+0x358/0x3d0
[   16.812796]  kasan_report+0x140/0x180
[   16.812853]  ? page_alloc_uaf+0x358/0x3d0
[   16.812964]  __asan_report_load1_noabort+0x18/0x20
[   16.813027]  page_alloc_uaf+0x358/0x3d0
[   16.813081]  ? __pfx_page_alloc_uaf+0x10/0x10
[   16.813138]  ? __schedule+0xce8/0x2840
[   16.813196]  ? __pfx_read_tsc+0x10/0x10
[   16.813243]  ? ktime_get_ts64+0x86/0x230
[   16.813295]  kunit_try_run_case+0x1a6/0x480
[   16.813382]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.813454]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   16.813512]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.813552]  ? __kthread_parkme+0x82/0x160
[   16.813584]  ? preempt_count_sub+0x50/0x80
[   16.813616]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.813645]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.813679]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.813710]  kthread+0x324/0x6e0
[   16.813737]  ? trace_preempt_on+0x20/0xc0
[   16.813768]  ? __pfx_kthread+0x10/0x10
[   16.813795]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.813822]  ? calculate_sigpending+0x7b/0xa0
[   16.813849]  ? __pfx_kthread+0x10/0x10
[   16.813898]  ret_from_fork+0x41/0x80
[   16.813924]  ? __pfx_kthread+0x10/0x10
[   16.813951]  ret_from_fork_asm+0x1a/0x30
[   16.813992]  </TASK>
[   16.814007] 
[   16.829141] The buggy address belongs to the physical page:
[   16.830108] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102cb0
[   16.831047] flags: 0x200000000000000(node=0|zone=2)
[   16.831911] page_type: f0(buddy)
[   16.832345] raw: 0200000000000000 ffff88817fffb4a0 ffff88817fffb4a0 0000000000000000
[   16.833155] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   16.833810] page dumped because: kasan: bad access detected
[   16.834066] 
[   16.834275] Memory state around the buggy address:
[   16.834813]  ffff888102caff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.835261]  ffff888102caff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.836794] >ffff888102cb0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.837179]                    ^
[   16.837524]  ffff888102cb0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.838694]  ffff888102cb0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.839132] ==================================================================