Hay
Date
July 1, 2025, 11:08 a.m.

Environment
qemu-arm64
qemu-x86_64

[   18.189505] ==================================================================
[   18.189613] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   18.189949] Read of size 1 at addr fff00000c64b0000 by task kunit_try_catch/149
[   18.190068] 
[   18.190148] CPU: 1 UID: 0 PID: 149 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   18.190269] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.190328] Hardware name: linux,dummy-virt (DT)
[   18.190366] Call trace:
[   18.190452]  show_stack+0x20/0x38 (C)
[   18.190532]  dump_stack_lvl+0x8c/0xd0
[   18.190610]  print_report+0x118/0x608
[   18.190735]  kasan_report+0xdc/0x128
[   18.190783]  __asan_report_load1_noabort+0x20/0x30
[   18.190836]  kmalloc_large_uaf+0x2cc/0x2f8
[   18.190882]  kunit_try_run_case+0x170/0x3f0
[   18.190950]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.191159]  kthread+0x328/0x630
[   18.191384]  ret_from_fork+0x10/0x20
[   18.191517] 
[   18.191587] The buggy address belongs to the physical page:
[   18.191669] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1064b0
[   18.191804] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.191973] raw: 0bfffe0000000000 ffffc1ffc3192d08 fff00000da478c40 0000000000000000
[   18.192111] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   18.192223] page dumped because: kasan: bad access detected
[   18.192257] 
[   18.192276] Memory state around the buggy address:
[   18.192314]  fff00000c64aff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.192522]  fff00000c64aff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.192571] >fff00000c64b0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.192809]                    ^
[   18.192881]  fff00000c64b0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.192973]  fff00000c64b0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.193015] ==================================================================

[   11.068991] ==================================================================
[   11.069702] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   11.070540] Read of size 1 at addr ffff888102be0000 by task kunit_try_catch/165
[   11.071320] 
[   11.071474] CPU: 0 UID: 0 PID: 165 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.071522] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.071534] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.071555] Call Trace:
[   11.071568]  <TASK>
[   11.071588]  dump_stack_lvl+0x73/0xb0
[   11.071619]  print_report+0xd1/0x650
[   11.071643]  ? __virt_addr_valid+0x1db/0x2d0
[   11.071666]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.071686]  ? kasan_addr_to_slab+0x11/0xa0
[   11.071705]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.071726]  kasan_report+0x141/0x180
[   11.071746]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.071770]  __asan_report_load1_noabort+0x18/0x20
[   11.071793]  kmalloc_large_uaf+0x2f1/0x340
[   11.071812]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   11.071832]  ? __schedule+0x10cc/0x2b60
[   11.071853]  ? __pfx_read_tsc+0x10/0x10
[   11.071874]  ? ktime_get_ts64+0x86/0x230
[   11.071897]  kunit_try_run_case+0x1a5/0x480
[   11.071930]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.071951]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.071973]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.071994]  ? __kthread_parkme+0x82/0x180
[   11.072014]  ? preempt_count_sub+0x50/0x80
[   11.072037]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.072059]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.072080]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.072101]  kthread+0x337/0x6f0
[   11.072119]  ? trace_preempt_on+0x20/0xc0
[   11.072142]  ? __pfx_kthread+0x10/0x10
[   11.072171]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.072192]  ? calculate_sigpending+0x7b/0xa0
[   11.072214]  ? __pfx_kthread+0x10/0x10
[   11.072234]  ret_from_fork+0x116/0x1d0
[   11.072252]  ? __pfx_kthread+0x10/0x10
[   11.072270]  ret_from_fork_asm+0x1a/0x30
[   11.072301]  </TASK>
[   11.072312] 
[   11.085656] The buggy address belongs to the physical page:
[   11.085866] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102be0
[   11.086581] flags: 0x200000000000000(node=0|zone=2)
[   11.087168] raw: 0200000000000000 ffffea00040af908 ffff88815b039f80 0000000000000000
[   11.087968] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   11.088539] page dumped because: kasan: bad access detected
[   11.088940] 
[   11.089308] Memory state around the buggy address:
[   11.089713]  ffff888102bdff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.089943]  ffff888102bdff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.090632] >ffff888102be0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.091338]                    ^
[   11.091515]  ffff888102be0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.092114]  ffff888102be0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.092534] ==================================================================