> ## Documentation Index
> Fetch the complete documentation index at: https://blog.onetsolutions.net/llms.txt
> Use this file to discover all available pages before exploring further.

# KVM AMD nested (CVE-2026-99312): From a Guest VM to Host Memory

> KVM AMD nested flaw CVE-2026-99312: root in a guest VM can read and write AMD host memory. Who is exposed, fixed kernels, and how to disable nested KVM.

*Published on November 29, 2026*

> [!WARNING]
>
> **CVE-2026-99312 "KVM AMD nested" — Linux kernel, KVM hypervisor on AMD processors.** On an AMD KVM host with nested virtualization enabled, a root user inside a guest VM can, according to Red Hat, read and write host memory. The fix belongs on the hypervisor, not in the VMs. If you run KVM, Proxmox VE or libvirt on an AMD server that hosts untrusted VMs, install the fixed kernel or turn nested virtualization off.

## The bug in two sentences

When KVM emulates an INIT signal, it does not always reset the virtual CPU's MMU context. If the INIT arrives while a nested guest (L2) runs with paging disabled, KVM resumes the first-level guest (L1) with a stale context that points to a page table already freed.

Red Hat describes the result as a use-after-free of the nested page table (NPT) pointer: a freed and reallocated page lets the guest forge page table entries and reach host memory. DigitalOcean, which received the report from Oren Yomtov (Terra Security), says the team read about 127 GB of a host's memory, and wrote 32 bytes into a kernel page on an AMD bare-metal server with no other customers.

Only SVM, AMD's virtualization, is affected: on Intel (VMX), INIT is always intercepted and cannot be emulated while a nested guest is running.

Affected versions:

* **Linux kernels since 6.1**, plus the 5.15 branch from 5.15.81 and the 6.0 branch from 6.0.11;
* fixed upstream by commit `c7c288d178cb` (7.4-rc2), and in stable branches **5.15.226, 6.1.193, 6.6.163, 6.12.118, 6.18.64, and 7.3.5**.

According to DigitalOcean, the bug had been there for almost four years: the 2022 fix for CVE-2022-3344 did not cover it.

The NVD record carries the CVSS 3.1 score of **8.8** (`AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`) assigned by kernel.org, which Ubuntu also uses, with high priority. Red Hat scores it 7.8, with high attack complexity.

> [!NOTE]
>
> As of November 29, 2026, neither NVD, Red Hat, Debian nor Ubuntu references public exploit code. DigitalOcean says the exploit was validated internally with the researcher, and does not report any exploitation by attackers.

## Sizing your exposure

The question to ask: **do you run a KVM hypervisor on an AMD processor, with nested virtualization enabled, for VMs you do not fully control?** The attacker must be root inside a guest VM. Red Hat notes that Intel KVM hosts and AMD hosts without nested virtualization are not affected.

| Profile | Exposure | Action |
| - | - | - |
| AMD server running KVM, Proxmox VE or libvirt, `nested` set to `1`, third-party or untrusted VMs | **High**: root in a VM can reach the memory of the host and of other VMs | Fixed kernel and reboot, or `nested=0` in the meantime |
| AMD server running KVM, `nested` set to `1`, all VMs are yours | Moderate: a compromised VM becomes a door to the host | Update soon |
| VPS that is itself a hypervisor (KVM inside the VPS) for untrusted VMs | High if its `kvm_amd` has `nested` set to `1`: the VPS kernel is the host of those VMs | Fixed kernel in the VPS, or `nested=0` if your VMs need no nesting |
| AMD server running KVM, `nested` set to `0` | Not exposed, per Red Hat | Update the kernel in your next cycle |
| KVM host on an Intel processor | Not affected, per Red Hat and the fix description | Nothing to do |
| Guest VPS that runs no VMs | The fix is the hypervisor's job, not your VM's | Nothing to do in the VM for this flaw |

To check whether a server is an AMD KVM host with nested virtualization on:

```bash theme={null}
# AMD KVM module loaded: a kvm_amd line means the host uses SVM
lsmod | grep kvm_amd

# Nested virtualization: 1 = enabled, 0 = disabled
cat /sys/module/kvm_amd/parameters/nested

# Version of the loaded kernel
uname -r
```

If `lsmod` prints nothing, the `kvm_amd` module is not loaded: the machine runs no KVM guests on AMD. On distribution kernels, trust the tables below rather than the version number alone: fixes are backported.

## Updating the host kernel, distro by distro

The fix is a kernel update on the hypervisor, followed by a **reboot**. Until the host reboots, the old kernel stays loaded. Shut down or migrate the VMs before rebooting.

### Debian

| Version | Fixed package | Advisory |
| - | - | - |
| Debian 13 (trixie) | `linux` `6.12.118-1` or later | DSA-6652-1 |
| Debian 12 (bookworm) | Fix not released (`6.1.192-3` still vulnerable) | — |

As of November 29, 2026, the Debian tracker marks bookworm as vulnerable. Apply the mitigation below in the meantime, and follow [Debian's CVE page](https://security-tracker.debian.org/tracker/CVE-2026-99312).

```bash theme={null}
# Debian: install the fixed kernel, then reboot
sudo apt update
sudo apt full-upgrade
sudo reboot

# After the reboot: the package version is shown in the output
uname -v
```

### Ubuntu

| Version | Package | Status as of November 29, 2026 |
| - | - | - |
| Ubuntu 26.10 | `linux` | Fix in progress (`7.3.0-12.13`) |
| Ubuntu 26.04 LTS | `linux` and variants | Fix needed, not released |
| Ubuntu 24.04 LTS | `linux`, `linux-hwe-7.0` and variants | Fix needed, not released |
| Ubuntu 22.04 LTS | `linux`, `linux-hwe-6.8` and variants | Fix needed, not released |
| Ubuntu 20.04 LTS | `linux`: not affected; `linux-hwe-5.15`: vulnerable | Fix needed for the HWE kernel |

Ubuntu has not published a USN for this CVE yet. Follow [Ubuntu's CVE page](https://ubuntu.com/security/CVE-2026-99312) and apply the mitigation below in the meantime.

Once the package is out:

```bash theme={null}
# Ubuntu: install the fixed kernel, then reboot
sudo apt update
sudo apt full-upgrade
sudo reboot

# After the reboot: version of the loaded kernel
uname -r
```

### RHEL, AlmaLinux, Rocky Linux

As of November 29, 2026, [Red Hat's CVE page](https://access.redhat.com/security/cve/CVE-2026-99312) lists no RHSA. Red Hat provides the mitigation below. Once a fixed kernel is released for your distribution:

```bash theme={null}
# RHEL, AlmaLinux, Rocky Linux: install the fixed kernel, then reboot
sudo dnf clean metadata && sudo dnf upgrade
sudo reboot

# After the reboot: loaded kernel and installed kernels
uname -r
rpm -q kernel
```

### Proxmox VE

Proxmox VE ships its own kernel. No Proxmox source we checked lists a fixed version for this CVE yet: follow Proxmox's security announcements, and apply the mitigation below on every AMD node in the meantime.

## Mitigation until the fix lands

Red Hat and DigitalOcean give the same mitigation: **turn off nested virtualization** in the `kvm_amd` module. It closes the attack path on every distribution, including Debian 12, Ubuntu and RHEL, which have no fixed kernel yet.

The module cannot be reloaded while VMs are running: **shut down every VM on the host** first.

```bash theme={null}
# Check that no VM is still running
sudo virsh list            # libvirt
sudo qm list               # Proxmox VE: no VM in "running" state

# Reload kvm_amd without nested virtualization
sudo modprobe -r kvm_amd
sudo modprobe kvm_amd nested=0

# Keep the setting across reboots
echo "options kvm_amd nested=0" | sudo tee /etc/modprobe.d/kvm-nested-disable.conf
```

Then start the VMs again.

Its limits:

* VMs that run VMs of their own lose that ability while the setting is in place;
* it does not replace the host kernel update.

> [!TIP]
>
> On a production host, take a [snapshot](https://help.onetsolutions.net/vps/snapshot) of your VMs before the change. If a VPS acting as a hypervisor does not come back on the network after the reboot, the [KVM console](https://help.onetsolutions.net/vps/kvm-console) gives you the boot screen.

## Checking the mitigation

```bash theme={null}
# Nested virtualization off: 0 expected
cat /sys/module/kvm_amd/parameters/nested

# Persistent setting in place
cat /etc/modprobe.d/kvm-nested-disable.conf
```

The first command must print `0`, the second `options kvm_amd nested=0`.

The check that matters is still the kernel: after the reboot, `uname -v` (Debian) or `uname -r` (Ubuntu, RHEL, AlmaLinux) must show a version equal to or later than the ones in the tables.

## Rolling back the mitigation

Once the fixed kernel is loaded, you can bring nested virtualization back if your VMs need it. Shut down every VM on the host again.

```bash theme={null}
# Remove the persistent setting and reload the module with its default parameters
sudo rm /etc/modprobe.d/kvm-nested-disable.conf
sudo modprobe -r kvm_amd
sudo modprobe kvm_amd

# Check: 1 expected
cat /sys/module/kvm_amd/parameters/nested
```

If none of your VMs uses nested virtualization, keep `nested=0`: it is one less attack surface.

## What next?

Turning off nested virtualization is only a stopgap: the target is the fixed kernel, loaded on the host after a reboot. For another recent kernel flaw, read [userfaultfd (CVE-2026-99580)](https://blog.onetsolutions.net/en/userfaultfd-cve-2026-99580.md); also turn on [automatic security updates](https://blog.onetsolutions.net/en/automatic-security-updates-linux-vps.md). For any technical question, open a ticket from your [OnetSolutions customer area](https://help.onetsolutions.net/console/support).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.