Skip to content
Fencer Vulns
high 7.4

CVE-2021-29657 json

arch/x86/kvm/svm/nested.c in the Linux kernel before 5.11.12 has a use-after-free in which an AMD KVM guest can bypass access control on ho…

published 2021-07-22 5 y ago modified 2026-06-17 4 mo ago also EUVD-2021-16131

cvss
7.4
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
0.4%
EPSS 0.4% chance of exploitation in 30 days, percentile 36%
public exploits
0
none known

Summary

arch/x86/kvm/svm/nested.c in the Linux kernel before 5.11.12 has a use-after-free in which an AMD KVM guest can bypass access control on host OS MSRs when there are nested guests, aka CID-a58d9166a756. This occurs because of a TOCTOU race condition associated with a VMCB12 double fetch in nested_svm_vmrun.

Patch / fix

  • linux linux_kernel 5.10.28, 5.11.12
  • linux Debian 14, Debian 13, Debian 12 5.10.28-1

debian advisories DEBIAN-CVE-2021-29657

  • linux-oem-5.10 Ubuntu 20.04 LTS 5.10.0-1025.26

ubuntu advisories UBUNTU-CVE-2021-29657

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • kernel RHEL 8 4.18.0-348.el8
  • perf RHEL 8 4.18.0-348.el8
  • bpftool RHEL 8 4.18.0-348.el8
  • kernel-core RHEL 8 4.18.0-348.el8
  • kernel-tools RHEL 8 4.18.0-348.el8
  • python3-perf RHEL 8 4.18.0-348.el8
  • kernel-modules RHEL 8 4.18.0-348.el8
  • kernel-zfcpdump RHEL 8 4.18.0-348.el8

red hat advisories RHSA-2021:4356

  • kernel CBL-Mariner 2.0 5.10.78.1-1

azure linux advisories AZL-6554

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

  • linux Arch Linux 5.11.12.arch1-1
  • linux-zen Arch Linux 5.11.12.arch1-1
  • linux-lts Arch Linux 5.10.28-1
  • linux-hardened Arch Linux 5.11.13.hardened1-1

arch linux advisories AVG-1764AVG-1766AVG-1767AVG-1797

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-29657 updated cvss 7.8

kernel: KVM: double fetch in nested_svm_vmrun can lead to unrestricted MSR access

  • Red Hat Enterprise Linux 8 kernel-rt, kernel-rt-kvm, kernel-rt-core, kernel-rt-modules, kernel-rt-debug-kvm, kernel-rt-debug-core, +6 more
    affected: workaround, no fix available “This vulnerability can be mitigated by disabling the nested virtualization feature: ``` # modprobe -r kvm_amd # modprobe kvm_amd nested=0 ```”
  • Red Hat CodeReady Linux Builder (v. 8) kernel-debuginfo-common-x86_64 4.18.0-348.el8, kernel-debuginfo-common-aarch64 4.18.0-348.el8, kernel-debuginfo-common-ppc64le 4.18.0-348.el8 Red Hat Enterprise Linux BaseOS (v. 8) perf 4.18.0-348.el8, kernel 4.18.0-348.el8, bpftool 4.18.0-348.el8, kernel-core 4.18.0-348.el8, kernel-tools 4.18.0-348.el8, python3-perf 4.18.0-348.el8, +15 more
    fixed: vendor fix “This vulnerability can be mitigated by disabling the nested virtualization feature: ``` # modprobe -r kvm_amd # modprobe kvm_amd nested=0 ```” RHSA-2021:4356
  • Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, kernel-alt, python-perf, +9 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +81 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

0.42% chance of exploitation in the next 30 days, higher than 36% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • bugs.chromium.org https://bugs.chromium.org/p/project-zero/issues/detail?id=2177 referenced PoC, tagged "exploit" by a source, unverified
  • cdn.kernel.org https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.11.12 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.1 7.4 CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 6.9 AV:L/AC:M/Au:N/C:C/I:C/A:C

Classification

Weakness
  • CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition
  • CWE-416 Use After Free
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.