Hay
Date
July 3, 2025, 3:13 p.m.

Environment
qemu-arm64
qemu-x86_64

[   15.336502] ==================================================================
[   15.336572] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   15.336961] Read of size 1 at addr fff00000c7850000 by task kunit_try_catch/157
[   15.337058] 
[   15.337165] CPU: 1 UID: 0 PID: 157 Comm: kunit_try_catch Tainted: G    B            N  6.15.5-rc1 #1 PREEMPT 
[   15.337289] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.337315] Hardware name: linux,dummy-virt (DT)
[   15.337778] Call trace:
[   15.337854]  show_stack+0x20/0x38 (C)
[   15.338078]  dump_stack_lvl+0x8c/0xd0
[   15.338153]  print_report+0x118/0x608
[   15.338473]  kasan_report+0xdc/0x128
[   15.338602]  __asan_report_load1_noabort+0x20/0x30
[   15.338653]  page_alloc_uaf+0x328/0x350
[   15.338698]  kunit_try_run_case+0x170/0x3f0
[   15.339092]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.339287]  kthread+0x328/0x630
[   15.339508]  ret_from_fork+0x10/0x20
[   15.339699] 
[   15.339722] The buggy address belongs to the physical page:
[   15.339963] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107850
[   15.340189] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.340422] page_type: f0(buddy)
[   15.340725] raw: 0bfffe0000000000 fff00000ff616020 fff00000ff616020 0000000000000000
[   15.341133] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   15.341329] page dumped because: kasan: bad access detected
[   15.341585] 
[   15.341624] Memory state around the buggy address:
[   15.341814]  fff00000c784ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.341893]  fff00000c784ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.342102] >fff00000c7850000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   15.342258]                    ^
[   15.342307]  fff00000c7850080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   15.342436]  fff00000c7850100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   15.342701] ==================================================================

[   10.767099] ==================================================================
[   10.767986] BUG: KASAN: use-after-free in page_alloc_uaf+0x356/0x3d0
[   10.768293] Read of size 1 at addr ffff888103980000 by task kunit_try_catch/173
[   10.768687] 
[   10.768792] CPU: 0 UID: 0 PID: 173 Comm: kunit_try_catch Tainted: G    B            N  6.15.5-rc1 #1 PREEMPT(voluntary) 
[   10.768835] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.768847] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.768869] Call Trace:
[   10.768881]  <TASK>
[   10.768896]  dump_stack_lvl+0x73/0xb0
[   10.768921]  print_report+0xd1/0x650
[   10.768957]  ? __virt_addr_valid+0x1db/0x2d0
[   10.768979]  ? page_alloc_uaf+0x356/0x3d0
[   10.768999]  ? kasan_addr_to_slab+0x11/0xa0
[   10.769037]  ? page_alloc_uaf+0x356/0x3d0
[   10.769059]  kasan_report+0x141/0x180
[   10.769083]  ? page_alloc_uaf+0x356/0x3d0
[   10.769118]  __asan_report_load1_noabort+0x18/0x20
[   10.769143]  page_alloc_uaf+0x356/0x3d0
[   10.769163]  ? __pfx_page_alloc_uaf+0x10/0x10
[   10.769195]  ? __schedule+0x10cc/0x2b60
[   10.769219]  ? __pfx_read_tsc+0x10/0x10
[   10.769250]  ? ktime_get_ts64+0x86/0x230
[   10.769340]  kunit_try_run_case+0x1a5/0x480
[   10.769371]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.769395]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.769419]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.769444]  ? __kthread_parkme+0x82/0x180
[   10.769466]  ? preempt_count_sub+0x50/0x80
[   10.769491]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.769515]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.769538]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.769567]  kthread+0x337/0x6f0
[   10.769585]  ? trace_preempt_on+0x20/0xc0
[   10.769608]  ? __pfx_kthread+0x10/0x10
[   10.769626]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.769648]  ? calculate_sigpending+0x7b/0xa0
[   10.769670]  ? __pfx_kthread+0x10/0x10
[   10.769688]  ret_from_fork+0x41/0x80
[   10.769709]  ? __pfx_kthread+0x10/0x10
[   10.769727]  ret_from_fork_asm+0x1a/0x30
[   10.769759]  </TASK>
[   10.769770] 
[   10.778856] The buggy address belongs to the physical page:
[   10.779290] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103980
[   10.779913] flags: 0x200000000000000(node=0|zone=2)
[   10.780231] page_type: f0(buddy)
[   10.780469] raw: 0200000000000000 ffff88817fffc4b8 ffff88817fffc4b8 0000000000000000
[   10.780953] raw: 0000000000000000 0000000000000007 00000000f0000000 0000000000000000
[   10.781393] page dumped because: kasan: bad access detected
[   10.781665] 
[   10.781763] Memory state around the buggy address:
[   10.781963]  ffff88810397ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.782634]  ffff88810397ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.782919] >ffff888103980000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.783321]                    ^
[   10.783691]  ffff888103980080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.784297]  ffff888103980100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.784990] ==================================================================