Checking whether a KVM host is exposed to a guest-escape CVE
Five read-only checks show whether a KVM host is exposed to a guest-escape bug in nested virtualization, and whether its kernel carries the fix. Pulsed Media has run its shared seedboxes in KVM guests on Proxmox VE hosts since at least 2015. The same list applies to the next bug of this class.
Before you start
The host-side checks need root on the host. Checks 3 and 4 run inside a guest, so they cover guests the reader administers. A hosting provider can read a guest's CPU type from the host without entering the guest, with qm config on Proxmox or virsh dumpxml on libvirt.
Verdicts
A guest-escape bug of this kind is reachable only when all of these hold: the host runs the module the CVE names (check 1), nested virtualization is on (check 2), the guest CPU has the virtualization flag (check 3), and someone in the guest can start a nested guest (check 4). It matters only while the running kernel lacks the fix (check 5). If one of checks 1 to 4 fails, that path is closed.
| Result | Meaning |
|---|---|
| The CVE names a module the host does not run (check 1) | The CVE does not apply to this host |
nested is off (check 2) |
No guest can start a nested guest, so nested-virtualization bugs cannot be reached through any guest on this host |
nested is on, the guest CPU has no svm or vmx flag (check 3) |
That guest cannot start a nested guest |
Flag present, only root in the guest can open /dev/kvm (check 4) |
Reachable only from root inside that guest |
Flag present, a non-root user or group can open /dev/kvm, kernel unfixed (check 5) |
Exposed |
| Running kernel carries the fix (check 5) | Closed for this CVE |
A CVE in QEMU's device emulation, in a paravirtual device or in device passthrough has other preconditions. Read the component named in the CVE description, then use check 5 to confirm the fix.
Check 1: CPU vendor and KVM module
On the host:
lsmod | grep -E '^kvm_(amd|intel)'
grep -m1 vendor_id /proc/cpuinfo
kvm_amd is the AMD (SVM) module and kvm_intel the Intel (VMX) module. A nested-virtualization CVE can concern one vendor's module only, as CVE-2026-99312 does (nested SVM): its text states that INIT is an unconditional intercept on VMX, so a host on kvm_intel is outside it.
Check 2: Is nested virtualization on
Also on the host:
cat /sys/module/kvm_amd/parameters/nested # AMD: 1 = on, 0 = off
cat /sys/module/kvm_intel/parameters/nested # Intel: Y = on, N = off
The Linux kernel documentation says the option has been on by default since kernel 4.20 for both vendors, though a distribution can override it. The option is read-only while the module is loaded (module_param(nested, int, 0444) in arch/x86/kvm/svm/svm.c), so it cannot be switched live. KVM on AMD offers the SVM flag to guests only when the option is on (same file, if (nested) kvm_cpu_cap_set(X86_FEATURE_SVM)). The Intel source comment says that with nested=0 guests may not use VMX instructions.
Check 3: Does the guest get the virtualization flag
Inside the guest, this is the deciding test:
grep -m1 '^flags' /proc/cpuinfo | grep -o -w -E 'svm|vmx'
No output means the guest cannot start a nested guest. On a KVM host, a flag visible in a guest means the host's nested option is on.
From the host, qm config <vmid> | grep '^cpu' shows a Proxmox guest's CPU type, and the Proxmox documentation says type host gives the VM "exactly the same CPU flags as your host system". virsh dumpxml <domain> | grep -A3 '<cpu' shows a libvirt guest's mode, and host-passthrough means the CPU visible to the guest "should be exactly the same as the host CPU" (libvirt documentation). A named CPU model can expose the flag as well, so the guest test is the one that decides.
Check 4: Who can start a nested guest
A nested guest needs a hypervisor inside the guest and the privilege to use it. On a Linux guest that means access to /dev/kvm. Inside the guest:
ls -l /dev/kvm
getent group kvm
getfacl /dev/kvm
lsmod | grep -E '^kvm_(amd|intel)'
On Debian 13 the udev rule in systemd sets the device to group kvm, mode 0660 (50-udev-default.rules), so by default only root and members of that group can open it. A second rule (70-uaccess.rules) tags the device so that systemd-logind gives the user logged in at a local seat an ACL, which getfacl shows and group membership does not. Other distributions set their own mode, and a mode of 0666 lets every local user open the device, so the ls -l and getfacl output decides, not the rule. getfacl comes from the acl package. If /dev/kvm does not exist, the guest has no KVM device, typically because the module is not loaded, and root can still load it when the flag is present. A guest with another operating system and its own hypervisor, for example Windows with Hyper-V features, does not use /dev/kvm and is outside these commands.
Check 5: Does the running kernel carry the fix
On the host:
uname -r
dpkg -l 'proxmox-kernel-*' 'linux-image-*' | grep '^ii'
An installed kernel that is not the running kernel does not protect the host. Compare the uname -r output with the installed packages. The fix takes effect after a reboot into the fixed build.
To find the vendor's fixed build:
- The CVE record at cve.org lists the commit IDs of the fixes and the fixed versions on some upstream branches. For CVE-2026-99312 those are 6.12, 6.18, 7.3 and 7.4-rc2. For any other branch, use the vendor's tracker or package changelog.
- Distribution trackers list a fixed version per release, for example the Debian security tracker. Confirm in the installed package that its version is at or above the tracker's fixed version.
- A vendor that rebases onto another kernel, Proxmox for one, can ship a fix without naming the CVE.
To confirm that a named upstream fix is in a vendor build when the changelog does not name the CVE:
apt-get changelog <kernel-package> | grep -i -E 'nested|kvm'
Then match the fix on its patch subject line and its Fixes: trailer in the vendor's patch tree. Commit IDs differ between the mainline kernel and each stable branch, so a hash is a match only when it is one of the hashes the CVE record lists. The running kernel in uname -r must be the build that contains the patch, or a later one.
Turn nested virtualization off
This is the only step on this page that changes anything. It is defense in depth against the next nested-virtualization bug and does not replace the kernel update. On the host, as root, first look at what the file already holds:
cat /etc/modprobe.d/kvm-amd.conf # AMD host; kvm-intel.conf on an Intel host
If the file already sets nested, change that line. Otherwise append the option, which keeps any other option in the file:
echo "options kvm-amd nested=0" >> /etc/modprobe.d/kvm-amd.conf # AMD host
echo "options kvm-intel nested=0" >> /etc/modprobe.d/kvm-intel.conf # Intel host
kvm-amd and kvm_amd name the same module, because modprobe treats dash and underscore in module names as interchangeable (modprobe.d(5)). The setting takes effect when the module is reloaded or the host reboots. Reloading needs every virtual machine on the host stopped, because the module cannot be unloaded while a VM uses it. After the reload or reboot, check:
cat /sys/module/kvm_amd/parameters/nested # expect 0
Guests that run their own hypervisor can no longer start nested guests. An example is a Windows guest with Hyper-V features enabled. If no guest on the host needs that, set nested=0.
Worked example: CVE-2026-99312
Data as of 2026-11-20. CVE-2026-99312 was published on 2026-11-18 by the Linux kernel CNA. The record describes the fix "KVM: x86: Unconditionally reset MMU context when emulating INIT": emulating INIT while a nested guest runs with paging disabled leaves the first-level guest running on a stale MMU context. It affects nested SVM only. The record rates it CVSS 3.1 base score 8.8 (AV:L/AC:L/PR:L/UI:N/S:C), where PR:L means a low-privileged account in the guest suffices. It marks 6.1 as affected, along with 5.15.81 and 6.0.11 on their branches, and names 6.12.118, 6.18.64, 7.3.5 and 7.4-rc2 as the first unaffected versions of theirs. It gives no fixed version for the other branches.
In Proxmox the fix is patch 0119 of the pve-kernel repository, added in commit 440212e2 on 2026-11-16 and released in proxmox-kernel-7.0.14-30-pve. The patch header quotes c7c288d178cb, one of the commit IDs the CVE record lists, and the trailer Fixes: ed129ec9057f. The 7.0.14-30 changelog names no CVE. Its bullet reads "KVM: fix nested virtualization issues, also with SMM, that guests could use to bring KVM into an inconsistent state or to keep a host CPU busy, and add a missing speculation barrier for Hyper-V guests on Intel hosts." Its first bullet says the upstream stable changes go "up to v7.3.3 and v6.18.62", while the CVE's first fixed versions are 7.3.5 and 6.18.64. That headline reads as an unfixed kernel, but the fix is a separate cherry-pick, which the subject-line match in check 5 finds.
- Check 1: an AMD host (
kvm_amd) is in scope, an Intel host is not. - Check 2:
nestedreads 1 on an AMD host that never set the option. - Check 3: guests with CPU type
hostreceivesvm. - Check 5:
uname -rmust read 7.0.14-30-pve or later, or a fixed build from another vendor.
The record itself is at cve.org. The Debian tracker lists per-release status for the Debian kernel.
At Pulsed Media
Every shared seedbox at Pulsed Media runs inside a KVM virtual machine on a Proxmox VE host. After CVE-2026-99312 was published in November 2026, Pulsed Media checked its own hypervisors and updated the ones that needed it.
On a dedicated server with root access, the customer administers the whole machine, host included, so the host-side checks run there directly. Pulsed Media dedicated servers come with root access to the physical machine.
Troubleshooting
/sys/module/kvm_amddoes not exist- The module is not loaded, the host runs
kvm_intel, or the machine is itself a guest without the virtualization flag.
nestedstill reads 1 after the file was written- The module has not been reloaded since, or another configuration sets the option.
modprobe -c | grep -i nestedlists the options modprobe applies. Reboot, or stop every VM and reload the module.
modprobe -r kvm_amdreports the module is in use- A virtual machine is still running on the host.
- The guest shows
svmbutlsmodlists nokvm_amd - The guest has not loaded KVM. The flag is still exposed, and root in the guest can load the module.
- The changelog does not name the CVE
- This happens, as the worked example shows. Search the changelog for the component words, then match the patch subject line in the vendor's patch tree.
See also
- Proxmox VE — how Pulsed Media uses Proxmox as its hypervisor layer
- Dedicated server — Pulsed Media dedicated hardware with root access
- Pulsed Media — company overview