CVE-2026-52959: Linux Kernel SEV-SNP Memory Corruption via Host-Controlled Buffer Size
A vulnerability in the Linux kernel's SEV-SNP guest implementation allows a malicious hypervisor to trigger memory corruption by manipulating buffer size information during certificate retrieval operations. When a guest requests an extended security report, the host can send back an error with a crafted buffer size that doesn't match the actual memory allocation. The kernel then uses this attacker-controlled size to deallocate memory incorrectly, potentially corrupting the page allocator and enabling further exploitation. This is a local privilege escalation vector available to any process running with sufficient privileges on an affected guest system.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.8 HIGH · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- —
- Affected products
- 7 configuration(s)
- Published / Modified
- 2026-06-24 / 2026-07-14
NVD description (verbatim)
In the Linux kernel, the following vulnerability has been resolved: virt: sev-guest: Do not use host-controlled page order in cleanup path When issuing an extended guest request (SVM_VMGEXIT_EXT_GUEST_REQUEST), get_ext_report() allocates a buffer to retrieve a certificate blob from the host, keeping track of its size in report_req->certs_len. However, the host may return SNP_GUEST_VMM_ERR_INVALID_LEN, indicating an invalid buffer size, as well as the expected length of such buffer. get_ext_report() subsequently updates report_req->certs_len with the host-controlled value, and cleans up the buffer by computing a page order from such value. This is incorrect, as the host-provided length may not match the page order of the original allocation, potentially resulting in corruption in the page allocator. Fix this by using alloc_pages_exact() instead, and reusing @npages to compute the size passed to free_pages_exact(). For consistency, also use @npages to compute the size when allocating the pages, even though this last change has no functional effect.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-52959 affects the get_ext_report() function in the SEV-SNP guest code (virt/sev-guest). During extended guest request processing (SVM_VMGEXIT_EXT_GUEST_REQUEST), the function allocates memory via alloc_pages() to hold a certificate blob. When the host returns SNP_GUEST_VMM_ERR_INVALID_LEN, it provides both an error code and the required buffer size in report_req->certs_len. The vulnerable code accepts this host-controlled length value and subsequently computes a page order from it to deallocate memory using free_pages(). Since the page order derived from an arbitrary host-provided length may not correspond to the original allocation order, this causes incorrect deallocation and page allocator corruption. The fix replaces alloc_pages() and free_pages() with alloc_pages_exact() and free_pages_exact(), which manage arbitrary byte counts rather than page orders, eliminating the mismatch between allocation and deallocation.
Business impact
This vulnerability poses a HIGH severity risk to organizations running AMD SEV-SNP encrypted VMs with multi-tenant or untrusted hypervisor scenarios. An attacker controlling the hypervisor can corrupt guest kernel memory, potentially escalating privileges, reading sensitive data from other guests, or destabilizing the system. For cloud providers and enterprises using confidential computing, this undermines the security guarantees that SEV-SNP is meant to provide. Patching is critical for environments where guests are protected against hypervisor attacks.
Affected systems
The Linux kernel is affected across multiple versions. This vulnerability is specific to systems with AMD SEV-SNP (Secure Encrypted Virtualization - Secure Nested Paging) capability enabled. Affected systems include guest kernels running on SEV-SNP-capable AMD EPYC processors (Naples, Rome, Milan, Genoa generations and later). Non-SEV-SNP systems and guests running on other CPU architectures or hypervisors without SEV-SNP support are not affected. The vulnerability requires the guest kernel to be running and for the extended guest request mechanism to be invoked, typically through attestation or certificate retrieval workflows.
Exploitability
Exploitation requires LOCAL access to the guest system with elevated privileges (the CVSS vector PR:L indicates a privileged attacker). The attacker must be able to trigger get_ext_report() execution, typically through the sev-guest device interface or attestation workflows. A more direct attack vector exists if the attacker controls the hypervisor itself, in which case they can craft malicious responses to VMGEXIT calls. The vulnerability is not remotely exploitable and does not require user interaction. Successful exploitation leads to kernel memory corruption with HIGH impact on confidentiality, integrity, and availability.
Remediation
Apply the kernel patch that replaces the vulnerable alloc_pages()/free_pages() pattern with alloc_pages_exact()/free_pages_exact(). This ensures memory deallocation uses the original allocation size tracked in @npages rather than a size derived from host-controlled data. Verify that your kernel version includes the fix by checking git commit history or vendor release notes. For immediate containment, restrict unprivileged access to the sev-guest device and limit guest-to-hypervisor attestation operations to trusted scenarios.
Patch guidance
Upgrade the Linux kernel to a version that includes the fix for CVE-2026-52959. The patch introduces alloc_pages_exact() and free_pages_exact() calls, along with consistent use of the @npages variable for size calculations. Verify the exact fixed kernel version against your Linux distribution's security advisories (Ubuntu, Red Hat, SUSE, Debian, etc.), as patch availability and version numbers vary by vendor. Test the patched kernel in your SEV-SNP environment before production deployment to confirm compatibility with your attestation workflows.
Detection guidance
Monitor for kernel memory corruption symptoms: page allocator errors, BUG_ON() triggers in mm/page_alloc.c, or unexpected kernel panics with traces involving sev-guest or get_ext_report(). Kernel logs and dmesg output may show warnings like 'bad page state' or 'memory corruption detected.' Use audit logs to track sev-guest device access (/dev/sev-guest or /dev/sev-guest-[instance]) and extended guest request (ioctl) invocations. For forensics, capture kernel panic dumps and memory corruption BUG traces. Note that exploitation may be difficult to distinguish from unrelated kernel bugs, so prioritize patching over detection.
Why prioritize this
This is a HIGH-severity local privilege escalation vulnerability affecting the SEV-SNP confidential computing feature. It is not yet in CISA's KEV catalog, but it undermines the memory safety guarantees of the Linux kernel in a sensitive security-critical context. Organizations using SEV-SNP for confidential workloads, particularly in multi-tenant cloud environments, should prioritize patching immediately. The vulnerability requires privileged local access and is not widely exploited in the wild, but the impact potential is severe enough to warrant urgent action for affected deployments.
Risk score, explained
The CVSS 3.1 score of 7.8 (HIGH) reflects: Attack Vector Local (AV:L) — requires local system access; Attack Complexity Low (AC:L) — no special conditions needed; Privileges Required Low (PR:L) — an elevated but not root-level privilege is sufficient; User Interaction None (UI:N) — attack is automatic; Scope Unchanged (S:U) — impact limited to the guest; Confidentiality High (C:H), Integrity High (I:H), Availability High (A:H) — full compromise of kernel memory. The score appropriately penalizes the local-only nature but reflects the severe impact of successful exploitation on system security and data protection in SEV-SNP environments.
Frequently asked questions
Does this affect systems not using AMD SEV-SNP?
No. This vulnerability is specific to the SEV-SNP guest implementation in the kernel. Systems without SEV-SNP capability or using other virtualization platforms (KVM without SNP, Xen, Hyper-V, etc.) are not affected. The vulnerable code path only executes during SEV-SNP extended guest request operations.
Can this be exploited remotely or without administrative access?
No on both counts. The vulnerability requires LOCAL access to the guest system and ELEVATED PRIVILEGES to interact with the sev-guest device or attestation interface. Remote attackers cannot trigger this vulnerability. However, a malicious hypervisor can exploit it directly by crafting a malicious response to a guest VMGEXIT request.
How does this compare to other SEV-SNP vulnerabilities?
This vulnerability is distinct from SEV-SNP host-side vulns or attestation bypass issues. It is a kernel memory safety bug specific to buffer size handling in extended report requests. Unlike some SEV-SNP vulns that compromise attestation integrity, this one impacts kernel stability and privilege escalation within the guest.
What immediate mitigation steps should we take before patching?
Restrict unprivileged user access to the sev-guest device (typically via udev rules or SELinux/AppArmor policies). Minimize use of extended guest requests and attestation operations to trusted, necessary workflows. Run guests on trusted, regularly patched hypervisors. Monitor for kernel crashes and page allocator errors in dmesg. However, these are temporary measures; kernel patching is the definitive remediation.
This analysis is provided for informational purposes to assist security professionals in vulnerability assessment and remediation planning. The information is based on the CVE description, CVSS metrics, and vendor advisories as of the publication date. Patch availability, affected versions, and remediation timelines are subject to change and should be verified against official Linux distribution security advisories (Red Hat, Ubuntu, Debian, SUSE, etc.) before implementation. SEC.co does not warrant the completeness or accuracy of third-party vulnerability data and recommends consulting official vendor documentation for definitive remediation guidance. No exploit code or weaponized proof-of-concept information is provided herein. Source: NVD (public-domain), retrieved 2026-07-30. Analysis generated by SEC.co (claude-haiku-4-5).
Affected vendors
Related vulnerabilities
- CVE-2026-0270HIGHCortex XSOAR Path Traversal on Linux — Exploit Requirements & Patching Guide
- CVE-2026-0271HIGHPalo Alto Networks Prisma Access Agent Linux Privilege Escalation
- CVE-2026-10001HIGHChrome Sandbox Escape via PerformanceManager Use-After-Free
- CVE-2026-10002HIGHGoogle Chrome PDFium Use-After-Free Vulnerability (CVSS 8.8)
- CVE-2026-10003HIGHChrome Use-After-Free Code Execution Vulnerability Analysis
- CVE-2026-10006HIGHChrome WebAudio Race Condition Remote Code Execution
- CVE-2026-10007HIGHChrome Use-After-Free in SVG Arbitrary Code Execution (CVSS 8.8)
- CVE-2026-10009HIGHChrome Skia Integer Overflow Sandbox Escape – Patch Guidance