Hay
Date
July 1, 2025, 12:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   17.174234] ==================================================================
[   17.174298] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   17.174360] Read of size 1 at addr fff00000c78e0000 by task kunit_try_catch/154
[   17.174410] 
[   17.174469] CPU: 1 UID: 0 PID: 154 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   17.174624] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.174798] Hardware name: linux,dummy-virt (DT)
[   17.174953] Call trace:
[   17.175013]  show_stack+0x20/0x38 (C)
[   17.175125]  dump_stack_lvl+0x8c/0xd0
[   17.175290]  print_report+0x118/0x608
[   17.175366]  kasan_report+0xdc/0x128
[   17.175501]  __asan_report_load1_noabort+0x20/0x30
[   17.175692]  page_alloc_uaf+0x328/0x350
[   17.175964]  kunit_try_run_case+0x170/0x3f0
[   17.176139]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.176275]  kthread+0x328/0x630
[   17.176414]  ret_from_fork+0x10/0x20
[   17.176526] 
[   17.176556] The buggy address belongs to the physical page:
[   17.176590] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078e0
[   17.176648] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.177172] page_type: f0(buddy)
[   17.177252] raw: 0bfffe0000000000 fff00000ff616108 fff00000ff616108 0000000000000000
[   17.177387] raw: 0000000000000000 0000000000000005 00000000f0000000 0000000000000000
[   17.177533] page dumped because: kasan: bad access detected
[   17.177651] 
[   17.177731] Memory state around the buggy address:
[   17.178080]  fff00000c78dff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.178289]  fff00000c78dff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.178378] >fff00000c78e0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.178430]                    ^
[   17.178469]  fff00000c78e0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.178521]  fff00000c78e0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.178560] ==================================================================

[   11.050781] ==================================================================
[   11.051642] BUG: KASAN: use-after-free in page_alloc_uaf+0x356/0x3d0
[   11.051921] Read of size 1 at addr ffff888103950000 by task kunit_try_catch/171
[   11.052272] 
[   11.052470] CPU: 1 UID: 0 PID: 171 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.052516] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.052527] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.052547] Call Trace:
[   11.052558]  <TASK>
[   11.052573]  dump_stack_lvl+0x73/0xb0
[   11.052601]  print_report+0xd1/0x650
[   11.052623]  ? __virt_addr_valid+0x1db/0x2d0
[   11.052645]  ? page_alloc_uaf+0x356/0x3d0
[   11.052666]  ? kasan_addr_to_slab+0x11/0xa0
[   11.052685]  ? page_alloc_uaf+0x356/0x3d0
[   11.052706]  kasan_report+0x141/0x180
[   11.052727]  ? page_alloc_uaf+0x356/0x3d0
[   11.052753]  __asan_report_load1_noabort+0x18/0x20
[   11.052776]  page_alloc_uaf+0x356/0x3d0
[   11.052797]  ? __pfx_page_alloc_uaf+0x10/0x10
[   11.052819]  ? __schedule+0x10cc/0x2b60
[   11.052839]  ? __pfx_read_tsc+0x10/0x10
[   11.052859]  ? ktime_get_ts64+0x86/0x230
[   11.052882]  kunit_try_run_case+0x1a5/0x480
[   11.052905]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.052926]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.052948]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.052969]  ? __kthread_parkme+0x82/0x180
[   11.052989]  ? preempt_count_sub+0x50/0x80
[   11.053010]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.053047]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.053068]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.053090]  kthread+0x337/0x6f0
[   11.053108]  ? trace_preempt_on+0x20/0xc0
[   11.053129]  ? __pfx_kthread+0x10/0x10
[   11.053187]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.053210]  ? calculate_sigpending+0x7b/0xa0
[   11.053232]  ? __pfx_kthread+0x10/0x10
[   11.053253]  ret_from_fork+0x116/0x1d0
[   11.053270]  ? __pfx_kthread+0x10/0x10
[   11.053290]  ret_from_fork_asm+0x1a/0x30
[   11.053319]  </TASK>
[   11.053330] 
[   11.065232] The buggy address belongs to the physical page:
[   11.065807] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103950
[   11.066589] flags: 0x200000000000000(node=0|zone=2)
[   11.066761] page_type: f0(buddy)
[   11.066885] raw: 0200000000000000 ffff88817fffc460 ffff88817fffc460 0000000000000000
[   11.067218] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   11.067502] page dumped because: kasan: bad access detected
[   11.067740] 
[   11.067811] Memory state around the buggy address:
[   11.068053]  ffff88810394ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.068386]  ffff88810394ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.068824] >ffff888103950000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.069284]                    ^
[   11.069422]  ffff888103950080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.069672]  ffff888103950100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.069955] ==================================================================