VDB

CVE-2025-21704

CVE-2025-21704 PUBLISHED

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.

PackageEcosystemFixed in
kernel-libbpfAmazon Linux6.1.129-138.220.amzn2023
kernel-headersAmazon Linux6.1.129-138.220.amzn2023
kernel-modules-extraAmazon Linux6.1.129-138.220.amzn2023
python3-perfAmazon Linux6.1.129-138.220.amzn2023
bpftoolAmazon Linux6.1.129-138.220.amzn2023
kernelAmazon Linux6.1.129-138.220.amzn2023
kernel-toolsAmazon Linux6.1.129-138.220.amzn2023
perfAmazon Linux6.1.129-138.220.amzn2023
kernel-modules-extra-commonAmazon Linux6.1.129-138.220.amzn2023
linux_kernellinux6.14, 6.13.4, 6.12.16, 6.6.79, 6.1.129, 5.15.179, 5.10.235, 5.4.291
LinuxLinuxe563b01208f4d1f609bcab13333b6c0e24ce6a01, a4e1ae5c0533964170197e4fb4f33bc8c1db5cd2, 90dd2f1b7342b9a671a5ea4160f408037b92b118, 871619c2b78fdfe05afb4e8ba548678687beb812, 7828e9363ac4d23b02419bf2a45b9f1d9fb35646, 2.6.12

Affected products

VendorProductVersions
LinuxLinux1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
LinuxLinux2.6.12, 0, 5.4.291
amazon:2023kernel-libbpf0
amazon:2023kernel-headers0
amazon:2023kernel-modules-extra0
amazon:2023python3-perf0
linuxlinux_kernel2.6.12, 2.6.12, 2.6.12
amazon:2023bpftool0
amazon:2023kernel0
amazon:2023kernel-tools0
amazon:2023perf0
SiemensSIMATIC S7-1500 TM MFP - GNU/Linux subsystem0
amazon:2023kernel-modules-extra-common0
LinuxLinux6.6.79, 6.14, 5.10.235
amazon:2023kernel-devel0
amazon:2023kernel-livepatch-6.1.129-138.2200
amazon:2023kernel-libbpf-devel0
amazon:2023kernel-tools-devel0
amazon:2023kernel-libbpf-static0

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

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›