CVE-2025-21704: Fixes buffer size check in the USB CDC-ACM driver

Published Feb 22, 2025
·
Updated

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

usb: cdc-acm: Check control transfer buffer size before access

If the first fragment is shorter than struct usbcdcnotification, we can't calculate an expectedsize. Log an error and discard the notification instead of reading lengths from memory outside the received data, which can lead to memory corruption when the expectedsize decreases between fragments, causing expectedsize - acm->nbindex to wrap.

This issue has been present since the beginning of git history; however, it only leads to memory corruption since commit ea2583529cd1 ("cdc-acm: reassemble fragmented notifications").

A mitigating factor is that acmctrlirq() can only execute after userspace has opened /dev/ttyACM; but if ModemManager is running, ModemManager will do that automatically depending on the USB device's vendor/product IDs and its other interfaces.

Affected Software

15 affected components
Linux Kernel>=ea2583529cd1
Linux Linux kernel>=2.6.13<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=2.6.12
Linux Linux kernel=2.6.12-rc2
Linux Linux kernel=2.6.12-rc3
Linux Linux kernel=2.6.12-rc4
Linux Linux kernel=2.6.12-rc5
Linux Linux kernel=6.14-rc1
Linux Linux kernel=6.14-rc2

Event History

Feb 22, 2025
CVE Published
via MITRE·09:43 AM
Data Sourced
via MITRE·09:43 AM
Description
Data Sourced
via NVD·10:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Feb 26, 2026
Data Sourced
12:00 AM
SeverityWeakness

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-21704?

CVE-2025-21704 has a severity rating that requires attention due to potential vulnerabilities in control transfer buffer handling.

2

How do I fix CVE-2025-21704?

To fix CVE-2025-21704, upgrade to the latest version of the Linux kernel that addresses this specific vulnerability.

3

Which versions of the Linux kernel are affected by CVE-2025-21704?

CVE-2025-21704 affects versions of the Linux kernel starting from ea2583529cd1 and earlier.

4

What impact does CVE-2025-21704 have on systems?

CVE-2025-21704 may lead to erratic behavior or security risks in systems reliant on the affected USB communication protocols.

5

Is a patch available for CVE-2025-21704?

Yes, a patch for CVE-2025-21704 is included in the updates for the Linux kernel released after the vulnerability was identified.

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