CVE-2025-21704·Kernel vulnerability
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 usb_cdc_notification, we can't calculate an expected_size. 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 expected_size decreases between fragments, causing `expected_size - acm->nb_index` 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 acm_ctrl_irq() 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.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.13.4
- Published
- 2025-02-22
Affected versions
From: 6.13
Until: 6.13.4
Fixed in: 6.13.4
How to fix this CVE
Update your Linux kernel to version 6.13.4 or later to resolve a buffer boundary validation flaw in the USB CDC-ACM driver that could lead to memory corruption. This vulnerability affects kernel versions 6.13 through 6.13.3 and requires a kernel upgrade followed by a system reboot to take effect.
sudo dnf update kernel kernel-devel && sudo rebootDefensia detects this vulnerability
How to check if you are affected
- Check installed kernel version with: uname -r (compare against affected range 6.13.x)
- Verify CDC-ACM driver is loaded with: lsmod | grep cdc_acm (confirms vulnerable component is active)
- Check kernel logs for buffer-related warnings: sudo dmesg | grep -i 'cdc\|acm\|buffer\|corruption'
- Confirm patch installation by checking kernel release date: uname -v (must show 6.13.4 or later)
FAQ
What is CVE-2025-21704?
A buffer size validation vulnerability in the Linux kernel's USB CDC-ACM driver that fails to verify control transfer buffer lengths before accessing them, allowing memory corruption when fragmented notifications are reassembled with inconsistent expected sizes.
Is CVE-2025-21704 being actively exploited?
No, this vulnerability is not currently listed in the CISA Known Exploited Vulnerabilities catalog and no public exploits are available, though local privilege escalation is theoretically possible if ModemManager automatically opens /dev/ttyACM* on affected systems.
What versions of Kernel are affected by CVE-2025-21704?
Linux kernel versions 6.13.0 through 6.13.3 are vulnerable; the fix is included in kernel 6.13.4 and all subsequent releases.
How do I check if my server is vulnerable to CVE-2025-21704?
Run 'uname -r' and verify the kernel version is between 6.13.0 and 6.13.3; additionally check 'lsmod | grep cdc_acm' to confirm the vulnerable driver is loaded.
Does Defensia detect CVE-2025-21704?
Yes — Defensia's CVE advisory scanner compares installed kernel package versions against the NVD database. If a vulnerable kernel version is detected on a monitored server, CVE-2025-21704 will appear in your dashboard with remediation steps and impact assessment.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/383d516a0ebc8641372b521c8cb717f0f1834831
- https://git.kernel.org/stable/c/6abb510251e75f875797d8983a830e6731fa281c
- https://git.kernel.org/stable/c/7828e9363ac4d23b02419bf2a45b9f1d9fb35646
- https://git.kernel.org/stable/c/871619c2b78fdfe05afb4e8ba548678687beb812
- https://git.kernel.org/stable/c/90dd2f1b7342b9a671a5ea4160f408037b92b118
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2025-21704. Free for 1 server.
Get started free