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-31720

CVE-2026-31720: Linux Kernel Buffer Overflow Vulnerability

CVE-2026-31720 is a buffer overflow vulnerability in the Linux kernel USB gadget f_uac1_legacy driver that allows stack out-of-bounds writes. This article covers the technical details, affected versions, and mitigations.

Published: May 7, 2026

CVE-2026-31720 Overview

CVE-2026-31720 is a stack out-of-bounds write vulnerability in the Linux kernel's USB gadget subsystem, specifically within the f_uac1_legacy (USB Audio Class 1 legacy) function driver. The flaw resides in f_audio_complete(), which copies a host-controlled req->length number of bytes into a fixed 4-byte stack variable using memcpy. Because the length field originates from the USB request path controlled by the host, an attacker can trigger a stack buffer overflow on the device acting as a USB gadget. The vulnerability is tracked under [CWE-787: Out-of-bounds Write].

Critical Impact

A local attacker with the ability to send crafted USB control requests to a Linux system configured as a USB audio gadget can corrupt kernel stack memory, leading to potential kernel code execution, privilege escalation, or denial of service.

Affected Products

  • Linux Kernel (multiple stable branches prior to the fix)
  • Linux Kernel 7.0 release candidates rc1 through rc6
  • Systems using the f_uac1_legacy USB gadget function driver

Discovery Timeline

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

Technical Details for CVE-2026-31720

Vulnerability Analysis

The vulnerability exists in the f_audio_complete() callback inside drivers/usb/gadget/function/f_uac1_legacy.c. When a USB control transfer completes, the callback decodes audio class control selector data from the request buffer. The flawed code declares a 4-byte stack variable u32 data = 0 and then performs memcpy(&data, req->buf, req->length) without bounding req->length to the size of data. The req->length value reflects the transfer size requested by the USB host, meaning an attacker controlling the host side can specify a payload larger than 4 bytes and overflow the kernel stack frame.

Exploitation requires local access to the USB interface of the gadget device, such as physical USB connection or control over a paired host machine. A successful overflow corrupts adjacent stack data, including saved registers and return addresses, which can be leveraged for kernel code execution depending on stack canary configuration and kernel hardening.

Root Cause

The root cause is missing input validation on a host-supplied length field before it is used as the size argument to memcpy. The driver trusted req->length and req->actual without comparing them against the size of the destination buffer or the expected payload size for the supported USB Audio Class control selectors.

Attack Vector

An attacker connects a malicious USB host to a Linux device running the f_uac1_legacy gadget function. The attacker issues a USB audio class control request with a crafted wLength that exceeds 4 bytes. When the gadget completes the transfer, the kernel performs an unbounded memcpy into the stack variable, writing attacker-controlled bytes beyond the destination boundary. The vulnerability is reachable only on systems explicitly configured as USB audio gadgets, which limits the exposed attack surface to embedded devices, development boards, and Linux-based peripherals.

No public proof-of-concept code has been released for this vulnerability.

Detection Methods for CVE-2026-31720

Indicators of Compromise

  • Unexpected kernel oops or panic messages referencing f_audio_complete or f_uac1_legacy in dmesg or /var/log/kern.log.
  • Stack protector warnings (stack-protector: Kernel stack is corrupted) on systems built with CONFIG_STACKPROTECTOR.
  • Unusual USB control transfers with wLength values larger than expected for UAC1 control selectors.

Detection Strategies

  • Audit running kernels and loaded modules for the usb_f_uac1_legacy module using lsmod | grep uac1 and verify whether the host is configured as a USB gadget.
  • Compare installed kernel versions against the fixed commits referenced in the kernel.org stable tree to confirm patch status.
  • Monitor kernel crash telemetry for repeated faults originating from the USB gadget subsystem, which can indicate exploitation attempts.

Monitoring Recommendations

  • Forward kernel logs to a centralized logging or SIEM platform and alert on USB gadget driver faults.
  • Track USB device enumeration events on gadget-capable systems and flag connections from unrecognized hosts.
  • Apply kernel runtime integrity monitoring on embedded Linux devices that expose USB gadget interfaces.

How to Mitigate CVE-2026-31720

Immediate Actions Required

  • Upgrade affected Linux kernels to a stable release containing the validation fix for f_uac1_legacy referenced in the kernel.org stable commits.
  • On systems that do not require USB audio gadget functionality, unload the usb_f_uac1_legacy module and disable CONFIG_USB_F_UAC1_LEGACY in the kernel configuration.
  • Restrict physical access to USB ports on devices that operate in gadget mode, particularly embedded and IoT deployments.

Patch Information

The Linux kernel maintainers have merged fixes across multiple stable branches. The patch validates req->actual against the expected payload size for each supported control selector and decodes only the expected amount of data, preventing host-influenced length values from reaching memcpy. Patch commits include 0d41772d, 21b11e85, 26304d12, 557d1d4e, 6e0e34d8, 8e5eb1d6, be2d32f0, and c6da4fed in the kernel.org stable tree.

Workarounds

  • Disable the USB audio gadget configuration in configfs by removing the f_uac1_legacy function binding from active gadget configurations.
  • Replace f_uac1_legacy with the modern f_uac1 driver where supported by the kernel and userspace tooling.
  • Apply USB device authorization policies using /sys/bus/usb/devices/usbN/authorized_default to block untrusted hosts on multi-role USB controllers.
bash
# Disable the f_uac1_legacy module on systems that do not need USB audio gadget support
sudo rmmod usb_f_uac1_legacy
echo "blacklist usb_f_uac1_legacy" | sudo tee /etc/modprobe.d/blacklist-uac1-legacy.conf
sudo update-initramfs -u

# Verify the running kernel version after patching
uname -r

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 Kernel

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.01%

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

  • Kernel Git Commit 21b11e85

  • Kernel Git Commit 26304d12

  • Kernel Git Commit 557d1d4e

  • Kernel Git Commit 6e0e34d8

  • Kernel Git Commit 8e5eb1d6

  • Kernel Git Commit be2d32f0

  • Kernel Git Commit c6da4fed
  • Related CVEs
  • CVE-2026-43330: Linux Kernel Buffer Overflow Vulnerability

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

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

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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