KVM AMD Vulnerability with nested virtualization allows you to read host memory; patch applied

Author: Published 6 min de lectura 14 reading

The images in this article were generated with artificial intelligence. How we publish

A vulnerability in KVM, the hyperviewer integrated into the Linux kernel, allowed researchers to read large portions of the physical memory of the host server from within a virtual machine of their own hosted in a shared cloud service. Done confirmed: the failure was reported by a Terra Security researcher through the supplier's reward program, affected hosts with AMD processors and with nested virtualization activated, and a correction reached the kernel tree before the investigation became public.

From the technical point of view, the problem is an inconsistency in the management of the state of the nested virtualization when a reboot signal is issued from the second layer (INIT). KVM maintains, for each vCPU, points to the structures that translate addresses of nested guests (nested page tables). Done confirmed: After an INIT the implementation in AMD did not restore one of those points and was pointed to a memory page already released by the host's kernel. If the kernel reused that page, a privileged-controlled host within its own VM could fill it with forged inputs and convince the processor to resolve translations to unauthorized host physical pages.

KVM AMD Vulnerability with nested virtualization allows you to read host memory; patch applied
Image generated with IA.

In the experiments released, the first reading returned the host's kernel version header and then about 127 GB of mapped memory in reading mode; in a second writing test - carried out in bare- metal hardware controlled by the researchers - the host managed to write 32 bytes on a live page of the host kernel and a witness module loaded in that kernel confirmed the change. Done confirmed: Both trials started from a root context within the VM; therefore, an attacker would need that same level of access to a VM in a vulnerable host to exploit the failure (network access is not enough).

Who does this affect? Done confirmed: only KVM hosts that use AMD CPUs and have the nested virtualization activated. The instances hosted at Intel hosts are not affected by the vulnerable code, because the error exists only in the implementation for AMD. Many cloud suppliers, according to research, do not activate nested by default in their AMD, so they are not vulnerable in practice. DigitalOcean, the supplier where the explosion was tested, confirmed the validity of the attack in its infrastructure, treated the incidence as critical and applied a live patch to its fleet; for its customers Droplet reported that no action was necessary.

Actual consequences: In shared hosts a guest engaged with root privileges could read large portions of the host's memory, potentially accessing data from other VMs (confidentiality) or, in specific environments, modify memory if the environment allows; in the tests, the reading was possible and the writing was demonstrated in hardware controlled by the researchers. For now there is no public evidence that this vulnerability has been exploited outside the laboratory and no operating code has been published.

The failure also has an interesting traceability: it was introduced as a result of an earlier correction (CVE-2022-3344) that changed a reboot path, but omitted to restore the pointer of the page table. Done confirmed: that change was present from 2022 and was maintained until the recent correction, which illustrates how patches intended to close gaps can introduce side effects if the complete state to be restored is not reviewed.

On gravity, the valuations differ. Done confirmed: The kernel's CVE team gave a score of 8.8 / 10 with high impact on confidentiality, integrity and availability; Red Hat, in a preliminary evaluation, described it as Moderate (5.6) and interpreted it as a denial of service impact. This discrepancy shows that the practical scope - mass memory reading vs possibility of modification in multi-variable hosts - can be evaluated differently according to operational assumptions.

Specific and verifiable measures to be taken by different audiences:

For cloud operators and KVM host administrators with AMD CPUs: apply the correction in the host kernel and restart the system for the new kernel to be active. The correction was integrated into the stable trees of the kernel: for example, the patches were included in the stable branches cited by the maintainers (stable 7.3.5 and long-term 6.18.64 and 6.12.118). As long as a corrected kernel is not installed and activated, the alternative mitigation is to deactivate the nested virtualization by adding the option of the kvm _ amd nested module = 0 and by reinitiating the host (or configuring it in / etc / modprobe.d / and then reinitiating). To check the status: cat / sys / module / kvm _ amd / parameters / nested returns 1 or Y if it is activated; uname -r confirms the running kernel version.

For tenants in public clouds: if your supplier has announced an applicable mitigation without customer actions (e.g. live patches or planned reboot), follow their official communications. Done confirmed: DigitalOcean reported that it applied a live patch and reported "No action needed" to its Droplet customers; yet, if you depend on instances that in turn run VMs (nested cases), it explicitly asks about the state of nested virtualization and for integrity tests after updates.

For operators who cannot update immediately: disable nested closes the complete operating route described, but prevents the execution of virtual machines within VMs, so the change must be coordinated with users who depend on that capacity. Remember that disable the parameter does not take effect as long as virtual machines are in place, using that function; it requires reboot of the platform or controlled load migration.

KVM AMD Vulnerability with nested virtualization allows you to read host memory; patch applied
Image generated with IA.

What remains uncertain: There are no public reports of malicious use in production environments to date, and there is no publicly available operating code to allow for a certain detection of whether a host was previously a victim. Nor is there yet a reliable method to audit retrospectively if someone exploded the condition before the patch; this forces you to consider the possibility of exposure if your host was in the time range between the introduction of the bug and the correction, and to conduct forensic reviews when feasible.

Additional context: this vulnerability is part of a series of KVM isolation failures and kernel components reported in the last year, which underlines the need for patching practices and platform design that reduce the attack surface (e.g., disable unnecessary functionalities in multi-tilient environments). You can consult documentation about KVM and nested virtualization on the official kernel pages to better understand the mechanisms involved: KVM documentation at kernel. For tracking of ads and patch status in distributions, the security trackers of the distributions and the supplier's own security portal are primary sources; for example, check the supplier's security page if you are a customer: Digital and the Debian security tracker to see the status in distributions: Debian Security Tracker.

Abstract: the real risk exists if you have AMD hosts with nested enabled and not up-to-date; the final mitigation is to update the host kernel and restart, or disable the nested virtualization until it can be patched. For customers in public clouds, consult the supplier's communications; for own operators, prioritize patch application and reboot coordination, and prepare forensic audits where there are grounds to suspect prior exposure.

Coverage

Related

More news on the same subject.