Hay
Date
June 2, 2025, 2:13 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.092342] ==================================================================
[   18.093416] BUG: KASAN: use-after-free in page_alloc_uaf+0x328/0x350
[   18.093967] Read of size 1 at addr fff00000c6630000 by task kunit_try_catch/144
[   18.094759] 
[   18.095080] CPU: 0 UID: 0 PID: 144 Comm: kunit_try_catch Tainted: G    B            N 6.14.10-rc1 #1
[   18.095258] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.095290] Hardware name: linux,dummy-virt (DT)
[   18.095326] Call trace:
[   18.095359]  show_stack+0x20/0x38 (C)
[   18.095460]  dump_stack_lvl+0x8c/0xd0
[   18.095568]  print_report+0x118/0x608
[   18.095682]  kasan_report+0xdc/0x128
[   18.095781]  __asan_report_load1_noabort+0x20/0x30
[   18.095884]  page_alloc_uaf+0x328/0x350
[   18.095962]  kunit_try_run_case+0x170/0x3f0
[   18.096015]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.096066]  kthread+0x318/0x620
[   18.096111]  ret_from_fork+0x10/0x20
[   18.096183] 
[   18.099909] The buggy address belongs to the physical page:
[   18.100548] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106630
[   18.101119] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.101792] page_type: f0(buddy)
[   18.102451] raw: 0bfffe0000000000 fff00000ff6150e0 fff00000ff6150e0 0000000000000000
[   18.102898] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   18.103563] page dumped because: kasan: bad access detected
[   18.104080] 
[   18.104330] Memory state around the buggy address:
[   18.104799]  fff00000c662ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.105454]  fff00000c662ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.106102] >fff00000c6630000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.106473]                    ^
[   18.106712]  fff00000c6630080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.107258]  fff00000c6630100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.107682] ==================================================================

[   12.290148] ==================================================================
[   12.290726] BUG: KASAN: use-after-free in page_alloc_uaf+0x358/0x3d0
[   12.291053] Read of size 1 at addr ffff888102c30000 by task kunit_try_catch/162
[   12.291346] 
[   12.291436] CPU: 1 UID: 0 PID: 162 Comm: kunit_try_catch Tainted: G    B            N 6.14.10-rc1 #1
[   12.291476] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.291486] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.291506] Call Trace:
[   12.291518]  <TASK>
[   12.291533]  dump_stack_lvl+0x73/0xb0
[   12.291559]  print_report+0xd1/0x650
[   12.291580]  ? __virt_addr_valid+0x1db/0x2d0
[   12.291602]  ? page_alloc_uaf+0x358/0x3d0
[   12.291623]  ? kasan_addr_to_slab+0x11/0xa0
[   12.291641]  ? page_alloc_uaf+0x358/0x3d0
[   12.291662]  kasan_report+0x140/0x180
[   12.291685]  ? page_alloc_uaf+0x358/0x3d0
[   12.291709]  __asan_report_load1_noabort+0x18/0x20
[   12.291734]  page_alloc_uaf+0x358/0x3d0
[   12.291754]  ? __pfx_page_alloc_uaf+0x10/0x10
[   12.291777]  ? __pfx_page_alloc_uaf+0x10/0x10
[   12.291801]  kunit_try_run_case+0x1a6/0x480
[   12.291824]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.291845]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   12.291870]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.291892]  ? __kthread_parkme+0x82/0x160
[   12.291914]  ? preempt_count_sub+0x50/0x80
[   12.291938]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.291962]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.291987]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.292012]  kthread+0x324/0x6e0
[   12.292045]  ? trace_preempt_on+0x20/0xc0
[   12.292069]  ? __pfx_kthread+0x10/0x10
[   12.292090]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.292111]  ? calculate_sigpending+0x7b/0xa0
[   12.292132]  ? __pfx_kthread+0x10/0x10
[   12.292153]  ret_from_fork+0x41/0x80
[   12.292172]  ? __pfx_kthread+0x10/0x10
[   12.292194]  ret_from_fork_asm+0x1a/0x30
[   12.292225]  </TASK>
[   12.292235] 
[   12.298662] The buggy address belongs to the physical page:
[   12.298917] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102c30
[   12.299539] flags: 0x200000000000000(node=0|zone=2)
[   12.299754] page_type: f0(buddy)
[   12.299877] raw: 0200000000000000 ffff88817fffb4a0 ffff88817fffb4a0 0000000000000000
[   12.300149] raw: 0000000000000000 0000000000000004 00000000f0000000 0000000000000000
[   12.300482] page dumped because: kasan: bad access detected
[   12.300873] 
[   12.300964] Memory state around the buggy address:
[   12.301186]  ffff888102c2ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.301408]  ffff888102c2ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.301854] >ffff888102c30000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.302137]                    ^
[   12.302290]  ffff888102c30080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.302625]  ffff888102c30100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.302881] ==================================================================