CVE-2025-21835: usb: gadget: f_midi: fix MIDI Streaming descriptor lengths

Published Mar 7, 2025
·
Updated

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

usb: gadget: fmidi: 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 Software

10 affected components
Linux Linux kernel
Linux Linux kernel>=3.2<5.4.291
Linux Linux kernel>=5.5<5.10.235
Linux Linux kernel>=5.11<5.15.179
Linux Linux kernel>=5.16<6.1.129
Linux Linux kernel>=6.2<6.6.79
Linux Linux kernel>=6.7<6.12.16
Linux Linux kernel>=6.13<6.13.4
Linux Linux kernel=6.14-rc1
Linux Linux kernel=6.14-rc2

Event History

Mar 7, 2025
CVE Published
via MITRE·09:09 AM
Data Sourced
via MITRE·09:09 AM
Description
Data Sourced
via NVD·09:15 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-21835?

CVE-2025-21835 is classified as a moderate severity vulnerability in the Linux kernel.

2

How do I fix CVE-2025-21835?

To fix CVE-2025-21835, update your Linux kernel to the latest version where the vulnerability has been resolved.

3

What components are affected by CVE-2025-21835?

CVE-2025-21835 specifically affects the usb gadget driver related to MIDI streaming in the Linux kernel.

4

Is CVE-2025-21835 actively being exploited?

As of now, there are no known active exploitations of CVE-2025-21835 reported.

5

What impacts does CVE-2025-21835 have on systems?

CVE-2025-21835 can lead to potential stability issues in systems using MIDI gadgets, affecting audio performance.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203