Hay
Date
July 19, 2025, 11:12 p.m.

Environment
qemu-arm64
qemu-x86_64

[   15.063556] ==================================================================
[   15.063611] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   15.063663] Read of size 1 at addr fff00000c7810000 by task kunit_try_catch/154
[   15.063723] 
[   15.063804] CPU: 1 UID: 0 PID: 154 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.063969] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.064060] Hardware name: linux,dummy-virt (DT)
[   15.064097] Call trace:
[   15.064291]  show_stack+0x20/0x38 (C)
[   15.064406]  dump_stack_lvl+0x8c/0xd0
[   15.064500]  print_report+0x118/0x5d0
[   15.064555]  kasan_report+0xdc/0x128
[   15.064674]  __asan_report_load1_noabort+0x20/0x30
[   15.064733]  page_alloc_uaf+0x328/0x350
[   15.064778]  kunit_try_run_case+0x170/0x3f0
[   15.064954]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.065062]  kthread+0x328/0x630
[   15.065105]  ret_from_fork+0x10/0x20
[   15.065167] 
[   15.065211] The buggy address belongs to the physical page:
[   15.065257] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107810
[   15.065377] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.065470] page_type: f0(buddy)
[   15.065548] raw: 0bfffe0000000000 fff00000ff6160a0 fff00000ff6160a0 0000000000000000
[   15.065701] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   15.065768] page dumped because: kasan: bad access detected
[   15.065843] 
[   15.065861] Memory state around the buggy address:
[   15.065898]  fff00000c780ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.065954]  fff00000c780ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.065995] >fff00000c7810000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   15.066075]                    ^
[   15.066176]  fff00000c7810080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   15.066219]  fff00000c7810100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   15.066255] ==================================================================

[   11.579096] ==================================================================
[   11.579703] BUG: KASAN: use-after-free in page_alloc_uaf+0x356/0x3d0
[   11.579981] Read of size 1 at addr ffff888103910000 by task kunit_try_catch/171
[   11.580769] 
[   11.581115] CPU: 0 UID: 0 PID: 171 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   11.581164] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.581177] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.581197] Call Trace:
[   11.581210]  <TASK>
[   11.581224]  dump_stack_lvl+0x73/0xb0
[   11.581253]  print_report+0xd1/0x610
[   11.581276]  ? __virt_addr_valid+0x1db/0x2d0
[   11.581454]  ? page_alloc_uaf+0x356/0x3d0
[   11.581487]  ? kasan_addr_to_slab+0x11/0xa0
[   11.581509]  ? page_alloc_uaf+0x356/0x3d0
[   11.581530]  kasan_report+0x141/0x180
[   11.581551]  ? page_alloc_uaf+0x356/0x3d0
[   11.581577]  __asan_report_load1_noabort+0x18/0x20
[   11.581606]  page_alloc_uaf+0x356/0x3d0
[   11.581627]  ? __pfx_page_alloc_uaf+0x10/0x10
[   11.581649]  ? __schedule+0x10cc/0x2b60
[   11.581670]  ? __pfx_read_tsc+0x10/0x10
[   11.581691]  ? ktime_get_ts64+0x86/0x230
[   11.581714]  kunit_try_run_case+0x1a5/0x480
[   11.581737]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.581758]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.581779]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.581801]  ? __kthread_parkme+0x82/0x180
[   11.581820]  ? preempt_count_sub+0x50/0x80
[   11.581842]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.581866]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.581888]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.581910]  kthread+0x337/0x6f0
[   11.581928]  ? trace_preempt_on+0x20/0xc0
[   11.581950]  ? __pfx_kthread+0x10/0x10
[   11.581969]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.581989]  ? calculate_sigpending+0x7b/0xa0
[   11.582022]  ? __pfx_kthread+0x10/0x10
[   11.582042]  ret_from_fork+0x116/0x1d0
[   11.582060]  ? __pfx_kthread+0x10/0x10
[   11.582079]  ret_from_fork_asm+0x1a/0x30
[   11.582108]  </TASK>
[   11.582118] 
[   11.596411] The buggy address belongs to the physical page:
[   11.597073] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103910
[   11.597773] flags: 0x200000000000000(node=0|zone=2)
[   11.598343] page_type: f0(buddy)
[   11.598781] raw: 0200000000000000 ffff88817fffc460 ffff88817fffc460 0000000000000000
[   11.599351] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   11.600035] page dumped because: kasan: bad access detected
[   11.600435] 
[   11.600719] Memory state around the buggy address:
[   11.601144]  ffff88810390ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.601374]  ffff88810390ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.602267] >ffff888103910000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.603080]                    ^
[   11.603629]  ffff888103910080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.604233]  ffff888103910100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.604727] ==================================================================