Description
In the Linux kernel, the following vulnerability has been resolved:

usb: gadget: f_uac1_legacy: validate control request size

f_audio_complete() copies req->length bytes into a 4-byte stack
variable:

u32 data = 0;
memcpy(&data, req->buf, req->length);

req->length is derived from the host-controlled USB request path,
which can lead to a stack out-of-bounds write.

Validate req->actual against the expected payload size for the
supported control selectors and decode only the expected amount
of data.

This avoids copying a host-influenced length into a fixed-size
stack object.
Published: 2026-05-01
Score: n/a
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The bug arises when the f_audio_complete() routine copies a host‑controlled length value into a fixed‑size 4‑byte stack variable using memcpy. The req->length field is derived from the USB request sent by the host and is not bounded before the copy, leading to a stack out‑of‑bounds write that can corrupt kernel memory or crash the system. This flaw can be exploited by a malicious USB host to trigger arbitrary kernel memory corruption, potentially allowing privilege escalation or denial of service for users with local access.

Affected Systems

All Linux kernel builds that enable the f_uac1_legacy USB gadget driver are potentially impacted. The vulnerability is present in the kernel source regardless of distribution, and no specific version range is provided in the advisory. Systems running a kernel that still includes the unpatched f_uac1_legacy implementation may be exposed.

Risk and Exploitability

The exploitation likelihood is not quantified in the advisory (EPSS not available; KEV not listed), but the flaw involves a stack buffer overflow which historically carries a high exploitation risk. The attack path would involve a USB host sending a crafted control request to the gadget device, which the kernel would process without validating the payload size. Based on the description, the attack vector is a host‑to‑device USB interface. While no CVSS score is given, the nature of the vulnerability suggests it could lead to kernel privilege escalation if successfully exploited.

Generated by OpenCVE AI on May 2, 2026 at 10:36 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply an updated Linux kernel version that incorporates the f_uac1_legacy control‑request size validation patch.
  • If an update is not feasible, disable or remove the f_uac1_legacy USB gadget driver from the kernel configuration to eliminate the vulnerable code.
  • Restrict USB gadget access by installing host‑side device isolation measures (e.g., USB gadgets disabled for untrusted hosts) to reduce exposure if the driver must remain enabled.

Generated by OpenCVE AI on May 2, 2026 at 10:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4561-1 linux-6.1 security update
Debian DSA Debian DSA DSA-6243-1 linux security update
History

Sat, 02 May 2026 00:15:00 +0000


Fri, 01 May 2026 14:45:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_uac1_legacy: validate control request size f_audio_complete() copies req->length bytes into a 4-byte stack variable: u32 data = 0; memcpy(&data, req->buf, req->length); req->length is derived from the host-controlled USB request path, which can lead to a stack out-of-bounds write. Validate req->actual against the expected payload size for the supported control selectors and decode only the expected amount of data. This avoids copying a host-influenced length into a fixed-size stack object.
Title usb: gadget: f_uac1_legacy: validate control request size
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-05-02T06:14:21.352Z

Reserved: 2026-03-09T15:48:24.134Z

Link: CVE-2026-31720

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-05-01T15:16:34.360

Modified: 2026-05-01T15:24:14.893

Link: CVE-2026-31720

cve-icon Redhat

Severity :

Publid Date: 2026-05-01T00:00:00Z

Links: CVE-2026-31720 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-05-02T10:45:40Z

Weaknesses