Hay
Date
April 20, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64
rk3399-rock-pi-4b

[   22.851681] ==================================================================
[   22.851788] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   22.851895] Read of size 1 at addr fff00000c7710000 by task kunit_try_catch/156
[   22.852037] 
[   22.852200] CPU: 0 UID: 0 PID: 156 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   22.852528] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.852704] Hardware name: linux,dummy-virt (DT)
[   22.852905] Call trace:
[   22.852980]  show_stack+0x20/0x38 (C)
[   22.853119]  dump_stack_lvl+0x8c/0xd0
[   22.853254]  print_report+0x118/0x608
[   22.853408]  kasan_report+0xdc/0x128
[   22.853527]  __asan_report_load1_noabort+0x20/0x30
[   22.853665]  page_alloc_uaf+0x328/0x350
[   22.853805]  kunit_try_run_case+0x170/0x3f0
[   22.853975]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.854129]  kthread+0x328/0x630
[   22.854266]  ret_from_fork+0x10/0x20
[   22.856129] 
[   22.856248] The buggy address belongs to the physical page:
[   22.856331] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107710
[   22.856538] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   22.856741] page_type: f0(buddy)
[   22.856893] raw: 0bfffe0000000000 fff00000ff616020 fff00000ff616020 0000000000000000
[   22.857037] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   22.857130] page dumped because: kasan: bad access detected
[   22.857200] 
[   22.857241] Memory state around the buggy address:
[   22.857310]  fff00000c770ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   22.857408]  fff00000c770ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   22.857510] >fff00000c7710000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   22.857602]                    ^
[   22.857673]  fff00000c7710080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   22.858496]  fff00000c7710100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   22.858869] ==================================================================

[   11.133461] ==================================================================
[   11.134548] BUG: KASAN: use-after-free in page_alloc_uaf+0x356/0x3d0
[   11.134796] Read of size 1 at addr ffff888103a50000 by task kunit_try_catch/174
[   11.135114] 
[   11.135257] CPU: 0 UID: 0 PID: 174 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT(voluntary) 
[   11.135320] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.135341] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.135361] Call Trace:
[   11.135372]  <TASK>
[   11.135388]  dump_stack_lvl+0x73/0xb0
[   11.135423]  print_report+0xd1/0x650
[   11.135445]  ? __virt_addr_valid+0x1db/0x2d0
[   11.135477]  ? page_alloc_uaf+0x356/0x3d0
[   11.135498]  ? kasan_addr_to_slab+0x11/0xa0
[   11.135519]  ? page_alloc_uaf+0x356/0x3d0
[   11.135541]  kasan_report+0x141/0x180
[   11.135563]  ? page_alloc_uaf+0x356/0x3d0
[   11.135590]  __asan_report_load1_noabort+0x18/0x20
[   11.135610]  page_alloc_uaf+0x356/0x3d0
[   11.135647]  ? __pfx_page_alloc_uaf+0x10/0x10
[   11.135670]  ? __schedule+0x10cc/0x2b30
[   11.135692]  ? __pfx_read_tsc+0x10/0x10
[   11.135711]  ? ktime_get_ts64+0x86/0x230
[   11.135735]  kunit_try_run_case+0x1a5/0x480
[   11.135759]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.135780]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.135803]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.135826]  ? __kthread_parkme+0x82/0x180
[   11.135847]  ? preempt_count_sub+0x50/0x80
[   11.135872]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.135894]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.135916]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.135938]  kthread+0x337/0x6f0
[   11.135958]  ? trace_preempt_on+0x20/0xc0
[   11.135981]  ? __pfx_kthread+0x10/0x10
[   11.136002]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.136023]  ? calculate_sigpending+0x7b/0xa0
[   11.136044]  ? __pfx_kthread+0x10/0x10
[   11.136066]  ret_from_fork+0x41/0x80
[   11.136085]  ? __pfx_kthread+0x10/0x10
[   11.136107]  ret_from_fork_asm+0x1a/0x30
[   11.136197]  </TASK>
[   11.136222] 
[   11.144038] The buggy address belongs to the physical page:
[   11.144222] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a50
[   11.144655] flags: 0x200000000000000(node=0|zone=2)
[   11.144884] page_type: f0(buddy)
[   11.145103] raw: 0200000000000000 ffff88817fffc3e0 ffff88817fffc3e0 0000000000000000
[   11.145336] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   11.145863] page dumped because: kasan: bad access detected
[   11.146147] 
[   11.146256] Memory state around the buggy address:
[   11.146616]  ffff888103a4ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.146923]  ffff888103a4ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.147308] >ffff888103a50000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.147756]                    ^
[   11.147920]  ffff888103a50080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.148269]  ffff888103a50100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.148669] ==================================================================

[   20.925672] ==================================================================
[   20.927057] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   20.927681] Read of size 1 at addr ffff00000fe90000 by task kunit_try_catch/208
[   20.928360] 
[   20.928525] CPU: 3 UID: 0 PID: 208 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   20.928574] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.928588] Hardware name: Radxa ROCK Pi 4B (DT)
[   20.928605] Call trace:
[   20.928617]  show_stack+0x20/0x38 (C)
[   20.928649]  dump_stack_lvl+0x8c/0xd0
[   20.928680]  print_report+0x118/0x608
[   20.928709]  kasan_report+0xdc/0x128
[   20.928737]  __asan_report_load1_noabort+0x20/0x30
[   20.928771]  page_alloc_uaf+0x328/0x350
[   20.928804]  kunit_try_run_case+0x170/0x3f0
[   20.928839]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.928878]  kthread+0x328/0x630
[   20.928912]  ret_from_fork+0x10/0x20
[   20.928945] 
[   20.934499] The buggy address belongs to the physical page:
[   20.935015] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xfe90
[   20.935738] flags: 0x3fffe0000000000(node=0|zone=0|lastcpupid=0x1ffff)
[   20.936349] page_type: f0(buddy)
[   20.936670] raw: 03fffe0000000000 ffff0000f75f2620 ffff0000f75f2620 0000000000000000
[   20.937385] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   20.938093] page dumped because: kasan: bad access detected
[   20.938608] 
[   20.938760] Memory state around the buggy address:
[   20.939208]  ffff00000fe8ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.939873]  ffff00000fe8ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.940539] >ffff00000fe90000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.941200]                    ^
[   20.941510]  ffff00000fe90080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.942176]  ffff00000fe90100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.942837] ==================================================================