Hay
Date
June 24, 2025, 12:47 p.m.

Environment
qemu-arm64
qemu-x86_64

[   23.417032] ==================================================================
[   23.417240] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   23.417445] Read of size 1 at addr fff00000c7810000 by task kunit_try_catch/156
[   23.417572] 
[   23.417667] CPU: 0 UID: 0 PID: 156 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc2 #1 PREEMPT 
[   23.418458] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.418638] Hardware name: linux,dummy-virt (DT)
[   23.418716] Call trace:
[   23.418811]  show_stack+0x20/0x38 (C)
[   23.418968]  dump_stack_lvl+0x8c/0xd0
[   23.419199]  print_report+0x118/0x608
[   23.419393]  kasan_report+0xdc/0x128
[   23.419583]  __asan_report_load1_noabort+0x20/0x30
[   23.419763]  page_alloc_uaf+0x328/0x350
[   23.420027]  kunit_try_run_case+0x170/0x3f0
[   23.420256]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.420531]  kthread+0x328/0x630
[   23.420653]  ret_from_fork+0x10/0x20
[   23.420771] 
[   23.420836] The buggy address belongs to the physical page:
[   23.420911] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107810
[   23.421036] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   23.421163] page_type: f0(buddy)
[   23.421264] raw: 0bfffe0000000000 fff00000ff616020 fff00000ff616020 0000000000000000
[   23.421910] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   23.423975] page dumped because: kasan: bad access detected
[   23.424255] 
[   23.424307] Memory state around the buggy address:
[   23.424411]  fff00000c780ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   23.424710]  fff00000c780ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   23.425417] >fff00000c7810000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   23.425585]                    ^
[   23.425920]  fff00000c7810080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   23.426222]  fff00000c7810100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   23.426766] ==================================================================

[   11.166823] ==================================================================
[   11.167757] BUG: KASAN: use-after-free in page_alloc_uaf+0x356/0x3d0
[   11.168459] Read of size 1 at addr ffff888103a50000 by task kunit_try_catch/174
[   11.169187] 
[   11.169737] CPU: 0 UID: 0 PID: 174 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc2 #1 PREEMPT(voluntary) 
[   11.169820] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.169833] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.169858] Call Trace:
[   11.169875]  <TASK>
[   11.169899]  dump_stack_lvl+0x73/0xb0
[   11.169940]  print_report+0xd1/0x650
[   11.169979]  ? __virt_addr_valid+0x1db/0x2d0
[   11.170002]  ? page_alloc_uaf+0x356/0x3d0
[   11.170021]  ? kasan_addr_to_slab+0x11/0xa0
[   11.170041]  ? page_alloc_uaf+0x356/0x3d0
[   11.170061]  kasan_report+0x141/0x180
[   11.170083]  ? page_alloc_uaf+0x356/0x3d0
[   11.170105]  __asan_report_load1_noabort+0x18/0x20
[   11.170125]  page_alloc_uaf+0x356/0x3d0
[   11.170143]  ? __pfx_page_alloc_uaf+0x10/0x10
[   11.170163]  ? __schedule+0x10cc/0x2b60
[   11.170186]  ? __pfx_read_tsc+0x10/0x10
[   11.170207]  ? ktime_get_ts64+0x86/0x230
[   11.170234]  kunit_try_run_case+0x1a5/0x480
[   11.170260]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.170283]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.170320]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.170354]  ? __kthread_parkme+0x82/0x180
[   11.170386]  ? preempt_count_sub+0x50/0x80
[   11.170421]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.170454]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.170488]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.170517]  kthread+0x337/0x6f0
[   11.170541]  ? trace_preempt_on+0x20/0xc0
[   11.170575]  ? __pfx_kthread+0x10/0x10
[   11.170600]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.170646]  ? calculate_sigpending+0x7b/0xa0
[   11.170678]  ? __pfx_kthread+0x10/0x10
[   11.170705]  ret_from_fork+0x41/0x80
[   11.170732]  ? __pfx_kthread+0x10/0x10
[   11.170757]  ret_from_fork_asm+0x1a/0x30
[   11.170802]  </TASK>
[   11.170820] 
[   11.181268] The buggy address belongs to the physical page:
[   11.181816] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a50
[   11.182089] flags: 0x200000000000000(node=0|zone=2)
[   11.182508] page_type: f0(buddy)
[   11.182778] raw: 0200000000000000 ffff88817fffb3e0 ffff88817fffb3e0 0000000000000000
[   11.183180] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   11.183681] page dumped because: kasan: bad access detected
[   11.183948] 
[   11.184116] Memory state around the buggy address:
[   11.184318]  ffff888103a4ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.184731]  ffff888103a4ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.185146] >ffff888103a50000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.185589]                    ^
[   11.185784]  ffff888103a50080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.186168]  ffff888103a50100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.186638] ==================================================================