Hay
Date
June 16, 2025, 7:07 a.m.

Environment
qemu-arm64
qemu-x86_64

[   18.878476] ==================================================================
[   18.878631] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   18.878780] Read of size 1 at addr fff00000c7830000 by task kunit_try_catch/163
[   18.878906] 
[   18.878994] CPU: 0 UID: 0 PID: 163 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250616 #1 PREEMPT 
[   18.879166] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.879223] Hardware name: linux,dummy-virt (DT)
[   18.879293] Call trace:
[   18.879342]  show_stack+0x20/0x38 (C)
[   18.879789]  dump_stack_lvl+0x8c/0xd0
[   18.879948]  print_report+0x118/0x608
[   18.880061]  kasan_report+0xdc/0x128
[   18.880198]  __asan_report_load1_noabort+0x20/0x30
[   18.880379]  page_alloc_uaf+0x328/0x350
[   18.880502]  kunit_try_run_case+0x170/0x3f0
[   18.880625]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.880745]  kthread+0x328/0x630
[   18.880864]  ret_from_fork+0x10/0x20
[   18.880979] 
[   18.881029] The buggy address belongs to the physical page:
[   18.881104] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107830
[   18.881229] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.881337] page_type: f0(buddy)
[   18.881434] raw: 0bfffe0000000000 fff00000ff6160a0 fff00000ff6160a0 0000000000000000
[   18.881558] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   18.881662] page dumped because: kasan: bad access detected
[   18.881744] 
[   18.882293] Memory state around the buggy address:
[   18.882424]  fff00000c782ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.882550]  fff00000c782ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.882795] >fff00000c7830000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.882916]                    ^
[   18.883019]  fff00000c7830080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.883195]  fff00000c7830100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.883297] ==================================================================

[   10.954423] ==================================================================
[   10.955029] BUG: KASAN: use-after-free in page_alloc_uaf+0x356/0x3d0
[   10.955309] Read of size 1 at addr ffff8881039a0000 by task kunit_try_catch/179
[   10.956062] 
[   10.956311] CPU: 1 UID: 0 PID: 179 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250616 #1 PREEMPT(voluntary) 
[   10.956363] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.956513] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.956536] Call Trace:
[   10.956549]  <TASK>
[   10.956567]  dump_stack_lvl+0x73/0xb0
[   10.956599]  print_report+0xd1/0x650
[   10.956622]  ? __virt_addr_valid+0x1db/0x2d0
[   10.956645]  ? page_alloc_uaf+0x356/0x3d0
[   10.956665]  ? kasan_addr_to_slab+0x11/0xa0
[   10.956685]  ? page_alloc_uaf+0x356/0x3d0
[   10.956705]  kasan_report+0x141/0x180
[   10.956726]  ? page_alloc_uaf+0x356/0x3d0
[   10.956751]  __asan_report_load1_noabort+0x18/0x20
[   10.956774]  page_alloc_uaf+0x356/0x3d0
[   10.956794]  ? __pfx_page_alloc_uaf+0x10/0x10
[   10.956815]  ? __schedule+0x10cc/0x2b60
[   10.956837]  ? __pfx_read_tsc+0x10/0x10
[   10.956857]  ? ktime_get_ts64+0x86/0x230
[   10.956883]  kunit_try_run_case+0x1a5/0x480
[   10.956907]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.956928]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.956960]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.956981]  ? __kthread_parkme+0x82/0x180
[   10.957001]  ? preempt_count_sub+0x50/0x80
[   10.957023]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.957046]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.957067]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.957089]  kthread+0x337/0x6f0
[   10.957107]  ? trace_preempt_on+0x20/0xc0
[   10.957130]  ? __pfx_kthread+0x10/0x10
[   10.957149]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.957168]  ? calculate_sigpending+0x7b/0xa0
[   10.957191]  ? __pfx_kthread+0x10/0x10
[   10.957211]  ret_from_fork+0x116/0x1d0
[   10.957228]  ? __pfx_kthread+0x10/0x10
[   10.957247]  ret_from_fork_asm+0x1a/0x30
[   10.957278]  </TASK>
[   10.957289] 
[   10.967692] The buggy address belongs to the physical page:
[   10.967949] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039a0
[   10.968387] flags: 0x200000000000000(node=0|zone=2)
[   10.968919] page_type: f0(buddy)
[   10.969055] raw: 0200000000000000 ffff88817fffd4a8 ffff88817fffd4a8 0000000000000000
[   10.969392] raw: 0000000000000000 0000000000000005 00000000f0000000 0000000000000000
[   10.969960] page dumped because: kasan: bad access detected
[   10.970297] 
[   10.970609] Memory state around the buggy address:
[   10.970838]  ffff88810399ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.971217]  ffff88810399ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.971725] >ffff8881039a0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.972123]                    ^
[   10.972395]  ffff8881039a0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.972999]  ffff8881039a0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.973394] ==================================================================