The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-31697

CVE-2026-31697: Linux Kernel Buffer Overflow Vulnerability

CVE-2026-31697 is a buffer overflow flaw in the Linux kernel's crypto driver that can leak kernel data to userspace when PSP commands fail. This article covers the technical details, affected versions, and mitigation.

Published: May 7, 2026

CVE-2026-31697 Overview

CVE-2026-31697 is an out-of-bounds read vulnerability [CWE-787] in the Linux kernel's AMD Cryptographic Coprocessor (CCP) driver. The flaw resides in the Secure Encrypted Virtualization (SEV) ioctl handler sev_ioctl_do_get_id2() in drivers/crypto/ccp/sev-dev.c. When userspace requests the CPU ID through the Platform Security Processor (PSP) and the firmware command fails with an invalid length error, the driver still attempts to copy the firmware-required number of bytes to userspace. This overflows the kernel-allocated buffer and leaks adjacent kernel memory to the calling process.

Critical Impact

A local user with access to the SEV device can trigger a kernel slab out-of-bounds read, leaking up to 64 bytes of kernel heap data per call and potentially destabilizing the system.

Affected Products

  • Linux Kernel (mainline) prior to the fixing commits
  • Linux Kernel 7.1-rc1 and 7.1-rc2
  • Distributions shipping AMD CCP/SEV drivers on EPYC platforms

Discovery Timeline

  • 2026-05-01 - CVE-2026-31697 published to NVD
  • 2026-05-06 - Last updated in NVD database

Technical Details for CVE-2026-31697

Vulnerability Analysis

The defect lives in sev_ioctl_do_get_id2(), which services the SEV_GET_ID2 ioctl on AMD platforms exposing the PSP via /dev/sev. The handler allocates a kernel buffer sized according to the userspace-supplied length, then issues a firmware command through __sev_do_cmd_locked() to retrieve the CPU ID blob.

When the firmware reports SEV_RET_INVALID_LEN because the userspace buffer was too small, the driver previously fell through to copy_to_user() and attempted to write the number of bytes the firmware reported it required, not the bytes actually populated in the kernel buffer. KASAN flagged this as a 64-byte slab-out-of-bounds read at _copy_to_user+0x66/0xa0, exposing uninitialized slab content to userspace.

The fix skips the copy when the PSP command fails and adds a WARN if the driver returns success while the firmware error code indicates failure, since __sev_do_cmd_locked() is expected to return -EIO on any firmware error.

Root Cause

The handler trusted a firmware-supplied length value to drive a copy-to-user operation without validating that the kernel buffer was actually populated to that length. Combined with missing error-path handling on SEV_RET_INVALID_LEN, this produced a classic out-of-bounds read across slab boundaries.

Attack Vector

Exploitation requires local access and the ability to open /dev/sev and issue ioctls. An attacker invokes SEV_GET_ID2 with an undersized buffer to force the firmware to return an invalid-length error, then reads the leaked kernel slab data returned in the userspace buffer. Repeated invocations can be used to harvest sensitive kernel memory contents adjacent to the allocation.

No verified public exploit code is available. The vulnerability mechanism is documented in the kernel KASAN report and the corresponding stable patches.

Detection Methods for CVE-2026-31697

Indicators of Compromise

  • KASAN reports referencing sev_ioctl_do_get_id2 and _copy_to_user in kernel logs
  • Unexpected WARN traces from the CCP/SEV driver after the patch is applied, indicating drivers returning success on firmware errors
  • Processes repeatedly issuing SEV_GET_ID2 ioctls against /dev/sev with small buffer lengths

Detection Strategies

  • Audit kernel logs (dmesg, journalctl -k) for slab-out-of-bounds entries originating in drivers/crypto/ccp/sev-dev.c
  • Enable Linux audit rules on /dev/sev open and ioctl syscalls to baseline legitimate SEV tooling
  • Use eBPF tracing to capture ioctl numbers issued against the SEV character device by non-virtualization workloads

Monitoring Recommendations

  • Alert on unprivileged or non-libvirt processes accessing /dev/sev
  • Track frequency of SEV_GET_ID2 calls per process to detect brute-force memory leak attempts
  • Forward kernel KASAN and WARN events to centralized logging for correlation across hosts

How to Mitigate CVE-2026-31697

Immediate Actions Required

  • Apply the upstream stable kernel patches referenced below and reboot affected hosts
  • Restrict access to /dev/sev to trusted virtualization components only via udev rules and group permissions
  • Inventory AMD EPYC hosts running SEV-enabled workloads and prioritize them for patching

Patch Information

The fix has been merged to stable trees through the following commits: 06f06d8, 09427bc, 1fbac04, 2937f17, and 4f685db. The patch ensures copy_to_user() is bypassed whenever __sev_do_cmd_locked() reports a firmware failure.

Workarounds

  • Remove or blacklist the ccp kernel module on hosts that do not require AMD SEV functionality
  • Tighten permissions on /dev/sev so that only the virtualization service account can issue ioctls
  • Disable SEV firmware features in BIOS/UEFI on systems where confidential VMs are not used
bash
# Restrict access to the SEV device until patched kernels are deployed
sudo chown root:kvm /dev/sev
sudo chmod 0660 /dev/sev

# Optionally prevent the ccp module from loading on non-SEV hosts
echo 'blacklist ccp' | sudo tee /etc/modprobe.d/blacklist-ccp.conf
sudo update-initramfs -u

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechLinux

  • SeverityHIGH

  • CVSS Score7.1

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-787
  • Vendor Resources
  • Kernel Patch 06f06d8

  • Kernel Patch 09427bc

  • Kernel Patch 1fbac04

  • Kernel Patch 2937f17

  • Kernel Patch 4f685db
  • Related CVEs
  • CVE-2026-31747: Linux Kernel Buffer Overflow Vulnerability

  • CVE-2026-31748: Linux Kernel Buffer Overflow Vulnerability

  • CVE-2026-31729: Linux Kernel Buffer Overflow Vulnerability

  • CVE-2026-31707: Linux Kernel Buffer Overflow Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English