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

Environment
qemu-arm64
qemu-x86_64

[   16.444877] ==================================================================
[   16.444953] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   16.445194] Read of size 1 at addr fff00000c7890000 by task kunit_try_catch/148
[   16.445259] 
[   16.445340] CPU: 1 UID: 0 PID: 148 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   16.445453] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.445487] Hardware name: linux,dummy-virt (DT)
[   16.445517] Call trace:
[   16.445693]  show_stack+0x20/0x38 (C)
[   16.445814]  dump_stack_lvl+0x8c/0xd0
[   16.445920]  print_report+0x118/0x5d0
[   16.445974]  kasan_report+0xdc/0x128
[   16.446018]  __asan_report_load1_noabort+0x20/0x30
[   16.446125]  kmalloc_large_uaf+0x2cc/0x2f8
[   16.446172]  kunit_try_run_case+0x170/0x3f0
[   16.446218]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.446436]  kthread+0x328/0x630
[   16.446525]  ret_from_fork+0x10/0x20
[   16.446612] 
[   16.446651] The buggy address belongs to the physical page:
[   16.446748] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107890
[   16.446805] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.446866] raw: 0bfffe0000000000 ffffc1ffc31e2508 fff00000da478c40 0000000000000000
[   16.446921] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   16.447106] page dumped because: kasan: bad access detected
[   16.447164] 
[   16.447266] Memory state around the buggy address:
[   16.447351]  fff00000c788ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.447461]  fff00000c788ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.447504] >fff00000c7890000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.447541]                    ^
[   16.447568]  fff00000c7890080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.447798]  fff00000c7890100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.448007] ==================================================================

[   12.090119] ==================================================================
[   12.090583] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   12.090869] Read of size 1 at addr ffff888102a34000 by task kunit_try_catch/165
[   12.091368] 
[   12.091491] CPU: 0 UID: 0 PID: 165 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.091535] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.091546] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.091565] Call Trace:
[   12.091577]  <TASK>
[   12.091591]  dump_stack_lvl+0x73/0xb0
[   12.091622]  print_report+0xd1/0x610
[   12.091644]  ? __virt_addr_valid+0x1db/0x2d0
[   12.091668]  ? kmalloc_large_uaf+0x2f1/0x340
[   12.091689]  ? kasan_addr_to_slab+0x11/0xa0
[   12.091710]  ? kmalloc_large_uaf+0x2f1/0x340
[   12.091731]  kasan_report+0x141/0x180
[   12.091767]  ? kmalloc_large_uaf+0x2f1/0x340
[   12.091794]  __asan_report_load1_noabort+0x18/0x20
[   12.091819]  kmalloc_large_uaf+0x2f1/0x340
[   12.091840]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   12.091862]  ? __schedule+0x10cc/0x2b60
[   12.091885]  ? __pfx_read_tsc+0x10/0x10
[   12.091907]  ? ktime_get_ts64+0x86/0x230
[   12.091935]  kunit_try_run_case+0x1a5/0x480
[   12.091960]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.091983]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.092008]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.092032]  ? __kthread_parkme+0x82/0x180
[   12.092053]  ? preempt_count_sub+0x50/0x80
[   12.092133]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.092160]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.092185]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.092211]  kthread+0x337/0x6f0
[   12.092230]  ? trace_preempt_on+0x20/0xc0
[   12.092255]  ? __pfx_kthread+0x10/0x10
[   12.092275]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.092297]  ? calculate_sigpending+0x7b/0xa0
[   12.092323]  ? __pfx_kthread+0x10/0x10
[   12.092345]  ret_from_fork+0x116/0x1d0
[   12.092365]  ? __pfx_kthread+0x10/0x10
[   12.092386]  ret_from_fork_asm+0x1a/0x30
[   12.092418]  </TASK>
[   12.092427] 
[   12.100268] The buggy address belongs to the physical page:
[   12.100550] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a34
[   12.100879] flags: 0x200000000000000(node=0|zone=2)
[   12.101189] raw: 0200000000000000 ffffea00040a8e08 ffff88815b039f80 0000000000000000
[   12.101453] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   12.101830] page dumped because: kasan: bad access detected
[   12.102130] 
[   12.102349] Memory state around the buggy address:
[   12.102706]  ffff888102a33f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.103072]  ffff888102a33f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.103362] >ffff888102a34000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.103670]                    ^
[   12.103885]  ffff888102a34080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.104115]  ffff888102a34100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.104330] ==================================================================