KernelScan.io

HIGH Introduced in 6.11

kvm NestedMmu UAF

CVE-2026-98927

CVSS 7.0 / 10.0 NVD

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.0HIGH

01

In the Linux kernel, the following vulnerability has been resolved: KVM: arm64: nv: Fix life cycle of the nested_mmus array The nested_mmus array holds the shadow page tables that are used when a guest is running a nested context. These structures are allocated on VCPU_INIT for whole guest, which implies that they may have to be relocated as the array grows. Should a VCPU_INIT occur whilst a vcpu is actively running an L2 and that the allocation requires relocation, that vcpu will still be running with a pointer to the previous structure, which will have been freed. Fix this by turning the array of structures to an array of pointers, which is now allocated at VM creation, sized to the absolute maximum that KVM can handle. In turn, each VCPU_INIT contributes S2_MMU_PER_VCPU to the pool. No reallocation is ever performed, and the life cycle of each object is much clearer: - the nested_mmus array is allocated in kvm_init_nested(), and freed in kvm_arch_destroy_vm() - s2_mmu structures are allocated in kvm_vcpu_init_nested(), and freed on kvm_arch_flush_shadow_all() Finally, the freeing of vcpu->arch.vncr_array is made consistent rather than being done on some failure paths, but not others.

02

Engine v0.9.0

Risk summary

A local attacker with access to /dev/kvm can trigger a use-after-free in the KVM arm64 nested virtualization code by racing VCPU_INIT ioctls while an L2 guest is running. This allows heap corruption leading to privilege escalation, information disclosure, or kernel panic. Systems running KVM on ARM64 with nested virtualization enabled are affected, particularly those allowing untrusted code or containers access to the KVM device.

Affectedarch/arm64/kvm/nested.c (KVM arm64 nested virtualization)

Vulnerability analysis

The nested_mmus array, which holds shadow page tables for nested (L2) guests, was originally allocated as a contiguous array of structures that could grow dynamically when new VCPUs were initialized. If a VCPU_INIT ioctl occurred while another vCPU was actively running an L2 guest, and the array needed to be reallocated to accommodate more entries, the old array would be freed while the running vCPU still held a pointer to its stage-2 MMU structure inside that freed memory. The fix eliminates reallocation entirely by converting the array to a fixed-size array of pointers allocated at VM creation, with individual MMU structures allocated separately per VCPU and freed only during explicit teardown. This gives each structure a clear, non-overlapping lifetime. The vulnerability is reachable by any local user or container process with access to /dev/kvm on an ARM64 system with nested virtualization hardware support, requiring no special privileges beyond the ability to create KVM VMs and VCPUs.

03

BranchIntroducedFixed inPatch commit
6.126.116.12.113ea242bdc29e8
6.186.116.18.5681e3f065a648
7.26.117.2.9512c93f4461b
mainline6.117.333346f8960c7
cip/6.126.116.12.114-cip34ea242bdc29e8

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.114-cip34