CVE-2026-139801: Linux kernel KVM on AMD restores L1 state from guest-writable SMRAM on RSM without validating it

ByLinuxtastic

December 3, 2026 #CVE, #Linux Kernel

KVM on AMD hosts supports nested virtualisation, where a guest (L1) runs its own guests (L2). When L1 is in System Management Mode and executes RSM to resume into L2, KVM rebuilds L1’s control block from the copy it stashed in SMRAM. The kernel CNA record says that on that path KVM must “validate L1’s state after copying it back into vmcb01 from SMRAM, as SMRAM is carved out of guest memory, i.e. is writable by the guest. Failure to validate L1’s state is especially problematic for inputs to MMU context, as KVM can end up with impossible CR4 vs. EFER state”, and shows a UBSAN array-index-out-of-bounds in paging_tmpl.h triggered from a QEMU guest. The fix validates the restored save area and fails the RSM if it is invalid. The CNA and Red Hat score it 7.3 as a local, low-privilege flaw with changed scope. On AMD hypervisors that expose nested SVM to guests, upgrade to 5.15.226, 6.1.193, 6.6.163, 6.12.119, 6.18.65, 7.3.6 or later, or set kvm_amd nested=0 where nesting is not needed.

CVE-2026-139801 at a glance.

ComponentLinux kernel, KVM nested SVM (arch/x86/kvm/svm/nested.c, svm.c, svm.h): svm_leave_smm() restoring vmcb01 from SMRAM; new helper nested_svm_check_vmcb01_save()
Affected versionsfrom 37be407b2ce8 (“KVM: nSVM: Fix L1 state corruption upon return from SMM”): 5.14 up to 5.15 before 5.15.226, 6.1 before 6.1.193, 6.6 before 6.6.163, 6.12 before 6.12.119, 6.18 before 6.18.65, 7.3 before 7.3.6 and 7.4 before 7.4-rc2
Fixed inmainline 7.4-rc2 (commit 05362153, Sean Christopherson, authored 21 October 2026, taken by Paolo Bonzini; three files, +20/−7) and stable 5.15.226, 6.1.193, 6.6.163, 6.12.119, 6.18.65, 7.3.6. The change factors the CR0/EFLAGS/EFER sanity checks plus nested_vmcb_check_save() into nested_svm_check_vmcb01_save(), calls it from svm_set_nested_state() instead of the inline copy, and calls it in svm_leave_smm() after the SMRAM copy, returning failure when the state is invalid. Fixes 37be407b2ce8; Cc stable; reported by Bill Wendling and Stefan Teodorescu
SeverityKernel CNA CVSS 3.1 7.3 (AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H); NVD has the record with an empty metrics block; Red Hat Important, 7.3 on the same vector (draft, CWE-125), bug 2587011 “Denial of service via missing state validation in KVM nested SVM”; Ubuntu not consulted (its page refused the automated reader)
Exploited in the wildNot on the CISA KEV catalogue (2026.11.30). EPSS has no entry yet for this CVE (checked 1 December 2026)
Who is exposedAn AMD host running KVM with nested virtualisation enabled (kvm_amd parameter nested=1, the default on current kernels) whose guests are not trusted: code with control of a guest’s SMRAM, which is the guest firmware or a guest kernel, can hand KVM an impossible state and crash the host or, per the vector, affect integrity across the boundary. Red Hat: systems without nested virtualisation, or where it is not exposed to untrusted guests, are not vulnerable
PublishedCVE record 30 November 2026 (kernel CNA); this page built 2 December 2026, last updated 2 December 2026

What it is

System Management Mode saves the processor state to SMRAM on entry and restores it on RSM. Under KVM, a guest’s SMRAM is just a region of that guest’s memory, which means the guest can edit the saved state before executing RSM. KVM already knows this for ordinary registers, but when the guest is a nested hypervisor returning into one of its L2 guests, KVM also has to rebuild L1’s own control block, vmcb01, from a copy saved in SMRAM, and it is that copy the fixed code did not check.

The record points at the consequence that matters: the restored CR4 and EFER feed the MMU context, and a pair that real hardware would never allow (the record’s example produced a page-table walker index of 3 in an array of 2) leaves KVM’s shadow paging code in a state its own tables do not describe. On kernels without the recent hardening of walk_addr_generic() that is an out-of-bounds array access in paging_tmpl.h; on hardened kernels it is still an invariant the rest of KVM relies on. The attacker needs to be inside a guest with nested SVM enabled, which is why the vector is local with low privileges and a changed scope: the guest acts, the host suffers.

Sean Christopherson’s fix, authored on 21 October 2026 with a stable tag and reports from Bill Wendling and Stefan Teodorescu, introduces nested_svm_check_vmcb01_save(), which performs the CR0, EFLAGS and EFER checks and then nested_vmcb_check_save(); svm_set_nested_state(), the migration path, already did those checks inline and now calls the helper, and svm_leave_smm() calls it after copying the save area back and fails the RSM on an invalid result. Twenty lines in, seven out, across nested.c, svm.c and svm.h; Paolo Bonzini took it for 7.4-rc2.

Who is affected on Linux

Each row is what the distribution’s own security tracker said on 2 December 2026; the link in the row is the tracker page, which will be newer than this one. Every distribution kernel builds KVM for AMD with nesting available; the exposure is a policy question on each hypervisor, which is why the per-product rows mostly say affected.

DistributionStatusFixed package
AlpineNot consulted for this page: the Alpine tracker refused the automated reader on 2 December 2026—
Debianbookworm (6.1.176-1, security 6.1.192-3) vulnerable; trixie (6.12.117-1, security 6.12.118-1) vulnerable; fixed in forky and sid (7.3.6-1); no DSAunstable 7.3.6-1
UbuntuNot consulted for this page: ubuntu.com refused the automated reader on 2 December 2026 (the bulk list on run 18 onward and this page twice); the Ubuntu priority is not stated here—
RHEL, Rocky, Alma, CentOS StreamImportant, 7.3 (bug 2587011, CWE-125); kernel affected in RHEL 8, 9 and 10 and kernel-rt in RHEL 9; RHEL 8 kernel-rt fix deferred; the OpenShift 4/5 RHCOS images affected; RHEL 6 and 7 not affected; no errata on 2 December 2026—
openSUSE/SLENot consulted: suse.com refused the automated reader on 2 December 2026 (client error)—
Fedora, Arch; self-built kernelsNot consulted; upstream stable versions apply5.15.226 / 6.1.193 / 6.6.163 / 6.12.119 / 6.18.65 / 7.3.6 or later

How to check

Three questions settle a hypervisor: is it an AMD host with KVM loaded, is nested virtualisation enabled, and are any of the guests that could use it untrusted. The kernel version decides whether the check is already there.

# 1. AMD host with KVM's SVM backend loaded
grep -m1 -oE '\bsvm\b' /proc/cpuinfo; lsmod | grep -E '^kvm_amd '

# 2. is nesting enabled (1 or Y = guests may run their own guests)
cat /sys/module/kvm_amd/parameters/nested

# 3. the running kernel: affected from 5.14; fixed in 5.15.226, 6.1.193, 6.6.163, 6.12.119, 6.18.65, 7.3.6 or later
uname -r

# 4. which guests actually have the feature exposed (libvirt: look for svm in the guest CPU model)
virsh list --name 2>/dev/null | while read d; do [ -n "$d" ] && virsh dumpxml "$d" | grep -q "feature.*name='svm'" && echo "nested exposed: $d"; done

An Intel host, or an AMD host with nested reading 0 or N, cannot reach the path and the page does not apply. An AMD host on an affected kernel with nesting enabled is exposed to any guest that has svm in its CPU model and whose firmware or kernel is not under the operator’s control, which on a multi-tenant cloud node is every guest; on a lab box running only one’s own nested test VMs it is a bug to patch at leisure.

How to fix it

Update the hypervisor kernel and reboot, or live-migrate guests away first. Where nesting is not needed, turning it off at the module level removes the path entirely and is a reasonable permanent setting on hosts that only run ordinary guests.

# Debian forky / sid (7.3.6-1 carries the fix); trixie and bookworm: watch the tracker row above
apt update && apt install linux-image-amd64 && systemctl reboot
# RHEL / Rocky / Alma: no errata yet on 2 December 2026; when the advisory lands
dnf update kernel && systemctl reboot
# Ubuntu: no USN yet; once the linux package is released
apt update && apt install linux-generic && systemctl reboot
# Interim or permanent where nesting is not needed: disable nested SVM
echo 'options kvm_amd nested=0' > /etc/modprobe.d/kvm-amd-nonested.conf
# takes effect after the module is reloaded (all guests stopped) or at the next boot
modprobe -r kvm_amd && modprobe kvm_amd

Disabling nesting is a clean mitigation because the vulnerable RSM path only exists for a guest acting as a hypervisor; guests that need to run their own VMs (Windows with virtualisation-based security switched on, for instance) will lose that ability, so check before applying it fleet-wide. What not to do: do not remove smm support from guests as a substitute; the record is about what KVM accepts on return from SMM, and taking SMM away from a guest’s firmware has its own consequences.

Sources

  • CVE-2026-139801 at CVE.org — the kernel CNA record: the “SMRAM is carved out of guest memory, i.e. is writable by the guest” sentence, the CR4-versus-EFER note, the UBSAN trace, the 5.14 lower bound and the git ranges (30 November 2026)
  • Fix commit 05362153 (mainline, 7.4-rc2; Sean Christopherson, 21 October 2026; nested.c, svm.c, svm.h +20/−7; Fixes 37be407b2ce8, Cc stable, Reported-by Bill Wendling and Stefan Teodorescu, Tested-by Stefan Teodorescu, Signed-off-by Paolo Bonzini) and the six stable backports in the record (read as the GitHub patch view on 2 December 2026; git.kernel.org refuses automated readers)
  • NVD entry — Received on 30 November 2026 with an empty metrics block on 2 December 2026; the CNA’s 7.3 is the score on cve.org
  • Distribution trackers: Debian (bookworm and trixie vulnerable, forky and sid fixed in 7.3.6-1) · Ubuntu (refused the automated reader on 2 December 2026) · Red Hat (Important 7.3, bug 2587011, CWE-125, RHEL 8/9/10 affected, RHEL 8 kernel-rt fix deferred) · SUSE and Alpine (both refused the automated reader on 2 December 2026)
  • CISA KEV catalogue 2026.11.30, not listed · EPSS no entry on 1 December 2026

Related reading

This advisory page was assembled from the primary sources listed above on 2 December 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.