Hay
Date
July 1, 2025, 3:08 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.788413] ==================================================================
[   16.788477] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   16.788595] Read of size 1 at addr fff00000c7b10000 by task kunit_try_catch/155
[   16.788646] 
[   16.788681] CPU: 1 UID: 0 PID: 155 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   16.788787] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.788813] Hardware name: linux,dummy-virt (DT)
[   16.788863] Call trace:
[   16.788890]  show_stack+0x20/0x38 (C)
[   16.788968]  dump_stack_lvl+0x8c/0xd0
[   16.789033]  print_report+0x118/0x608
[   16.789097]  kasan_report+0xdc/0x128
[   16.789161]  __asan_report_load1_noabort+0x20/0x30
[   16.789212]  page_alloc_uaf+0x328/0x350
[   16.789302]  kunit_try_run_case+0x170/0x3f0
[   16.789389]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.789458]  kthread+0x328/0x630
[   16.789500]  ret_from_fork+0x10/0x20
[   16.789865] 
[   16.789942] The buggy address belongs to the physical page:
[   16.790058] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107b10
[   16.790168] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.790250] page_type: f0(buddy)
[   16.790421] raw: 0bfffe0000000000 fff00000ff6160a0 fff00000ff6160a0 0000000000000000
[   16.790604] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   16.790675] page dumped because: kasan: bad access detected
[   16.790791] 
[   16.790809] Memory state around the buggy address:
[   16.790842]  fff00000c7b0ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.790892]  fff00000c7b0ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.791195] >fff00000c7b10000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.791307]                    ^
[   16.791385]  fff00000c7b10080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.791601]  fff00000c7b10100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.791695] ==================================================================

[   11.088692] ==================================================================
[   11.089329] BUG: KASAN: use-after-free in page_alloc_uaf+0x356/0x3d0
[   11.089617] Read of size 1 at addr ffff888103950000 by task kunit_try_catch/171
[   11.089939] 
[   11.090068] CPU: 0 UID: 0 PID: 171 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.090113] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.090125] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.090147] Call Trace:
[   11.090159]  <TASK>
[   11.090177]  dump_stack_lvl+0x73/0xb0
[   11.090206]  print_report+0xd1/0x650
[   11.090229]  ? __virt_addr_valid+0x1db/0x2d0
[   11.090252]  ? page_alloc_uaf+0x356/0x3d0
[   11.090274]  ? kasan_addr_to_slab+0x11/0xa0
[   11.090294]  ? page_alloc_uaf+0x356/0x3d0
[   11.090315]  kasan_report+0x141/0x180
[   11.090336]  ? page_alloc_uaf+0x356/0x3d0
[   11.090363]  __asan_report_load1_noabort+0x18/0x20
[   11.090386]  page_alloc_uaf+0x356/0x3d0
[   11.090406]  ? __pfx_page_alloc_uaf+0x10/0x10
[   11.090428]  ? __schedule+0x10cc/0x2b60
[   11.090449]  ? __pfx_read_tsc+0x10/0x10
[   11.090471]  ? ktime_get_ts64+0x86/0x230
[   11.090495]  kunit_try_run_case+0x1a5/0x480
[   11.090521]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.090542]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.090564]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.090585]  ? __kthread_parkme+0x82/0x180
[   11.090605]  ? preempt_count_sub+0x50/0x80
[   11.090628]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.090658]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.090680]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.090701]  kthread+0x337/0x6f0
[   11.090719]  ? trace_preempt_on+0x20/0xc0
[   11.090742]  ? __pfx_kthread+0x10/0x10
[   11.090761]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.090781]  ? calculate_sigpending+0x7b/0xa0
[   11.090803]  ? __pfx_kthread+0x10/0x10
[   11.090823]  ret_from_fork+0x116/0x1d0
[   11.090841]  ? __pfx_kthread+0x10/0x10
[   11.090860]  ret_from_fork_asm+0x1a/0x30
[   11.090893]  </TASK>
[   11.090905] 
[   11.098290] The buggy address belongs to the physical page:
[   11.098559] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103950
[   11.099900] flags: 0x200000000000000(node=0|zone=2)
[   11.100162] page_type: f0(buddy)
[   11.100328] raw: 0200000000000000 ffff88817fffb460 ffff88817fffb460 0000000000000000
[   11.100633] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   11.100944] page dumped because: kasan: bad access detected
[   11.101183] 
[   11.101269] Memory state around the buggy address:
[   11.101467]  ffff88810394ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.101814]  ffff88810394ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.102970] >ffff888103950000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.103212]                    ^
[   11.103333]  ffff888103950080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.103546]  ffff888103950100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.104255] ==================================================================