Hay
Date
July 1, 2025, 3:08 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.764951] ==================================================================
[   16.765452] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   16.765643] Read of size 1 at addr fff00000c692c000 by task kunit_try_catch/149
[   16.765712] 
[   16.765755] CPU: 1 UID: 0 PID: 149 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   16.765872] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.765902] Hardware name: linux,dummy-virt (DT)
[   16.765934] Call trace:
[   16.765956]  show_stack+0x20/0x38 (C)
[   16.766008]  dump_stack_lvl+0x8c/0xd0
[   16.766057]  print_report+0x118/0x608
[   16.766102]  kasan_report+0xdc/0x128
[   16.766145]  __asan_report_load1_noabort+0x20/0x30
[   16.766195]  kmalloc_large_uaf+0x2cc/0x2f8
[   16.766240]  kunit_try_run_case+0x170/0x3f0
[   16.766288]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.766340]  kthread+0x328/0x630
[   16.766382]  ret_from_fork+0x10/0x20
[   16.766429] 
[   16.766450] The buggy address belongs to the physical page:
[   16.766482] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10692c
[   16.766536] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.766618] raw: 0bfffe0000000000 ffffc1ffc31a4c08 fff00000da478c40 0000000000000000
[   16.766695] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   16.766736] page dumped because: kasan: bad access detected
[   16.766767] 
[   16.766785] Memory state around the buggy address:
[   16.766818]  fff00000c692bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.766929]  fff00000c692bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.767108] >fff00000c692c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.767159]                    ^
[   16.767290]  fff00000c692c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.767447]  fff00000c692c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.767485] ==================================================================

[   11.043874] ==================================================================
[   11.044413] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   11.044733] Read of size 1 at addr ffff888102914000 by task kunit_try_catch/165
[   11.045065] 
[   11.045269] CPU: 0 UID: 0 PID: 165 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.045318] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.045330] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.045351] Call Trace:
[   11.045364]  <TASK>
[   11.045382]  dump_stack_lvl+0x73/0xb0
[   11.045411]  print_report+0xd1/0x650
[   11.045444]  ? __virt_addr_valid+0x1db/0x2d0
[   11.045468]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.045487]  ? kasan_addr_to_slab+0x11/0xa0
[   11.045517]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.045537]  kasan_report+0x141/0x180
[   11.045558]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.045583]  __asan_report_load1_noabort+0x18/0x20
[   11.045605]  kmalloc_large_uaf+0x2f1/0x340
[   11.045625]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   11.045645]  ? __schedule+0x10cc/0x2b60
[   11.045666]  ? __pfx_read_tsc+0x10/0x10
[   11.045687]  ? ktime_get_ts64+0x86/0x230
[   11.045710]  kunit_try_run_case+0x1a5/0x480
[   11.045735]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.045817]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.045845]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.045866]  ? __kthread_parkme+0x82/0x180
[   11.045899]  ? preempt_count_sub+0x50/0x80
[   11.045922]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.045944]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.045966]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.045988]  kthread+0x337/0x6f0
[   11.046006]  ? trace_preempt_on+0x20/0xc0
[   11.046038]  ? __pfx_kthread+0x10/0x10
[   11.046058]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.046077]  ? calculate_sigpending+0x7b/0xa0
[   11.046099]  ? __pfx_kthread+0x10/0x10
[   11.046119]  ret_from_fork+0x116/0x1d0
[   11.046137]  ? __pfx_kthread+0x10/0x10
[   11.046156]  ret_from_fork_asm+0x1a/0x30
[   11.046186]  </TASK>
[   11.046197] 
[   11.056153] The buggy address belongs to the physical page:
[   11.056438] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102914
[   11.057161] flags: 0x200000000000000(node=0|zone=2)
[   11.057413] raw: 0200000000000000 ffffea00040a4608 ffff88815b039f80 0000000000000000
[   11.057785] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   11.058104] page dumped because: kasan: bad access detected
[   11.058315] 
[   11.058409] Memory state around the buggy address:
[   11.058607]  ffff888102913f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.058977]  ffff888102913f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.059245] >ffff888102914000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.059548]                    ^
[   11.059689]  ffff888102914080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.060011]  ffff888102914100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.060480] ==================================================================