Hay
Date
July 17, 2025, 11:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   15.150997] ==================================================================
[   15.151106] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   15.151215] Read of size 1 at addr fff00000c78c0000 by task kunit_try_catch/155
[   15.151279] 
[   15.151314] CPU: 0 UID: 0 PID: 155 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.151395] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.151657] Hardware name: linux,dummy-virt (DT)
[   15.151828] Call trace:
[   15.151889]  show_stack+0x20/0x38 (C)
[   15.152102]  dump_stack_lvl+0x8c/0xd0
[   15.152176]  print_report+0x118/0x5d0
[   15.152230]  kasan_report+0xdc/0x128
[   15.152275]  __asan_report_load1_noabort+0x20/0x30
[   15.152500]  page_alloc_uaf+0x328/0x350
[   15.152563]  kunit_try_run_case+0x170/0x3f0
[   15.152626]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.152683]  kthread+0x328/0x630
[   15.152724]  ret_from_fork+0x10/0x20
[   15.152772] 
[   15.152792] The buggy address belongs to the physical page:
[   15.152823] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078c0
[   15.152875] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.152924] page_type: f0(buddy)
[   15.152962] raw: 0bfffe0000000000 fff00000ff616170 fff00000ff616170 0000000000000000
[   15.153307] raw: 0000000000000000 0000000000000006 00000000f0000000 0000000000000000
[   15.153623] page dumped because: kasan: bad access detected
[   15.153662] 
[   15.153681] Memory state around the buggy address:
[   15.153713]  fff00000c78bff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.154031]  fff00000c78bff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.154157] >fff00000c78c0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   15.154270]                    ^
[   15.154422]  fff00000c78c0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   15.154546]  fff00000c78c0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   15.154627] ==================================================================

[   12.596951] ==================================================================
[   12.597695] BUG: KASAN: use-after-free in page_alloc_uaf+0x356/0x3d0
[   12.597920] Read of size 1 at addr ffff888103910000 by task kunit_try_catch/171
[   12.598142] 
[   12.598229] CPU: 1 UID: 0 PID: 171 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.598320] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.598331] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.598350] Call Trace:
[   12.598362]  <TASK>
[   12.598376]  dump_stack_lvl+0x73/0xb0
[   12.598404]  print_report+0xd1/0x610
[   12.598427]  ? __virt_addr_valid+0x1db/0x2d0
[   12.598450]  ? page_alloc_uaf+0x356/0x3d0
[   12.598471]  ? kasan_addr_to_slab+0x11/0xa0
[   12.598491]  ? page_alloc_uaf+0x356/0x3d0
[   12.598513]  kasan_report+0x141/0x180
[   12.598535]  ? page_alloc_uaf+0x356/0x3d0
[   12.598616]  __asan_report_load1_noabort+0x18/0x20
[   12.598641]  page_alloc_uaf+0x356/0x3d0
[   12.599026]  ? __pfx_page_alloc_uaf+0x10/0x10
[   12.599066]  ? __schedule+0x10cc/0x2b60
[   12.599093]  ? __pfx_read_tsc+0x10/0x10
[   12.599115]  ? ktime_get_ts64+0x86/0x230
[   12.599140]  kunit_try_run_case+0x1a5/0x480
[   12.599166]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.599189]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.599213]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.599342]  ? __kthread_parkme+0x82/0x180
[   12.599365]  ? preempt_count_sub+0x50/0x80
[   12.599389]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.599414]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.599438]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.599464]  kthread+0x337/0x6f0
[   12.599482]  ? trace_preempt_on+0x20/0xc0
[   12.599505]  ? __pfx_kthread+0x10/0x10
[   12.599525]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.599547]  ? calculate_sigpending+0x7b/0xa0
[   12.599583]  ? __pfx_kthread+0x10/0x10
[   12.599604]  ret_from_fork+0x116/0x1d0
[   12.599622]  ? __pfx_kthread+0x10/0x10
[   12.599642]  ret_from_fork_asm+0x1a/0x30
[   12.599674]  </TASK>
[   12.599684] 
[   12.613286] The buggy address belongs to the physical page:
[   12.613600] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103910
[   12.614048] flags: 0x200000000000000(node=0|zone=2)
[   12.614231] page_type: f0(buddy)
[   12.614357] raw: 0200000000000000 ffff88817fffb460 ffff88817fffb460 0000000000000000
[   12.614623] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   12.615148] page dumped because: kasan: bad access detected
[   12.615571] 
[   12.615683] Memory state around the buggy address:
[   12.615937]  ffff88810390ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.616311]  ffff88810390ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.616715] >ffff888103910000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.617018]                    ^
[   12.617135]  ffff888103910080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.617359]  ffff888103910100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.617721] ==================================================================