CVE-2026-31720 usb: gadget: f_uac1_legacy: validate control request size
A stack out-of-bounds write in the Linux kernel USB audio gadget driver allows attackers to potentially execute code or escalate privileges via malicious USB requests.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-31720?
CVE-2026-31720 is a high-severity memory corruption vulnerability in Linux kernel, published on 1 May 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Weakness: CWE-787
Which versions are affected by CVE-2026-31720?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2026-31720?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2026-31720 being exploited?
There is no known exploitation of CVE-2026-31720 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2026-31720, DEBIAN-CVE-2026-31720, GHSA-pmxh-4w53-fp85, ROOT-OS-DEBIAN-11-CVE-2026-31720, ROOT-OS-UBUNTU-2204-CVE-2026-31720, ROOT-OS-UBUNTU-2404-CVE-2026-31720 and 1 more.