Hay
Date
July 10, 2025, 6:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.589454] ==================================================================
[   16.589883] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   16.590261] Read of size 1 at addr fff00000c78a0000 by task kunit_try_catch/148
[   16.590325] 
[   16.590375] CPU: 1 UID: 0 PID: 148 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   16.590457] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.590484] Hardware name: linux,dummy-virt (DT)
[   16.590514] Call trace:
[   16.590538]  show_stack+0x20/0x38 (C)
[   16.590588]  dump_stack_lvl+0x8c/0xd0
[   16.590636]  print_report+0x118/0x608
[   16.590682]  kasan_report+0xdc/0x128
[   16.590727]  __asan_report_load1_noabort+0x20/0x30
[   16.590777]  kmalloc_large_uaf+0x2cc/0x2f8
[   16.590822]  kunit_try_run_case+0x170/0x3f0
[   16.590870]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.590923]  kthread+0x328/0x630
[   16.590965]  ret_from_fork+0x10/0x20
[   16.591367] 
[   16.591799] The buggy address belongs to the physical page:
[   16.591837] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078a0
[   16.592448] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.592815] raw: 0bfffe0000000000 ffffc1ffc31e2908 fff00000da479c40 0000000000000000
[   16.593057] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   16.593324] page dumped because: kasan: bad access detected
[   16.593569] 
[   16.593588] Memory state around the buggy address:
[   16.593852]  fff00000c789ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.593939]  fff00000c789ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.593981] >fff00000c78a0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.594170]                    ^
[   16.594359]  fff00000c78a0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.594563]  fff00000c78a0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.594618] ==================================================================

[   12.069271] ==================================================================
[   12.069727] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   12.069985] Read of size 1 at addr ffff888102a50000 by task kunit_try_catch/165
[   12.070409] 
[   12.070507] CPU: 1 UID: 0 PID: 165 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.070548] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.070559] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.070577] Call Trace:
[   12.070590]  <TASK>
[   12.070604]  dump_stack_lvl+0x73/0xb0
[   12.070633]  print_report+0xd1/0x650
[   12.070654]  ? __virt_addr_valid+0x1db/0x2d0
[   12.070676]  ? kmalloc_large_uaf+0x2f1/0x340
[   12.070696]  ? kasan_addr_to_slab+0x11/0xa0
[   12.070716]  ? kmalloc_large_uaf+0x2f1/0x340
[   12.070736]  kasan_report+0x141/0x180
[   12.070757]  ? kmalloc_large_uaf+0x2f1/0x340
[   12.070782]  __asan_report_load1_noabort+0x18/0x20
[   12.070806]  kmalloc_large_uaf+0x2f1/0x340
[   12.070873]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   12.070894]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   12.070920]  ? trace_hardirqs_on+0x37/0xe0
[   12.070942]  ? __pfx_read_tsc+0x10/0x10
[   12.070963]  ? ktime_get_ts64+0x86/0x230
[   12.070987]  kunit_try_run_case+0x1a5/0x480
[   12.071011]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.071047]  ? queued_spin_lock_slowpath+0x116/0xb40
[   12.071071]  ? __kthread_parkme+0x82/0x180
[   12.071091]  ? preempt_count_sub+0x50/0x80
[   12.071114]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.071138]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.071162]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.071186]  kthread+0x337/0x6f0
[   12.071204]  ? trace_preempt_on+0x20/0xc0
[   12.071226]  ? __pfx_kthread+0x10/0x10
[   12.071245]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.071266]  ? calculate_sigpending+0x7b/0xa0
[   12.071290]  ? __pfx_kthread+0x10/0x10
[   12.071311]  ret_from_fork+0x116/0x1d0
[   12.071329]  ? __pfx_kthread+0x10/0x10
[   12.071349]  ret_from_fork_asm+0x1a/0x30
[   12.071379]  </TASK>
[   12.071389] 
[   12.078178] The buggy address belongs to the physical page:
[   12.078357] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a50
[   12.078600] flags: 0x200000000000000(node=0|zone=2)
[   12.078849] raw: 0200000000000000 ffffea00040a9508 ffff88815b139f80 0000000000000000
[   12.079200] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   12.079525] page dumped because: kasan: bad access detected
[   12.079701] 
[   12.079769] Memory state around the buggy address:
[   12.079924]  ffff888102a4ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.080279]  ffff888102a4ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.080606] >ffff888102a50000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.081158]                    ^
[   12.081332]  ffff888102a50080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.081649]  ffff888102a50100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.082056] ==================================================================