Cloud operators running KVM on AMD processors must address a flaw that allows a virtual machine with root access to forge memory entries and read data belonging to other customers on the same host. Identified as CVE-2026-99312, this critical vulnerability resides in the Kernel-based Virtual Machine (KVM) hypervisor, which serves as a cornerstone for many modern cloud infrastructures. Security researchers at Terra Security identified the issue, demonstrating that an attacker possessing administrative privileges within a guest instance could manipulate memory management states to access a massive 127 GB of raw host RAM. This exposure is particularly alarming for multi-tenant environments where diverse workloads share the same physical AMD hardware. Although the vulnerability specifically targets configurations with nested virtualization enabled, its discovery serves as a reminder of the fragile boundaries in virtual instances. Providers responded rapidly, with upstream fixes merged into the Linux kernel shortly before the details were made public.
1. KVM Vulnerability Exposes AMD Host Memory to Guests
Technical analysis of the vulnerability revealed that the root cause involves a dangling pointer left pointing at memory that the kernel has already freed. Within the KVM environment, each virtual machine is confined by a nested page table, which the processor uses to translate guest memory addresses into physical host addresses. When a guest attempts to run a nested virtual machine, the system relies on specific pointers to manage these transitions. However, when a reset signal known as an INIT signal stops a nested virtual machine, the hypervisor erroneously skips the restoration of the outer virtual machine’s pointer. This leaves the system in a compromised state where the pointer remains directed toward a page of memory that the Linux kernel has reclaimed for other uses. Once the kernel reallocates that freed page, an attacker-controlled guest can fill it with forged entries of its own choosing, tricking the physical processor into following these malicious instructions as if they were genuine system tables.
The impact of this flaw was confirmed through thorough testing on both public cloud instances and private bare-metal AMD servers. In the first phase of the exploit, researchers successfully read the host kernel version banner, followed by a massive dump of the host RAM, which was mapped in a read-only state. This data could contain sensitive credentials, cryptographic keys, or private communications from other customers co-located on the same server. Furthermore, the research team conducted a write test on a private server to determine the extent of the integrity risk. By manipulating the forged page tables, the guest virtual machine was able to write 32 chosen bytes into a live page of the host kernel memory. A witness module loaded into the kernel confirmed that the change had occurred successfully, proving that a malicious guest could potentially subvert the entire host operating system. This demonstration underscored why security experts have characterized the flaw as a critical failure of the hypervisor’s primary isolation duty.
2. Mitigation Steps for System Administrators
To secure a vulnerable host, administrators must apply kernel updates or modify system configurations. Follow these steps to address the risk. First, verify the current configuration by executing the command cat /sys/module/kvm_amd/parameters/nested in the host terminal to see if nested virtualization is active. A result of 1 or Y indicates the system is currently exposed to the exploit. If an immediate kernel update is not possible due to uptime requirements or maintenance windows, administrators should deactivate the nested features immediately. This is accomplished by adding the line options kvm_amd nested=0 to the module configuration files of the host operating system. Disabling this feature closes the specific execution path that the vulnerability exploits, although it will prevent any guest virtual machines from running their own nested instances. This trade-off is often necessary to maintain the integrity of the broader shared cloud environment while waiting for a more permanent software patch to be applied.
The next stage of mitigation requires a restart of the machine. A full system reboot is mandatory to apply a new kernel or to finalize changes to the virtualization settings. Administrators must recognize that the nested virtualization setting cannot be toggled while virtual machines are active, and a newly installed kernel does not protect the host until the reboot is completed. After the system has returned to service, it is vital to validate the fix. This involves confirming the active kernel version with the uname -r command and re-checking the nested parameter to ensure it is now set to 0 or N. By following these steps, operators ensure that the memory-management state is reset on every INIT signal as intended by the new security patches. Maintaining rigorous verification protocols after a reboot is essential for confirming that the configuration changes persisted and that the system is no longer susceptible to memory forgery attacks from untrusted guest virtual machines.
3. Origins and Impact of the Bug
The origins of this vulnerability provide a sobering look at the complexities of modern software development, as the flaw was inadvertently introduced in 2022 by a patch intended to fix a different security issue. This specific error, which remained undetected in the Linux kernel for nearly four years, highlights a recurring challenge where complex security patches can sometimes introduce new and unforeseen weaknesses. Research groups, such as those involved in the PatchSlop study, have noted that a measurable percentage of kernel vulnerabilities are the direct result of previous security fixes. This irony complicates the task of system maintainers who must balance the need for rapid patching with the risk of introducing regression errors. Currently, the fixes have been integrated into several stable and long-term support kernel branches, including versions 7.3.5, 6.18.64, and 6.12.118. However, many popular Linux distributions are still backporting these crucial updates into their official software repositories.
Security specialists evaluated the persistent risks associated with hypervisor vulnerabilities and emphasized the need for defense-in-depth strategies. Organizations successfully implemented enhanced monitoring for unusual memory access patterns and transitioned toward more automated patching workflows. These steps were crucial in reducing the window of exposure for shared cloud infrastructure. Furthermore, the industry observed a greater focus on formal verification of kernel code to prevent similar dangling pointer errors from entering production releases. By auditing existing configurations and disabling unused features like nested virtualization, administrators effectively hardened their environments against this class of exploit. In the end, the response to the AMD KVM flaw served as a catalyst for improving transparency between cloud providers and their tenants regarding underlying hardware security. Moving forward, the focus remained on refining live-patching capabilities to ensure that critical updates were applied with minimal impact on service availability.
