Cloudanix VulnDB

CVE-2026-31697

High · 7.1

CVSS

7.1

EPSS

0.2%

Published

May 1, 2026

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A local user on some Linux systems could make the operating system leak private kernel memory or become unstable unless the system is updated.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Low
Impact
Data Exposure
Component
OS kernel
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

This is a Linux kernel memory disclosure flaw in the AMD Secure Encrypted Virtualization / Platform Security Processor crypto driver path. A local user with access to the SEV ioctl interface can request the CPU/firmware ID using a userspace buffer length that causes the firmware command to fail. Prior to the fix, the driver could still attempt to copy the firmware-reported number of bytes back to userspace even though the kernel-allocated buffer was smaller, causing a slab out-of-bounds read. The primary impact is disclosure of kernel memory to a local user; depending on kernel configuration and runtime conditions, the invalid copy path may also trigger kernel diagnostics or instability.

Why it matters to the business

Systems running affected Linux kernels on platforms exposing the SEV/PSP crypto device may allow a low-privileged local user to read sensitive kernel memory or potentially destabilize the host. This is most relevant for virtualization hosts, cloud infrastructure, confidential-computing platforms, and multi-user Linux systems where untrusted local users, containers, or workloads may have access to the affected device interface. The issue is not listed in CISA KEV, has no known mature public exploit, and has a low EPSS score, but it should still be prioritized on shared compute and virtualization hosts because local kernel memory disclosure can undermine isolation assumptions.

How an attack unfolds

An attacker first needs local execution on an affected Linux system and sufficient permission to open the SEV/PSP device interface, typically associated with the AMD CCP/SEV driver. The attacker then sends a crafted ioctl request to retrieve the platform or CPU ID, intentionally supplying a userspace buffer and length combination that causes the firmware command to fail due to an invalid or insufficient length. In the vulnerable code path, the kernel driver fails to stop after the firmware error and proceeds to copy the firmware-requested number of bytes to userspace. Because the kernel buffer is smaller than the requested copy size, the copy reads past the end of the allocated slab object and returns adjacent kernel memory to the attacker. Repeated calls may allow the attacker to sample kernel memory contents, and on hardened or instrumented kernels the same condition may generate KASAN slab-out-of-bounds reports or other kernel warnings.

How to fix it

Apply a vendor-supplied Linux kernel update that includes the upstream fix for the AMD CCP/SEV driver behavior: the driver must not copy the ID blob to userspace when the PSP firmware command fails. No exact fixed package versions were provided, so use the latest kernel security update from the operating system or appliance vendor and verify that the kernel includes the relevant `crypto: ccp` / `sev-dev` fix. Reboot into the patched kernel after installation. As interim mitigations, restrict access to SEV/PSP device nodes to only trusted administrative users, remove unnecessary user access to `/dev/sev` or related CCP devices, disable unused SEV functionality where operationally acceptable, and reduce local shell/container access on affected virtualization hosts. These mitigations reduce exploitability but do not replace patching.

How to confirm the fix worked

Confirm exposure by checking whether the system is running an affected kernel version and whether the AMD CCP/SEV driver and device interface are present. Validate remediation by confirming the host has booted into a kernel build containing the fix, not merely installed it. Review vendor advisories or kernel changelogs for the patch text indicating that the CCP/SEV code no longer attempts to copy the ID to userspace after a PSP command failure. On test systems, a regression test should verify that malformed SEV ID retrieval ioctl requests fail cleanly without returning extra bytes, producing KASAN findings, or logging slab-out-of-bounds reports. Also confirm that permissions on SEV/CCP device nodes prevent untrusted local users from opening them.

Typical attack path

  1. Gain local code execution on a Linux system running an affected kernel.
  2. Determine whether the AMD CCP/SEV device interface is present and accessible, such as via the SEV ioctl path.
  3. Open the exposed device node and prepare a malformed SEV ID retrieval request with an undersized userspace buffer or invalid length.
  4. Trigger the vulnerable ioctl path so the firmware command fails but the driver still attempts to copy the firmware-requested ID length.
  5. Collect out-of-bounds kernel memory bytes returned to userspace or repeat the request to gather additional leaked data.
  6. Optionally use the leaked kernel memory to support further local exploitation, bypass hardening assumptions, or investigate host secrets.

How to detect it

Look for evidence of local attempts to exercise the vulnerable SEV ioctl path. Useful telemetry includes kernel logs, `dmesg`, system journal entries, auditd records for device-node access, endpoint process telemetry, and crash/KASAN reports. Search for kernel messages referencing `slab-out-of-bounds`, `copy_to_user`, `sev_ioctl_do_get_id2`, `sev_ioctl`, `sev-dev.c`, or AMD CCP/SEV firmware command failures. Audit access to `/dev/sev` and related CCP/PSP device nodes by non-administrative users or unexpected processes. On hardened test or debug kernels, exploitation attempts may produce KASAN reports similar to the published trace, including `_copy_to_user` and `sev_ioctl_do_get_id2`. On production kernels without KASAN, exploitation may leave little or no direct artifact beyond device access patterns, kernel warnings, or crashes; absence of logs does not prove absence of exploitation.

  • /dev/sev
  • /dev/ccp
  • sev_ioctl_do_get_id2
  • sev_ioctl
  • drivers/crypto/ccp/sev-dev.c
  • crypto: ccp
  • BUG: KASAN: slab-out-of-bounds
  • slab-out-of-bounds in _copy_to_user
  • instrument_copy_to_user
  • _inline_copy_to_user
  • _copy_to_user+0x66
  • copy_to_user
  • Read of size 64
  • PSP command failed
  • firmware command failed
  • invalid length
  • __sev_do_cmd_locked
  • SEV_GET_ID2

What your security team should do

  • Prioritize patching shared Linux virtualization hosts, confidential-computing nodes, and systems where untrusted local users or workloads may have access to SEV/PSP interfaces.
  • Inventory Linux systems with AMD SEV/PSP capability and identify those exposing `/dev/sev` or related CCP device nodes.
  • Apply the latest vendor kernel security updates and reboot into the fixed kernel.
  • Until patched, restrict device-node permissions for SEV/CCP interfaces to trusted administrators or required service accounts only.
  • Review kernel logs for KASAN, slab out-of-bounds, `sev_ioctl`, or `sev_ioctl_do_get_id2` messages that may indicate attempted triggering or testing.
  • Monitor for unexpected local processes opening SEV/CCP device nodes, especially from user shells, containers, build workers, or non-administrative accounts.
  • Treat confirmed exploitation as a local kernel memory disclosure event and assess whether leaked memory could contain secrets, credentials, cryptographic material, or host isolation-sensitive data.

The record

In the Linux kernel, the following vulnerability has been resolved: crypto: ccp: Don't attempt to copy ID to userspace if PSP command failed When retrieving the ID for the CPU, don't attempt to copy the ID blob to userspace if the firmware command failed. If the failure was due to an invalid length, i.e. the userspace buffer+length was too small, copying the number of bytes _firmware_ requires will overflow the kernel-allocated buffer and leak data to userspace. BUG: KASAN: slab-out-of-bounds in instrument_copy_to_user ../include/linux/instrumented.h:129 [inline] BUG: KASAN: slab-out-of-bounds in _inline_copy_to_user ../include/linux/uaccess.h:205 [inline] BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x66/0xa0 ../lib/usercopy.c:26 Read of size 64 at addr ffff8881867f5960 by task syz.0.906/24388 CPU: 130 UID: 0 PID: 24388 Comm: syz.0.906 Tainted: G U O 7.0.0-smp-DEV #28 PREEMPTLAZY Tainted: [U]=USER, [O]=OOT_MODULE Hardware name: Google, Inc. Arcadia_IT_80/Arcadia_IT_80, BIOS 12.62.0-0 11/19/2025 Call Trace: <TASK> dump_stack_lvl+0xc5/0x110 ../lib/dump_stack.c:120 print_address_description ../mm/kasan/report.c:378 [inline] print_report+0xbc/0x260 ../mm/kasan/report.c:482 kasan_report+0xa2/0xe0 ../mm/kasan/report.c:595 check_region_inline ../mm/kasan/generic.c:-1 [inline] kasan_check_range+0x264/0x2c0 ../mm/kasan/generic.c:200 instrument_copy_to_user ../include/linux/instrumented.h:129 [inline] _inline_copy_to_user ../include/linux/uaccess.h:205 [inline] _copy_to_user+0x66/0xa0 ../lib/usercopy.c:26 copy_to_user ../include/linux/uaccess.h:236 [inline] sev_ioctl_do_get_id2+0x361/0x490 ../drivers/crypto/ccp/sev-dev.c:2222 sev_ioctl+0x25f/0x490 ../drivers/crypto/ccp/sev-dev.c:2575 vfs_ioctl ../fs/ioctl.c:51 [inline] __do_sys_ioctl ../fs/ioctl.c:597 [inline] __se_sys_ioctl+0x11d/0x1b0 ../fs/ioctl.c:583 do_syscall_x64 ../arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xe0/0x800 ../arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x76/0x7e </TASK> WARN if the driver says the command succeeded, but the firmware error code says otherwise, as __sev_do_cmd_locked() is expected to return -EIO on any firwmware error.

Affected packages

Ecosystem Package Introduced Fixed
openSUSE:Tumbleweed kernel-source 0 7.0.7-1.1

Related vulnerabilities