Hay
Date
July 6, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   17.872842] ==================================================================
[   17.872898] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   17.873033] Read of size 1 at addr fff00000c7840000 by task kunit_try_catch/154
[   17.873251] 
[   17.873399] CPU: 1 UID: 0 PID: 154 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   17.873520] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.873636] Hardware name: linux,dummy-virt (DT)
[   17.873694] Call trace:
[   17.873790]  show_stack+0x20/0x38 (C)
[   17.873960]  dump_stack_lvl+0x8c/0xd0
[   17.874094]  print_report+0x118/0x608
[   17.874209]  kasan_report+0xdc/0x128
[   17.874255]  __asan_report_load1_noabort+0x20/0x30
[   17.874304]  page_alloc_uaf+0x328/0x350
[   17.874348]  kunit_try_run_case+0x170/0x3f0
[   17.874395]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.874851]  kthread+0x328/0x630
[   17.874954]  ret_from_fork+0x10/0x20
[   17.875090] 
[   17.875178] The buggy address belongs to the physical page:
[   17.875318] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107840
[   17.875435] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.875507] page_type: f0(buddy)
[   17.875849] raw: 0bfffe0000000000 fff00000ff616170 fff00000ff616170 0000000000000000
[   17.875933] raw: 0000000000000000 0000000000000006 00000000f0000000 0000000000000000
[   17.876239] page dumped because: kasan: bad access detected
[   17.876316] 
[   17.876456] Memory state around the buggy address:
[   17.876516]  fff00000c783ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.876597]  fff00000c783ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.876638] >fff00000c7840000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.876674]                    ^
[   17.876701]  fff00000c7840080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.876750]  fff00000c7840100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.876795] ==================================================================

[   11.139245] ==================================================================
[   11.140101] BUG: KASAN: use-after-free in page_alloc_uaf+0x356/0x3d0
[   11.140388] Read of size 1 at addr ffff888103a00000 by task kunit_try_catch/171
[   11.140741] 
[   11.140919] CPU: 0 UID: 0 PID: 171 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.140978] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.140990] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.141012] Call Trace:
[   11.141026]  <TASK>
[   11.141045]  dump_stack_lvl+0x73/0xb0
[   11.141299]  print_report+0xd1/0x650
[   11.141324]  ? __virt_addr_valid+0x1db/0x2d0
[   11.141350]  ? page_alloc_uaf+0x356/0x3d0
[   11.141371]  ? kasan_addr_to_slab+0x11/0xa0
[   11.141391]  ? page_alloc_uaf+0x356/0x3d0
[   11.141412]  kasan_report+0x141/0x180
[   11.141433]  ? page_alloc_uaf+0x356/0x3d0
[   11.141459]  __asan_report_load1_noabort+0x18/0x20
[   11.141525]  page_alloc_uaf+0x356/0x3d0
[   11.141547]  ? __pfx_page_alloc_uaf+0x10/0x10
[   11.141569]  ? __schedule+0x10cc/0x2b60
[   11.141612]  ? __pfx_read_tsc+0x10/0x10
[   11.141635]  ? ktime_get_ts64+0x86/0x230
[   11.141670]  kunit_try_run_case+0x1a5/0x480
[   11.141695]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.141721]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.141756]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.141779]  ? __kthread_parkme+0x82/0x180
[   11.141799]  ? preempt_count_sub+0x50/0x80
[   11.141823]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.141846]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.141868]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.141890]  kthread+0x337/0x6f0
[   11.141909]  ? trace_preempt_on+0x20/0xc0
[   11.141940]  ? __pfx_kthread+0x10/0x10
[   11.141960]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.141981]  ? calculate_sigpending+0x7b/0xa0
[   11.142005]  ? __pfx_kthread+0x10/0x10
[   11.142027]  ret_from_fork+0x116/0x1d0
[   11.142045]  ? __pfx_kthread+0x10/0x10
[   11.142065]  ret_from_fork_asm+0x1a/0x30
[   11.142096]  </TASK>
[   11.142107] 
[   11.150502] The buggy address belongs to the physical page:
[   11.150779] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a00
[   11.151224] flags: 0x200000000000000(node=0|zone=2)
[   11.151419] page_type: f0(buddy)
[   11.151756] raw: 0200000000000000 ffff88817fffb5c8 ffff88817fffb5c8 0000000000000000
[   11.152118] raw: 0000000000000000 0000000000000009 00000000f0000000 0000000000000000
[   11.152494] page dumped because: kasan: bad access detected
[   11.152667] 
[   11.152737] Memory state around the buggy address:
[   11.152992]  ffff8881039fff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.153353]  ffff8881039fff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.153764] >ffff888103a00000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.153990]                    ^
[   11.154221]  ffff888103a00080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.154676]  ffff888103a00100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.155004] ==================================================================