Hay
Date
May 26, 2025, 9:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   17.060277] ==================================================================
[   17.060445] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   17.060596] Read of size 1 at addr fff00000c7910000 by task kunit_try_catch/154
[   17.060717] 
[   17.060803] CPU: 0 UID: 0 PID: 154 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7-next-20250526 #1 PREEMPT 
[   17.061010] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.061079] Hardware name: linux,dummy-virt (DT)
[   17.061168] Call trace:
[   17.061251]  show_stack+0x20/0x38 (C)
[   17.061390]  dump_stack_lvl+0x8c/0xd0
[   17.061508]  print_report+0x118/0x608
[   17.061627]  kasan_report+0xdc/0x128
[   17.061720]  __asan_report_load1_noabort+0x20/0x30
[   17.061835]  page_alloc_uaf+0x328/0x350
[   17.061950]  kunit_try_run_case+0x170/0x3f0
[   17.062181]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.062327]  kthread+0x328/0x630
[   17.062433]  ret_from_fork+0x10/0x20
[   17.062554] 
[   17.062604] The buggy address belongs to the physical page:
[   17.062704] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107910
[   17.062912] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.063023] page_type: f0(buddy)
[   17.063109] raw: 0bfffe0000000000 fff00000ff6160a0 fff00000ff6160a0 0000000000000000
[   17.063209] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   17.063281] page dumped because: kasan: bad access detected
[   17.063629] 
[   17.063719] Memory state around the buggy address:
[   17.063807]  fff00000c790ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.064037]  fff00000c790ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.064507] >fff00000c7910000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.064683]                    ^
[   17.064749]  fff00000c7910080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.065089]  fff00000c7910100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.065387] ==================================================================


[   10.572610] ==================================================================
[   10.573586] BUG: KASAN: use-after-free in page_alloc_uaf+0x356/0x3d0
[   10.573900] Read of size 1 at addr ffff888103940000 by task kunit_try_catch/172
[   10.574367] 
[   10.574498] CPU: 0 UID: 0 PID: 172 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7-next-20250526 #1 PREEMPT(voluntary) 
[   10.574566] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.574578] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.574615] Call Trace:
[   10.574629]  <TASK>
[   10.574645]  dump_stack_lvl+0x73/0xb0
[   10.574689]  print_report+0xd1/0x650
[   10.574712]  ? __virt_addr_valid+0x1db/0x2d0
[   10.574735]  ? page_alloc_uaf+0x356/0x3d0
[   10.574757]  ? kasan_addr_to_slab+0x11/0xa0
[   10.574778]  ? page_alloc_uaf+0x356/0x3d0
[   10.574801]  kasan_report+0x141/0x180
[   10.574823]  ? page_alloc_uaf+0x356/0x3d0
[   10.574849]  __asan_report_load1_noabort+0x18/0x20
[   10.574870]  page_alloc_uaf+0x356/0x3d0
[   10.574892]  ? __pfx_page_alloc_uaf+0x10/0x10
[   10.574915]  ? __schedule+0x10cc/0x2b60
[   10.574938]  ? __pfx_read_tsc+0x10/0x10
[   10.574959]  ? ktime_get_ts64+0x86/0x230
[   10.574984]  kunit_try_run_case+0x1a5/0x480
[   10.575085]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.575108]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.575133]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.575157]  ? __kthread_parkme+0x82/0x180
[   10.575177]  ? preempt_count_sub+0x50/0x80
[   10.575200]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.575221]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.575244]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.575268]  kthread+0x337/0x6f0
[   10.575287]  ? trace_preempt_on+0x20/0xc0
[   10.575310]  ? __pfx_kthread+0x10/0x10
[   10.575330]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.575352]  ? calculate_sigpending+0x7b/0xa0
[   10.575386]  ? __pfx_kthread+0x10/0x10
[   10.575407]  ret_from_fork+0x116/0x1d0
[   10.575425]  ? __pfx_kthread+0x10/0x10
[   10.575445]  ret_from_fork_asm+0x1a/0x30
[   10.575475]  </TASK>
[   10.575485] 
[   10.583469] The buggy address belongs to the physical page:
[   10.583751] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103940
[   10.584408] flags: 0x200000000000000(node=0|zone=2)
[   10.584840] page_type: f0(buddy)
[   10.585293] raw: 0200000000000000 ffff88817fffd4f0 ffff88817fffd4f0 0000000000000000
[   10.586372] raw: 0000000000000000 0000000000000006 00000000f0000000 0000000000000000
[   10.586730] page dumped because: kasan: bad access detected
[   10.587264] 
[   10.587370] Memory state around the buggy address:
[   10.587776]  ffff88810393ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.588208]  ffff88810393ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.588597] >ffff888103940000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.589283]                    ^
[   10.589516]  ffff888103940080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.589783]  ffff888103940100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.590484] ==================================================================