Hay
Date
July 16, 2025, 12:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   30.380930] ==================================================================
[   30.380995] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   30.381124] Read of size 1 at addr fff00000c9a08000 by task kunit_try_catch/179
[   30.381190] 
[   30.381220] CPU: 0 UID: 0 PID: 179 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250716 #1 PREEMPT 
[   30.381303] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.381349] Hardware name: linux,dummy-virt (DT)
[   30.381385] Call trace:
[   30.381407]  show_stack+0x20/0x38 (C)
[   30.381452]  dump_stack_lvl+0x8c/0xd0
[   30.381498]  print_report+0x118/0x5d0
[   30.381553]  kasan_report+0xdc/0x128
[   30.381594]  __asan_report_load1_noabort+0x20/0x30
[   30.381641]  kmalloc_large_uaf+0x2cc/0x2f8
[   30.381686]  kunit_try_run_case+0x170/0x3f0
[   30.381732]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.381787]  kthread+0x328/0x630
[   30.381829]  ret_from_fork+0x10/0x20
[   30.381880] 
[   30.381905] The buggy address belongs to the physical page:
[   30.381935] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109a08
[   30.381986] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.382054] raw: 0bfffe0000000000 fff00000da450d00 fff00000da450d00 0000000000000000
[   30.382103] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   30.382142] page dumped because: kasan: bad access detected
[   30.382173] 
[   30.382190] Memory state around the buggy address:
[   30.382220]  fff00000c9a07f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.382262]  fff00000c9a07f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.382304] >fff00000c9a08000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   30.382341]                    ^
[   30.382374]  fff00000c9a08080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   30.382427]  fff00000c9a08100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   30.382465] ==================================================================

[   22.789363] ==================================================================
[   22.790510] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   22.791007] Read of size 1 at addr ffff8881060ec000 by task kunit_try_catch/197
[   22.791493] 
[   22.791664] CPU: 1 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250716 #1 PREEMPT(voluntary) 
[   22.791717] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.791729] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   22.791750] Call Trace:
[   22.791763]  <TASK>
[   22.791779]  dump_stack_lvl+0x73/0xb0
[   22.791807]  print_report+0xd1/0x610
[   22.791828]  ? __virt_addr_valid+0x1db/0x2d0
[   22.791851]  ? kmalloc_large_uaf+0x2f1/0x340
[   22.791870]  ? kasan_addr_to_slab+0x11/0xa0
[   22.791890]  ? kmalloc_large_uaf+0x2f1/0x340
[   22.791910]  kasan_report+0x141/0x180
[   22.791931]  ? kmalloc_large_uaf+0x2f1/0x340
[   22.791955]  __asan_report_load1_noabort+0x18/0x20
[   22.791978]  kmalloc_large_uaf+0x2f1/0x340
[   22.791999]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   22.792020]  ? __schedule+0x10c6/0x2b60
[   22.792042]  ? __pfx_read_tsc+0x10/0x10
[   22.792064]  ? ktime_get_ts64+0x86/0x230
[   22.792089]  kunit_try_run_case+0x1a5/0x480
[   22.792113]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.792155]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   22.792177]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   22.792199]  ? __kthread_parkme+0x82/0x180
[   22.792219]  ? preempt_count_sub+0x50/0x80
[   22.792242]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.792273]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.792299]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   22.792325]  kthread+0x337/0x6f0
[   22.792344]  ? trace_preempt_on+0x20/0xc0
[   22.792368]  ? __pfx_kthread+0x10/0x10
[   22.792388]  ? _raw_spin_unlock_irq+0x47/0x80
[   22.792407]  ? calculate_sigpending+0x7b/0xa0
[   22.792431]  ? __pfx_kthread+0x10/0x10
[   22.792452]  ret_from_fork+0x116/0x1d0
[   22.792470]  ? __pfx_kthread+0x10/0x10
[   22.792490]  ret_from_fork_asm+0x1a/0x30
[   22.792520]  </TASK>
[   22.792546] 
[   22.801104] The buggy address belongs to the physical page:
[   22.801389] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1060ec
[   22.802056] flags: 0x200000000000000(node=0|zone=2)
[   22.802501] raw: 0200000000000000 ffffea0004183c08 ffff88815b139fc0 0000000000000000
[   22.803329] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   22.804047] page dumped because: kasan: bad access detected
[   22.804619] 
[   22.804773] Memory state around the buggy address:
[   22.805234]  ffff8881060ebf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.805906]  ffff8881060ebf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.806409] >ffff8881060ec000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   22.806637]                    ^
[   22.806924]  ffff8881060ec080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   22.807612]  ffff8881060ec100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   22.808314] ==================================================================