Hay
Date
June 3, 2025, 7:38 a.m.

Environment
qemu-arm64
qemu-x86_64
x86

[   18.136640] ==================================================================
[   18.136717] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   18.136775] Read of size 1 at addr fff00000c6474000 by task kunit_try_catch/148
[   18.136829] 
[   18.136863] CPU: 1 UID: 0 PID: 148 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250603 #1 PREEMPT 
[   18.136947] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.136973] Hardware name: linux,dummy-virt (DT)
[   18.137002] Call trace:
[   18.137024]  show_stack+0x20/0x38 (C)
[   18.137071]  dump_stack_lvl+0x8c/0xd0
[   18.137118]  print_report+0x118/0x608
[   18.137163]  kasan_report+0xdc/0x128
[   18.137206]  __asan_report_load1_noabort+0x20/0x30
[   18.137252]  kmalloc_large_uaf+0x2cc/0x2f8
[   18.137296]  kunit_try_run_case+0x170/0x3f0
[   18.137342]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.137393]  kthread+0x328/0x630
[   18.137448]  ret_from_fork+0x10/0x20
[   18.137495] 
[   18.137516] The buggy address belongs to the physical page:
[   18.137547] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106474
[   18.137596] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.137660] raw: 0bfffe0000000000 ffffc1ffc3191e08 fff00000da46ac40 0000000000000000
[   18.137707] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   18.137746] page dumped because: kasan: bad access detected
[   18.137775] 
[   18.137793] Memory state around the buggy address:
[   18.137824]  fff00000c6473f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.137864]  fff00000c6473f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.137904] >fff00000c6474000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.137941]                    ^
[   18.137970]  fff00000c6474080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.138010]  fff00000c6474100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.138046] ==================================================================


[   13.722356] ==================================================================
[   13.723118] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   13.723498] Read of size 1 at addr ffff888103948000 by task kunit_try_catch/165
[   13.723855] 
[   13.723995] CPU: 1 UID: 0 PID: 165 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250603 #1 PREEMPT(voluntary) 
[   13.724054] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.724068] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.724091] Call Trace:
[   13.724108]  <TASK>
[   13.724133]  dump_stack_lvl+0x73/0xb0
[   13.724166]  print_report+0xd1/0x650
[   13.724190]  ? __virt_addr_valid+0x1db/0x2d0
[   13.724702]  ? kmalloc_large_uaf+0x2f1/0x340
[   13.724770]  ? kasan_addr_to_slab+0x11/0xa0
[   13.725163]  ? kmalloc_large_uaf+0x2f1/0x340
[   13.725218]  kasan_report+0x141/0x180
[   13.725273]  ? kmalloc_large_uaf+0x2f1/0x340
[   13.725353]  __asan_report_load1_noabort+0x18/0x20
[   13.725385]  kmalloc_large_uaf+0x2f1/0x340
[   13.725409]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   13.725435]  ? __schedule+0x10cc/0x2b60
[   13.725486]  ? __pfx_read_tsc+0x10/0x10
[   13.725516]  ? ktime_get_ts64+0x86/0x230
[   13.725544]  kunit_try_run_case+0x1a5/0x480
[   13.725568]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.725589]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.725617]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.725643]  ? __kthread_parkme+0x82/0x180
[   13.725666]  ? preempt_count_sub+0x50/0x80
[   13.725692]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.725714]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.725740]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.725765]  kthread+0x337/0x6f0
[   13.725787]  ? trace_preempt_on+0x20/0xc0
[   13.725812]  ? __pfx_kthread+0x10/0x10
[   13.725834]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.725858]  ? calculate_sigpending+0x7b/0xa0
[   13.725884]  ? __pfx_kthread+0x10/0x10
[   13.725907]  ret_from_fork+0x116/0x1d0
[   13.725928]  ? __pfx_kthread+0x10/0x10
[   13.725950]  ret_from_fork_asm+0x1a/0x30
[   13.725983]  </TASK>
[   13.725996] 
[   13.735988] The buggy address belongs to the physical page:
[   13.736539] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103948
[   13.737356] flags: 0x200000000000000(node=0|zone=2)
[   13.737826] raw: 0200000000000000 ffffea00040e5308 ffff88815b139f80 0000000000000000
[   13.738123] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   13.738867] page dumped because: kasan: bad access detected
[   13.739082] 
[   13.739273] Memory state around the buggy address:
[   13.739783]  ffff888103947f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.740098]  ffff888103947f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.740739] >ffff888103948000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.741225]                    ^
[   13.741651]  ffff888103948080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.742058]  ffff888103948100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.742417] ==================================================================


[   19.837735] ==================================================================
[   19.849228] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   19.855849] Read of size 1 at addr ffff888104b7c000 by task kunit_try_catch/188
[   19.863164] 
[   19.864663] CPU: 0 UID: 0 PID: 188 Comm: kunit_try_catch Tainted: G S  B            N  6.15.0-next-20250603 #1 PREEMPT(voluntary) 
[   19.864673] Tainted: [S]=CPU_OUT_OF_SPEC, [B]=BAD_PAGE, [N]=TEST
[   19.864675] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS 2.7 12/07/2021
[   19.864679] Call Trace:
[   19.864680]  <TASK>
[   19.864682]  dump_stack_lvl+0x73/0xb0
[   19.864686]  print_report+0xd1/0x650
[   19.864690]  ? __virt_addr_valid+0x1db/0x2d0
[   19.864694]  ? kmalloc_large_uaf+0x2f1/0x340
[   19.864698]  ? kasan_addr_to_slab+0x11/0xa0
[   19.864702]  ? kmalloc_large_uaf+0x2f1/0x340
[   19.864706]  kasan_report+0x141/0x180
[   19.864710]  ? kmalloc_large_uaf+0x2f1/0x340
[   19.864714]  __asan_report_load1_noabort+0x18/0x20
[   19.864718]  kmalloc_large_uaf+0x2f1/0x340
[   19.864722]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   19.864726]  ? __schedule+0x10cc/0x2b60
[   19.864730]  ? ktime_get_ts64+0x83/0x230
[   19.864734]  kunit_try_run_case+0x1a2/0x480
[   19.864738]  ? __pfx_kunit_try_run_case+0x10/0x10
[   19.864741]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   19.864746]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   19.864751]  ? __kthread_parkme+0x82/0x180
[   19.864754]  ? preempt_count_sub+0x50/0x80
[   19.864758]  ? __pfx_kunit_try_run_case+0x10/0x10
[   19.864762]  kunit_generic_run_threadfn_adapter+0x82/0xf0
[   19.864766]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   19.864771]  kthread+0x334/0x6f0
[   19.864774]  ? trace_preempt_on+0x20/0xc0
[   19.864778]  ? __pfx_kthread+0x10/0x10
[   19.864782]  ? _raw_spin_unlock_irq+0x47/0x80
[   19.864786]  ? calculate_sigpending+0x7b/0xa0
[   19.864790]  ? __pfx_kthread+0x10/0x10
[   19.864794]  ret_from_fork+0x113/0x1d0
[   19.864797]  ? __pfx_kthread+0x10/0x10
[   19.864801]  ret_from_fork_asm+0x1a/0x30
[   19.864807]  </TASK>
[   19.864808] 
[   20.029318] The buggy address belongs to the physical page:
[   20.034890] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104b7c
[   20.042898] flags: 0x200000000000000(node=0|zone=2)
[   20.047778] raw: 0200000000000000 ffffea000412e008 ffff888230439f80 0000000000000000
[   20.055519] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   20.063264] page dumped because: kasan: bad access detected
[   20.068836] 
[   20.070336] Memory state around the buggy address:
[   20.075164]  ffff888104b7bf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   20.082388]  ffff888104b7bf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   20.089656] >ffff888104b7c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.096873]                    ^
[   20.100105]  ffff888104b7c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.107327]  ffff888104b7c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.114544] ==================================================================