Skip to main content
Meet us at Black Hat USA 2026— Las Vegas, August 1–6Book a Meeting
Mallory
High

Linux kernel crypto: ccp PEK CSR userspace copy out-of-bounds read

IdentifiersCVE-2026-31699CWE-125

CVE-2026-31699 is a Linux kernel vulnerability in the crypto/ccp subsystem, specifically in the AMD SEV PEK CSR retrieval path handled by sev_ioctl_do_pek_csr() in drivers/crypto/ccp/sev-dev.c. When retrieving the PEK CSR, the kernel could still attempt to copy the CSR blob to userspace even if the underlying PSP firmware command failed. In the failure case where the userspace-supplied buffer length was too small, the firmware path could update the length field to the size required by firmware, while the kernel buffer had only been allocated using the original smaller user-supplied length. A subsequent copy_to_user of the firmware-required size could therefore read past the end of the kernel-allocated slab buffer, producing a slab out-of-bounds read and leaking kernel memory to userspace. The fix prevents copying the CSR blob to userspace when the PSP command fails and adds a warning for inconsistent success reporting between the driver and firmware error code.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can cause an out-of-bounds read from kernel memory during copy_to_user, disclosing adjacent kernel slab contents to userspace. Based on the provided context, the primary security consequence is information disclosure of kernel memory; the bug is also detectable as a KASAN slab-out-of-bounds read in the affected ioctl path. The supplied scoring context also indicates potential availability impact from the fault condition, but the explicitly described and demonstrated effect is kernel memory leakage to a local userspace caller.

Mitigation

If you can’t patch tonight, do this now.

If an immediate kernel update is not possible, reduce exposure by restricting access to the affected SEV ioctl interface to trusted local administrators only and limiting untrusted local code execution on affected systems. Systems that do not use the AMD SEV/CCP functionality involved in PEK CSR retrieval are less exposed operationally, but the provided content does not specify a supported runtime workaround equivalent to the patch. Applying the vendor-supplied fixed kernel remains the recommended mitigation.

Remediation

Patch, then assume compromise.

Update to a Linux kernel release containing the upstream fix for CVE-2026-31699. The remediation is to ensure the crypto/ccp SEV driver does not attempt to copy the PEK CSR blob to userspace when the PSP firmware command fails, and to include the added consistency check/warning for cases where the driver reports success but the firmware error code indicates failure. Vendor kernels should be updated to the corresponding patched releases distributed through stable kernel updates or downstream security advisories.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
LinuxLinux Kerneloperating_system

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity

Community discussion across Reddit, Mastodon, and other social sources.