Hay
Date
July 22, 2025, 2:40 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.967434] ==================================================================
[   16.967950] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   16.968021] Read of size 1 at addr fff00000c7940000 by task kunit_try_catch/156
[   16.968070] 
[   16.968271] CPU: 0 UID: 0 PID: 156 Comm: kunit_try_catch Tainted: G    B            N  6.15.8-rc1 #1 PREEMPT 
[   16.968366] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.968605] Hardware name: linux,dummy-virt (DT)
[   16.968777] Call trace:
[   16.968812]  show_stack+0x20/0x38 (C)
[   16.968865]  dump_stack_lvl+0x8c/0xd0
[   16.968912]  print_report+0x118/0x5d0
[   16.968956]  kasan_report+0xdc/0x128
[   16.969001]  __asan_report_load1_noabort+0x20/0x30
[   16.969169]  page_alloc_uaf+0x328/0x350
[   16.969244]  kunit_try_run_case+0x170/0x3f0
[   16.969508]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.969805]  kthread+0x328/0x630
[   16.969862]  ret_from_fork+0x10/0x20
[   16.969928] 
[   16.970032] The buggy address belongs to the physical page:
[   16.970066] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107940
[   16.970123] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.970187] page_type: f0(buddy)
[   16.970225] raw: 0bfffe0000000000 fff00000ff6160f0 fff00000ff6160f0 0000000000000000
[   16.970273] raw: 0000000000000000 0000000000000006 00000000f0000000 0000000000000000
[   16.970600] page dumped because: kasan: bad access detected
[   16.970697] 
[   16.970719] Memory state around the buggy address:
[   16.970844]  fff00000c793ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.970917]  fff00000c793ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.970979] >fff00000c7940000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.971023]                    ^
[   16.971234]  fff00000c7940080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.971293]  fff00000c7940100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.971780] ==================================================================

[   10.631186] ==================================================================
[   10.632037] BUG: KASAN: use-after-free in page_alloc_uaf+0x356/0x3d0
[   10.632330] Read of size 1 at addr ffff888103d30000 by task kunit_try_catch/174
[   10.632832] 
[   10.633242] CPU: 1 UID: 0 PID: 174 Comm: kunit_try_catch Tainted: G    B            N  6.15.8-rc1 #1 PREEMPT(voluntary) 
[   10.633294] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.633306] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.633327] Call Trace:
[   10.633339]  <TASK>
[   10.633400]  dump_stack_lvl+0x73/0xb0
[   10.633430]  print_report+0xd1/0x610
[   10.633453]  ? __virt_addr_valid+0x1db/0x2d0
[   10.633475]  ? page_alloc_uaf+0x356/0x3d0
[   10.633492]  ? kasan_addr_to_slab+0x11/0xa0
[   10.633512]  ? page_alloc_uaf+0x356/0x3d0
[   10.633530]  kasan_report+0x141/0x180
[   10.633551]  ? page_alloc_uaf+0x356/0x3d0
[   10.633574]  __asan_report_load1_noabort+0x18/0x20
[   10.633594]  page_alloc_uaf+0x356/0x3d0
[   10.633612]  ? __pfx_page_alloc_uaf+0x10/0x10
[   10.633631]  ? __schedule+0x10c6/0x2b60
[   10.633655]  ? __pfx_read_tsc+0x10/0x10
[   10.633674]  ? ktime_get_ts64+0x86/0x230
[   10.633700]  kunit_try_run_case+0x1a5/0x480
[   10.633721]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.633739]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.633760]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.633784]  ? __kthread_parkme+0x82/0x180
[   10.633804]  ? preempt_count_sub+0x50/0x80
[   10.633829]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.633848]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.633870]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.633892]  kthread+0x337/0x6f0
[   10.633908]  ? trace_preempt_on+0x20/0xc0
[   10.633931]  ? __pfx_kthread+0x10/0x10
[   10.633948]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.633969]  ? calculate_sigpending+0x7b/0xa0
[   10.633990]  ? __pfx_kthread+0x10/0x10
[   10.634007]  ret_from_fork+0x41/0x80
[   10.634026]  ? __pfx_kthread+0x10/0x10
[   10.634043]  ret_from_fork_asm+0x1a/0x30
[   10.634074]  </TASK>
[   10.634085] 
[   10.644983] The buggy address belongs to the physical page:
[   10.645448] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103d30
[   10.645913] flags: 0x200000000000000(node=0|zone=2)
[   10.646277] page_type: f0(buddy)
[   10.646525] raw: 0200000000000000 ffff88817fffb3e0 ffff88817fffb3e0 0000000000000000
[   10.647160] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   10.647626] page dumped because: kasan: bad access detected
[   10.648100] 
[   10.648367] Memory state around the buggy address:
[   10.648582]  ffff888103d2ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.649202]  ffff888103d2ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.649807] >ffff888103d30000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.650211]                    ^
[   10.650380]  ffff888103d30080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.650893]  ffff888103d30100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.651387] ==================================================================