CVE-2025-21704
usb: cdc-acm: Check control transfer buffer size before access
Reported by linux · Published February 22, 2025
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-libbpf | Amazon Linux | 6.1.129-138.220.amzn2023 |
| kernel-headers | Amazon Linux | 6.1.129-138.220.amzn2023 |
| kernel-modules-extra | Amazon Linux | 6.1.129-138.220.amzn2023 |
| python3-perf | Amazon Linux | 6.1.129-138.220.amzn2023 |
| bpftool | Amazon Linux | 6.1.129-138.220.amzn2023 |
| kernel | Amazon Linux | 6.1.129-138.220.amzn2023 |
| kernel-tools | Amazon Linux | 6.1.129-138.220.amzn2023 |
| perf | Amazon Linux | 6.1.129-138.220.amzn2023 |
| kernel-modules-extra-common | Amazon Linux | 6.1.129-138.220.amzn2023 |
| linux_kernel | linux | 6.14, 6.13.4, 6.12.16, 6.6.79, 6.1.129, 5.15.179, 5.10.235, 5.4.291 |
| Linux | Linux | e563b01208f4d1f609bcab13333b6c0e24ce6a01, a4e1ae5c0533964170197e4fb4f33bc8c1db5cd2, 90dd2f1b7342b9a671a5ea4160f408037b92b118, 871619c2b78fdfe05afb4e8ba548678687beb812, 7828e9363ac4d23b02419bf2a45b9f1d9fb35646, 2.6.12 |
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 |
| Linux | Linux | 2.6.12, 0, 5.4.291 |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2023 | kernel-headers | 0 |
| amazon:2023 | kernel-modules-extra | 0 |
| amazon:2023 | python3-perf | 0 |
| linux | linux_kernel | 2.6.12, 2.6.12, 2.6.12 |
| amazon:2023 | bpftool | 0 |
| amazon:2023 | kernel | 0 |
| amazon:2023 | kernel-tools | 0 |
| amazon:2023 | perf | 0 |
| Siemens | SIMATIC S7-1500 TM MFP - GNU/Linux subsystem | 0 |
| amazon:2023 | kernel-modules-extra-common | 0 |
| Linux | Linux | 6.6.79, 6.14, 5.10.235 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | kernel-livepatch-6.1.129-138.220 | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
Timeline
- Feb 22, 2025 CVE Published
- Feb 23, 2025 EPSS Score (30 in total, the first dated here)
- Mar 2, 2025 Coalition ESS Score (14 in total, the first dated here)
- Dec 22, 2025 Security Advisory (136 in total, the first dated here)
- Mar 29, 2026 Distribution Patch (132 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-21704
vulnetix vdb fixes CVE-2025-21704
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-21704/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart