In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: f_midi: fix MIDI Streaming descriptor lengths
While the MIDI jacks are configured correctly, and the MIDIStreaming
endpoint descriptors are filled with the correct information,
bNumEmbMIDIJack and bLength are set incorrectly in these descriptors.
This does not matter when the numbers of in and out ports are equal, but
when they differ the host will receive broken descriptors with
uninitialized stack memory leaking into the descriptor for whichever
value is smaller.
The precise meaning of "in" and "out" in the port counts is not clearly
defined and can be confusing. But elsewhere the driver consistently
uses this to match the USB meaning of IN and OUT viewed from the host,
so that "in" ports send data to the host and "out" ports receive data
from it.
Security readout for executives and security teams
Plain-English summary
CVE-2025-21835 is a Linux kernel USB MIDI gadget issue. When a device exposes different numbers of MIDI input and output ports, it can send malformed USB descriptors that include uninitialized kernel stack memory. This is mainly relevant to Linux-based devices acting as USB MIDI peripherals, not ordinary systems that only connect to USB devices.
Executive priority
Treat as a targeted exposure issue, not a broad enterprise emergency. Prioritize embedded, appliance, lab, audio, and industrial devices that present themselves over USB as MIDI gadgets. Patch through normal kernel or vendor maintenance unless those devices handle sensitive data or are exposed to untrusted USB hosts.
Technical view
The flaw is in the Linux kernel USB gadget f_midi function. Incorrect bNumEmbMIDIJack and bLength values in MIDIStreaming endpoint descriptors can leak uninitialized stack memory when configured IN and OUT port counts differ. Upstream stable kernel commits correct the descriptor lengths. The CVE record does not provide CVSS, CWE, or confirmed exploit activity.
Likely exposure
Exposure is likely limited to Linux systems or embedded products using USB gadget mode with f_midi enabled, especially configurations with unequal MIDI IN and OUT port counts. General-purpose Linux hosts that do not present themselves as USB MIDI gadgets are less likely to be exposed.
Exploitation context
The provided sources do not report active exploitation, and the CVE is not marked in KEV. Exploitation appears to require interaction with a Linux device operating as a USB MIDI gadget and receiving its descriptors as a USB host.
Researcher notes
The core impact is information disclosure from uninitialized stack memory in USB descriptors. The sources do not establish privilege escalation, remote network attackability, or public exploitation. Affected-version data is kernel-centric and should be reconciled with distribution backports and vendor product advisories.
Mitigation direction
Update to a kernel containing the referenced upstream stable fixes.
Apply applicable Debian LTS kernel updates if using affected Debian releases.
Check vendor advisories for embedded or industrial products using Linux USB gadget features.
Disable or avoid f_midi gadget configurations if not required.
Validation and detection
Inventory Linux devices that operate in USB gadget mode.
Identify whether the f_midi gadget function is enabled or available.
Review MIDI gadget configurations for unequal IN and OUT port counts.
Compare kernel packages against vendor or upstream fixed versions.
Check Debian and device-vendor advisories for product-specific status.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-21835 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
0CVSS vectors
3Timeline events
2ADP providers
12Source links
Vulnerability timeline
Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.
CVE reservedCVE Program
The CVE ID was reserved by the assigning CNA.
CVE publishedCVE Program
The CVE record was published.
Mar 7, 2025, 09:09 UTC (UTC+00:00)
CVE updatedCVE Program
The CVE record metadata indicates this as the latest update time.