CVE-2025-21835

usb: gadget: f_midi: fix MIDI Streaming descriptor lengths

MEDIUM
5.5
CVSS Score
Published: March 7, 2025 at 09:09 AM UTC
Updated: October 15, 2026 at 02:17 AM UTC
2 products affected across 2 vendorsLinux KernelSIMATIC S7-1500 TM MFP

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

3.2 ≤ v < 5.4.2915.11 ≤ v < 5.15.1795.16 ≤ v < 6.1.1295.5 ≤ v < 5.10.2356.13 ≤ v < 6.13.46.2 ≤ v < 6.6.796.7 ≤ v < 6.12.163.26.146.14 rc16.14 rc2c8933c3f79568263c90a46f06cf80419e6c63c97
Vendor states this is fixed in 3a983390d14e8498f303fc5cb23ab7d696b815db (fixed)
Vendor states this is fixed in 6ae6dee9f005a2f3b739b85abb6f14a0935699e0 (fixed)
Vendor states this is fixed in 6b16761a928796e4b49e89a0b1ac284155172726 (fixed)
Vendor states this is fixed in 9f36a89dcb78cb7e37f487b04a16396ac18c0636 (fixed)
Vendor states this is fixed in 9f6860a9c11301b052225ca8825f8d2b1a5825bf (fixed)
Vendor states this is fixed in a2d0694e1f111379c1efdf439dadd3cfd959fe9d (fixed)
Vendor states this is fixed in d8e86700c8a8cf415e300a0921acd6a8f9b494f8 (fixed)
Vendor states this is fixed in da1668997052ed1cb00322e1f3b63702615c9429 (fixed)
Vendor states this is fixed in 3.2 (unaffected)
Vendor states this is fixed in 5.10.235 (unaffected)
Vendor states this is fixed in 5.15.179 (unaffected)
Vendor states this is fixed in 5.4.291 (unaffected)
Vendor states this is fixed in 6.1.129 (unaffected)
Vendor states this is fixed in 6.12.16 (unaffected)
Vendor states this is fixed in 6.13.4 (unaffected)
Vendor states this is fixed in 6.14 (unaffected)
Vendor states this is fixed in 6.6.79 (unaffected)

References (12)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/3a983390d14e8498f303fc5cb23ab7d696b815db
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/6ae6dee9f005a2f3b739b85abb6f14a0935699e0
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/6b16761a928796e4b49e89a0b1ac284155172726
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9f36a89dcb78cb7e37f487b04a16396ac18c0636
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9f6860a9c11301b052225ca8825f8d2b1a5825bf
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a2d0694e1f111379c1efdf439dadd3cfd959fe9d
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/d8e86700c8a8cf415e300a0921acd6a8f9b494f8
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/da1668997052ed1cb00322e1f3b63702615c9429

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card