Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-98440 Overview
CVE-2026-98440 is a Linux kernel vulnerability in the Kernel-based Virtual Machine (KVM) subsystem for arm64 nested virtualization (nv). The flaw involves premature freeing of shadow Stage-2 (S2) memory management unit (MMU) structures during kvm_arch_flush_shadow_all(). The structures remain referenced by other parts of the system when freed, creating a use-after-free condition. Maintainers resolved the issue by introducing separate destructors that run only during full virtual machine (VM) teardown, after the vCPUs are destroyed.
Critical Impact
Freeing shadow S2 container structures while they can still be referenced may lead to use-after-free conditions in the arm64 KVM nested virtualization code path.
Affected Products
- Linux kernel versions containing the arm64 KVM nested virtualization (nv) support
- Systems running arm64 hosts with KVM nested virtualization enabled
- Downstream distributions shipping affected mainline kernel versions
Discovery Timeline
- 2026-10-18 - CVE-2026-98440 published to the National Vulnerability Database (NVD)
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-98440
Vulnerability Analysis
The vulnerability resides in the arm64 KVM nested virtualization implementation. When a VM is torn down, the kernel invokes kvm_arch_flush_shadow_all() to flush shadow page tables. The original code also freed the shadow S2 MMU container structures from this callback. These containers can still be referenced by other kernel components when the flush runs, so freeing them early produces a dangling reference.
The maintainer fix introduces separate destructors that run during final VM destruction. These destructors release both the individual MMU structures and the global array that tracks them. By delaying teardown until after vCPUs have been destroyed, the fix removes the window in which freed memory could still be in use. This is classified as a use-after-free condition in a kernel memory management path.
Root Cause
The root cause is incorrect lifecycle management of shadow S2 structures in the arm64 nested virtualization code. The kvm_arch_flush_shadow_all() callback is intended for flushing page tables, not for releasing container objects that outlive the flush operation. Allocating and freeing the containers in mismatched lifecycle phases creates the dangling reference.
Attack Vector
Exploitation requires an attacker with the ability to create and destroy KVM virtual machines on an arm64 host configured with nested virtualization. The attack vector is local and depends on the ability to trigger the shadow flush path during VM teardown while other kernel components still hold references. The CVE record does not include a Common Vulnerability Scoring System (CVSS) vector or a public proof of concept.
No verified public exploit code is available. See the kernel commits referenced below for the authoritative fix.
Detection Methods for CVE-2026-98440
Indicators of Compromise
- Kernel oops or panic messages referencing KVM arm64 shadow S2 or nested MMU teardown paths
- Unexpected host crashes correlated with guest VM shutdown events on arm64 nested virtualization hosts
- KASAN (Kernel Address Sanitizer) use-after-free reports originating from kvm_arch_flush_shadow_all or related nested MMU functions
Detection Strategies
- Enable KASAN on development or staging arm64 hosts to surface use-after-free conditions during VM lifecycle testing
- Monitor kernel ring buffer (dmesg) for KVM subsystem warnings around VM creation and destruction
- Compare installed kernel versions against the fixed commits (22e82ace, 5bf1c917, 876049f0, e5843f4e) published on git.kernel.org
Monitoring Recommendations
- Track hypervisor host stability metrics and crash frequency on arm64 systems running nested VMs
- Alert on KVM-related kernel warnings and backtraces forwarded to centralized logging
- Audit kernel package versions across the fleet to confirm patched builds are deployed
How to Mitigate CVE-2026-98440
Immediate Actions Required
- Apply the upstream kernel patches referenced in the stable commits 22e82ace, 5bf1c917, 876049f0, and e5843f4e
- Update to a distribution kernel package that incorporates the fix for arm64 KVM nested virtualization
- Restrict VM creation privileges to trusted users on arm64 hosts with nested virtualization enabled
Patch Information
The fix is available in multiple Linux stable branches. See the kernel commits 22e82ace, 5bf1c917, 876049f0, and e5843f4e. The patch introduces separate destructors invoked during final VM destruction rather than during the shadow flush callback.
Workarounds
- Disable KVM nested virtualization on arm64 hosts where it is not required until the patched kernel is installed
- Limit which workloads can spawn and destroy guest VMs to reduce exposure to the vulnerable code path
- Reboot hosts into patched kernels promptly after deployment to activate the fix
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

