CVE-2026-31553 Overview
CVE-2026-31553 is a vulnerability in the Linux kernel's KVM (Kernel-based Virtual Machine) subsystem for arm64 architecture. The flaw exists in the __kvm_at_swap_desc() function where an incorrect pointer arithmetic calculation leads to improper descriptor address computation. When using (u64 __user *)hva + offset to obtain virtual addresses of S1/S2 descriptors, the calculation incorrectly produces hva + offset*8 instead of the intended hva + offset when the offset is non-zero. This memory addressing error can allow a local attacker with low privileges to achieve code execution across security boundaries.
Critical Impact
Local privilege escalation vulnerability in KVM arm64 that allows attackers to escape VM boundaries due to incorrect memory descriptor address calculation, potentially compromising host system integrity.
Affected Products
- Linux Kernel 6.19
- Linux Kernel 7.0-rc1 through 7.0-rc7
- Linux Kernel (various affected versions)
Discovery Timeline
- 2026-04-24 - CVE CVE-2026-31553 published to NVD
- 2026-04-27 - Last updated in NVD database
Technical Details for CVE-2026-31553
Vulnerability Analysis
This vulnerability represents a classic pointer arithmetic error in the Linux kernel's KVM arm64 implementation. The __kvm_at_swap_desc() function is responsible for swapping stage 1 and stage 2 descriptors used in address translation. The core issue stems from C pointer arithmetic semantics where adding an offset to a typed pointer automatically multiplies the offset by the size of the pointed-to type.
In this case, casting the host virtual address (HVA) to (u64 __user *) before adding the offset causes the compiler to scale the offset by 8 bytes (the size of a u64). This results in accessing memory at an incorrect location, potentially 8 times further from the intended address than expected.
The vulnerability affects the KVM hypervisor's ability to properly manage virtual machine memory descriptors, which could lead to memory corruption, information disclosure between VMs, or privilege escalation from guest to host context.
Root Cause
The root cause is an improper use of pointer arithmetic in the __kvm_at_swap_desc() function. When the code performs (u64 __user *)hva + offset, it inadvertently scales the offset by the size of u64 (8 bytes) due to C's pointer arithmetic rules. The correct approach should add the raw byte offset to the HVA before any type casting, ensuring the calculated address points to the actual intended descriptor location.
This type of error is particularly subtle because it only manifests when the offset is non-zero, meaning the vulnerability may not appear during basic testing scenarios where offset values are zero.
Attack Vector
The vulnerability requires local access to the system with low privileges. An attacker would need to:
- Have access to a guest virtual machine running on an affected arm64 KVM hypervisor
- Trigger operations that cause __kvm_at_swap_desc() to be invoked with a non-zero offset value
- Exploit the resulting incorrect memory access to either read/write host memory or corrupt KVM internal state
The scope is changed (as indicated by the CVSS vector), meaning successful exploitation can impact resources beyond the vulnerable component's security scope—in this case, potentially allowing escape from the VM guest context to affect the host system.
The vulnerability mechanism in __kvm_at_swap_desc() involves incorrect pointer arithmetic when calculating descriptor addresses. When an offset value is provided to locate S1/S2 descriptors, the function casts the host virtual address to a u64 pointer before adding the offset. Due to C pointer arithmetic semantics, this results in the offset being multiplied by 8 (the size of u64), causing the function to access memory at an incorrect location. For technical implementation details, refer to the kernel git commit logs.
Detection Methods for CVE-2026-31553
Indicators of Compromise
- Unusual KVM-related kernel messages in system logs indicating memory access violations or descriptor swap failures
- Guest VM crashes or unexpected behavior when performing memory-intensive operations on arm64 systems
- Kernel oops or panic messages referencing __kvm_at_swap_desc or related KVM arm64 functions
Detection Strategies
- Monitor kernel logs (dmesg, /var/log/kern.log) for KVM subsystem errors on arm64 hosts
- Implement kernel function tracing for __kvm_at_swap_desc() to detect anomalous invocations with unusual offset values
- Deploy SentinelOne Singularity platform for real-time kernel-level threat detection and behavioral analysis
Monitoring Recommendations
- Enable KVM tracepoints on arm64 systems running virtual machines to capture address translation events
- Configure audit rules to monitor for processes interacting with KVM devices (/dev/kvm) in unusual patterns
- Implement memory access pattern monitoring for guest-to-host boundary operations
How to Mitigate CVE-2026-31553
Immediate Actions Required
- Apply the latest kernel patches from the Linux kernel stable tree immediately on all affected arm64 KVM hosts
- Consider temporarily migrating critical VMs to unaffected hosts or x86_64 infrastructure until patches are applied
- Restrict access to the KVM interface (/dev/kvm) to only trusted users and services
Patch Information
The Linux kernel maintainers have released fixes addressing this vulnerability. The patches correct the pointer arithmetic to properly calculate the descriptor address as hva + offset rather than the incorrect hva + offset*8.
Patches are available at:
Administrators should update to the latest stable kernel version that incorporates these fixes.
Workarounds
- Limit KVM usage on arm64 systems until patching is complete by using containerization or non-KVM virtualization alternatives
- Implement strict access controls on /dev/kvm to prevent untrusted users from creating or managing virtual machines
- Enable SELinux or AppArmor policies to further restrict KVM operations to authorized processes only
# Restrict KVM device access to virtualization group only
chmod 660 /dev/kvm
chown root:kvm /dev/kvm
# Verify current kernel version and check for available updates
uname -r
apt update && apt list --upgradable | grep linux-image
# or for RHEL/CentOS:
# yum check-update kernel
# Check if system is arm64 and running KVM
uname -m
lsmod | grep kvm
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


