Hay
Date
July 3, 2025, 11:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.309762] ==================================================================
[   19.310209] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   19.310601] Read of size 1 at addr fff00000c6564000 by task kunit_try_catch/148
[   19.310721] 
[   19.310870] CPU: 0 UID: 0 PID: 148 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   19.311082] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.311141] Hardware name: linux,dummy-virt (DT)
[   19.311208] Call trace:
[   19.311256]  show_stack+0x20/0x38 (C)
[   19.311902]  dump_stack_lvl+0x8c/0xd0
[   19.312053]  print_report+0x118/0x608
[   19.312301]  kasan_report+0xdc/0x128
[   19.312819]  __asan_report_load1_noabort+0x20/0x30
[   19.312936]  kmalloc_large_uaf+0x2cc/0x2f8
[   19.313147]  kunit_try_run_case+0x170/0x3f0
[   19.313247]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.313348]  kthread+0x328/0x630
[   19.313429]  ret_from_fork+0x10/0x20
[   19.313526] 
[   19.313570] The buggy address belongs to the physical page:
[   19.313626] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106564
[   19.313737] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.313858] raw: 0bfffe0000000000 ffffc1ffc3195a08 fff00000da456c40 0000000000000000
[   19.314057] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   19.314189] page dumped because: kasan: bad access detected
[   19.314257] 
[   19.314321] Memory state around the buggy address:
[   19.314400]  fff00000c6563f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.314486]  fff00000c6563f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.314577] >fff00000c6564000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.314671]                    ^
[   19.314842]  fff00000c6564080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.314921]  fff00000c6564100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.314996] ==================================================================

[   11.020403] ==================================================================
[   11.020957] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   11.021479] Read of size 1 at addr ffff888102aa0000 by task kunit_try_catch/165
[   11.021773] 
[   11.021884] CPU: 0 UID: 0 PID: 165 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.021923] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.021934] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.021953] Call Trace:
[   11.021965]  <TASK>
[   11.021979]  dump_stack_lvl+0x73/0xb0
[   11.022005]  print_report+0xd1/0x650
[   11.022026]  ? __virt_addr_valid+0x1db/0x2d0
[   11.022049]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.022069]  ? kasan_addr_to_slab+0x11/0xa0
[   11.022088]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.022108]  kasan_report+0x141/0x180
[   11.022151]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.022176]  __asan_report_load1_noabort+0x18/0x20
[   11.022199]  kmalloc_large_uaf+0x2f1/0x340
[   11.022219]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   11.022240]  ? __pfx_queued_spin_lock_slowpath+0x10/0x10
[   11.022267]  ? __pfx_read_tsc+0x10/0x10
[   11.022289]  ? ktime_get_ts64+0x86/0x230
[   11.022312]  kunit_try_run_case+0x1a5/0x480
[   11.022336]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.022358]  ? _raw_spin_lock_irqsave+0xf9/0x100
[   11.022378]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.022399]  ? __kthread_parkme+0x82/0x180
[   11.022418]  ? preempt_count_sub+0x50/0x80
[   11.022441]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.022463]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.022484]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.022505]  kthread+0x337/0x6f0
[   11.022530]  ? trace_preempt_on+0x20/0xc0
[   11.022552]  ? __pfx_kthread+0x10/0x10
[   11.022572]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.022591]  ? calculate_sigpending+0x7b/0xa0
[   11.022613]  ? __pfx_kthread+0x10/0x10
[   11.022634]  ret_from_fork+0x116/0x1d0
[   11.022652]  ? __pfx_kthread+0x10/0x10
[   11.022672]  ret_from_fork_asm+0x1a/0x30
[   11.022701]  </TASK>
[   11.022711] 
[   11.029961] The buggy address belongs to the physical page:
[   11.030517] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102aa0
[   11.030878] flags: 0x200000000000000(node=0|zone=2)
[   11.031099] raw: 0200000000000000 ffffea00040aa908 ffff88815b039f80 0000000000000000
[   11.031508] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   11.031785] page dumped because: kasan: bad access detected
[   11.031959] 
[   11.032055] Memory state around the buggy address:
[   11.032535]  ffff888102a9ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.032811]  ffff888102a9ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.033114] >ffff888102aa0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.033548]                    ^
[   11.033722]  ffff888102aa0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.034025]  ffff888102aa0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.034253] ==================================================================