Hay
Date
July 9, 2025, 2:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.779728] ==================================================================
[   16.779838] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   16.779922] Read of size 1 at addr fff00000c7810000 by task kunit_try_catch/154
[   16.779975] 
[   16.780058] CPU: 0 UID: 0 PID: 154 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   16.780201] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.780261] Hardware name: linux,dummy-virt (DT)
[   16.780294] Call trace:
[   16.780317]  show_stack+0x20/0x38 (C)
[   16.780407]  dump_stack_lvl+0x8c/0xd0
[   16.780672]  print_report+0x118/0x608
[   16.780838]  kasan_report+0xdc/0x128
[   16.780905]  __asan_report_load1_noabort+0x20/0x30
[   16.780957]  page_alloc_uaf+0x328/0x350
[   16.781329]  kunit_try_run_case+0x170/0x3f0
[   16.781397]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.781452]  kthread+0x328/0x630
[   16.781495]  ret_from_fork+0x10/0x20
[   16.781544] 
[   16.781565] The buggy address belongs to the physical page:
[   16.781626] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107810
[   16.781683] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.781756] page_type: f0(buddy)
[   16.781947] raw: 0bfffe0000000000 fff00000ff6160a0 fff00000ff6160a0 0000000000000000
[   16.782010] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   16.782050] page dumped because: kasan: bad access detected
[   16.782080] 
[   16.782107] Memory state around the buggy address:
[   16.782141]  fff00000c780ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.782184]  fff00000c780ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.782448] >fff00000c7810000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.782499]                    ^
[   16.782556]  fff00000c7810080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.782698]  fff00000c7810100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.782815] ==================================================================

[   12.302766] ==================================================================
[   12.303522] BUG: KASAN: use-after-free in page_alloc_uaf+0x356/0x3d0
[   12.303952] Read of size 1 at addr ffff8881039c0000 by task kunit_try_catch/171
[   12.304571] 
[   12.304681] CPU: 1 UID: 0 PID: 171 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.304727] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.304738] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.304758] Call Trace:
[   12.304771]  <TASK>
[   12.304878]  dump_stack_lvl+0x73/0xb0
[   12.304912]  print_report+0xd1/0x650
[   12.304935]  ? __virt_addr_valid+0x1db/0x2d0
[   12.304958]  ? page_alloc_uaf+0x356/0x3d0
[   12.304979]  ? kasan_addr_to_slab+0x11/0xa0
[   12.305000]  ? page_alloc_uaf+0x356/0x3d0
[   12.305021]  kasan_report+0x141/0x180
[   12.305042]  ? page_alloc_uaf+0x356/0x3d0
[   12.305069]  __asan_report_load1_noabort+0x18/0x20
[   12.305093]  page_alloc_uaf+0x356/0x3d0
[   12.305114]  ? __pfx_page_alloc_uaf+0x10/0x10
[   12.305137]  ? __schedule+0x10cc/0x2b60
[   12.305159]  ? __pfx_read_tsc+0x10/0x10
[   12.305179]  ? ktime_get_ts64+0x86/0x230
[   12.305204]  kunit_try_run_case+0x1a5/0x480
[   12.305229]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.305251]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.305275]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.305298]  ? __kthread_parkme+0x82/0x180
[   12.305320]  ? preempt_count_sub+0x50/0x80
[   12.305344]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.305368]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.305392]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.305417]  kthread+0x337/0x6f0
[   12.305435]  ? trace_preempt_on+0x20/0xc0
[   12.305459]  ? __pfx_kthread+0x10/0x10
[   12.305479]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.305500]  ? calculate_sigpending+0x7b/0xa0
[   12.305524]  ? __pfx_kthread+0x10/0x10
[   12.305545]  ret_from_fork+0x116/0x1d0
[   12.305563]  ? __pfx_kthread+0x10/0x10
[   12.305583]  ret_from_fork_asm+0x1a/0x30
[   12.305624]  </TASK>
[   12.305635] 
[   12.312916] The buggy address belongs to the physical page:
[   12.313190] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039c0
[   12.313485] flags: 0x200000000000000(node=0|zone=2)
[   12.313701] page_type: f0(buddy)
[   12.313892] raw: 0200000000000000 ffff88817fffb4f0 ffff88817fffb4f0 0000000000000000
[   12.314115] raw: 0000000000000000 0000000000000006 00000000f0000000 0000000000000000
[   12.314351] page dumped because: kasan: bad access detected
[   12.314605] 
[   12.314694] Memory state around the buggy address:
[   12.314917]  ffff8881039bff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.315381]  ffff8881039bff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.315590] >ffff8881039c0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.315804]                    ^
[   12.316019]  ffff8881039c0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.316728]  ffff8881039c0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.317131] ==================================================================