Hay
Date
March 19, 2025, 10:35 a.m.

Environment
qemu-arm64
qemu-x86_64

[   33.667873] ==================================================================
[   33.669300] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   33.669601] Read of size 1 at addr fff00000c7760000 by task kunit_try_catch/156
[   33.671038] 
[   33.671296] CPU: 1 UID: 0 PID: 156 Comm: kunit_try_catch Tainted: G    B            N  6.14.0-rc7-next-20250319 #1 PREEMPT 
[   33.672131] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.672349] Hardware name: linux,dummy-virt (DT)
[   33.672571] Call trace:
[   33.672682]  show_stack+0x20/0x38 (C)
[   33.672860]  dump_stack_lvl+0x8c/0xd0
[   33.673150]  print_report+0x118/0x5f0
[   33.673848]  kasan_report+0xc8/0x118
[   33.674006]  __asan_report_load1_noabort+0x20/0x30
[   33.674277]  page_alloc_uaf+0x328/0x350
[   33.674750]  kunit_try_run_case+0x14c/0x3d0
[   33.675038]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.675250]  kthread+0x318/0x618
[   33.675404]  ret_from_fork+0x10/0x20
[   33.676193] 
[   33.676300] The buggy address belongs to the physical page:
[   33.676509] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107760
[   33.677198] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   33.677507] page_type: f0(buddy)
[   33.678172] raw: 0bfffe0000000000 fff00000ff6160c8 fff00000ff6160c8 0000000000000000
[   33.678433] raw: 0000000000000000 0000000000000005 00000000f0000000 0000000000000000
[   33.678590] page dumped because: kasan: bad access detected
[   33.678796] 
[   33.678856] Memory state around the buggy address:
[   33.679096]  fff00000c775ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   33.679260]  fff00000c775ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   33.679398] >fff00000c7760000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   33.679524]                    ^
[   33.680280]  fff00000c7760080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   33.680558]  fff00000c7760100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   33.680746] ==================================================================

[   20.818456] ==================================================================
[   20.819720] BUG: KASAN: use-after-free in page_alloc_uaf+0x356/0x3d0
[   20.820488] Read of size 1 at addr ffff888103910000 by task kunit_try_catch/175
[   20.821173] 
[   20.822558] CPU: 0 UID: 0 PID: 175 Comm: kunit_try_catch Tainted: G    B            N  6.14.0-rc7-next-20250319 #1 PREEMPT(voluntary) 
[   20.822670] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.822868] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   20.822919] Call Trace:
[   20.822939]  <TASK>
[   20.822961]  dump_stack_lvl+0x73/0xb0
[   20.823008]  print_report+0xd1/0x660
[   20.823042]  ? __virt_addr_valid+0x1db/0x2d0
[   20.823106]  ? kasan_addr_to_slab+0x11/0xa0
[   20.823168]  kasan_report+0x104/0x140
[   20.823198]  ? page_alloc_uaf+0x356/0x3d0
[   20.823232]  ? page_alloc_uaf+0x356/0x3d0
[   20.823272]  __asan_report_load1_noabort+0x18/0x20
[   20.823302]  page_alloc_uaf+0x356/0x3d0
[   20.823333]  ? __pfx_page_alloc_uaf+0x10/0x10
[   20.823366]  ? __schedule+0xd46/0x29c0
[   20.823397]  ? __pfx_read_tsc+0x10/0x10
[   20.823426]  ? ktime_get_ts64+0x86/0x240
[   20.823463]  kunit_try_run_case+0x1b2/0x490
[   20.823498]  ? __pfx_kunit_try_run_case+0x10/0x10
[   20.823529]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   20.823560]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   20.823601]  ? __kthread_parkme+0x82/0x160
[   20.823650]  ? preempt_count_sub+0x50/0x80
[   20.823743]  ? __pfx_kunit_try_run_case+0x10/0x10
[   20.823822]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   20.823877]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   20.823912]  kthread+0x323/0x710
[   20.823954]  ? trace_preempt_on+0x20/0xc0
[   20.823990]  ? __pfx_kthread+0x10/0x10
[   20.824021]  ? _raw_spin_unlock_irq+0x47/0x80
[   20.824050]  ? calculate_sigpending+0x7b/0xa0
[   20.824081]  ? __pfx_kthread+0x10/0x10
[   20.824133]  ret_from_fork+0x41/0x80
[   20.824167]  ? __pfx_kthread+0x10/0x10
[   20.824198]  ret_from_fork_asm+0x1a/0x30
[   20.824246]  </TASK>
[   20.824261] 
[   20.840461] The buggy address belongs to the physical page:
[   20.841094] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103910
[   20.841942] flags: 0x200000000000000(node=0|zone=2)
[   20.842440] page_type: f0(buddy)
[   20.843282] raw: 0200000000000000 ffff88817fffb3e0 ffff88817fffb3e0 0000000000000000
[   20.843802] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   20.844428] page dumped because: kasan: bad access detected
[   20.844827] 
[   20.844985] Memory state around the buggy address:
[   20.845889]  ffff88810390ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.846560]  ffff88810390ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.847554] >ffff888103910000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.848280]                    ^
[   20.848915]  ffff888103910080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.849431]  ffff888103910100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.850294] ==================================================================