{"id":"CVE-2025-21704","aliases":["CVE-2025-21704"],"related":[],"kind":"vulnerability","state":"published","title":"usb: cdc-acm: Check control transfer buffer size before access","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: cdc-acm: Check control transfer buffer size before access\n\nIf the first fragment is shorter than struct usb_cdc_notification, we can't\ncalculate an expected_size. Log an error and discard the notification\ninstead of reading lengths from memory outside the received data, which can\nlead to memory corruption when the expected_size decreases between\nfragments, causing `expected_size - acm->nb_index` to wrap.\n\nThis issue has been present since the beginning of git history; however,\nit only leads to memory corruption since commit ea2583529cd1\n(\"cdc-acm: reassemble fragmented notifications\").\n\nA mitigating factor is that acm_ctrl_irq() can only execute after userspace\nhas opened /dev/ttyACM*; but if ModemManager is running, ModemManager will\ndo that automatically depending on the USB device's vendor/product IDs and\nits other interfaces.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: cdc-acm: Check control transfer buffer size before access\n\nIf the first fragment is shorter than struct usb_cdc_notification, we can't\ncalculate an expected_size. Log an error and discard the notification\ninstead of reading lengths from memory outside the received data, which can\nlead to memory corruption when the expected_size decreases between\nfragments, causing `expected_size - acm->nb_index` to wrap.\n\nThis issue has been present since the beginning of git history; however,\nit only leads to memory corruption since commit ea2583529cd1\n(\"cdc-acm: reassemble fragmented notifications\").\n\nA mitigating factor is that acm_ctrl_irq() can only execute after userspace\nhas opened /dev/ttyACM*; but if ModemManager is running, ModemManager will\ndo that automatically depending on the USB device's vendor/product IDs and\nits other interfaces.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: usb: cdc-acm: Verificar el tamaño del búfer de transferencia de control antes del acceso Si el primer fragmento es más corto que struct usb_cdc_notification, no podemos calcular un expected_size. Registra un error y descarta la notificación en lugar de leer longitudes de la memoria fuera de los datos recibidos, lo que puede provocar una corrupción de la memoria cuando el expected_size disminuye entre fragmentos, lo que hace que `expected_size - acm-&gt;nb_index` se ajuste. Este problema ha estado presente desde el comienzo de la historia de git; sin embargo, solo conduce a la corrupción de la memoria desde el commit ea2583529cd1 (\"cdc-acm: reensamblar notificaciones fragmentadas\"). Un factor atenuante es que acm_ctrl_irq() solo se puede ejecutar después de que el espacio de usuario haya abierto /dev/ttyACM*; pero si ModemManager se está ejecutando, ModemManager lo hará automáticamente dependiendo de los ID de proveedor/producto del dispositivo USB y sus otras interfaces.","source":"nvd"}],"published":"2025-02-22T09:43:37.377Z","modified":"2026-10-15T02:17:28.313Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"a4e1ae5c0533964170197e4fb4f33bc8c1db5cd2","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"90dd2f1b7342b9a671a5ea4160f408037b92b118","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"871619c2b78fdfe05afb4e8ba548678687beb812","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"7828e9363ac4d23b02419bf2a45b9f1d9fb35646","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"6abb510251e75f875797d8983a830e6731fa281c","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"f64079bef6a8a7823358c3f352ea29a617844636","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"383d516a0ebc8641372b521c8cb717f0f1834831","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"e563b01208f4d1f609bcab13333b6c0e24ce6a01","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.12","status":"unaffected"},{"type":"semver","introduced":"5.4.291","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.235","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.179","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.129","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.79","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.16","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.13.4","lastAffected":"6.13.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.14","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"2.6.13","fixed":"5.4.291"},{"status":"affected","introduced":"5.5","fixed":"5.10.235"},{"status":"affected","introduced":"5.11","fixed":"5.15.179"},{"status":"affected","introduced":"5.16","fixed":"6.1.129"},{"status":"affected","introduced":"6.2","fixed":"6.6.79"},{"status":"affected","introduced":"6.7","fixed":"6.12.16"},{"status":"affected","introduced":"6.13","fixed":"6.13.4"},{"status":"affected","version":"2.6.12"},{"status":"affected","version":"2.6.12"},{"status":"affected","version":"2.6.12"},{"status":"affected","version":"2.6.12"},{"status":"affected","version":"2.6.12"},{"status":"affected","version":"6.14"},{"status":"affected","version":"6.14"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/a4e1ae5c0533964170197e4fb4f33bc8c1db5cd2","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/90dd2f1b7342b9a671a5ea4160f408037b92b118","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/871619c2b78fdfe05afb4e8ba548678687beb812","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7828e9363ac4d23b02419bf2a45b9f1d9fb35646","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6abb510251e75f875797d8983a830e6731fa281c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f64079bef6a8a7823358c3f352ea29a617844636","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/383d516a0ebc8641372b521c8cb717f0f1834831","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e563b01208f4d1f609bcab13333b6c0e24ce6a01","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://project-zero.issues.chromium.org/issues/395107243","tags":["exploit","issue-tracking","third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-265688.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-21704","url":"https://www.cve.org/CVERecord?id=CVE-2025-21704","licence":"CVE Terms of Use","modified":"2026-10-15T01:03:26.561Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-21704","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-21704","licence":"Public domain","modified":"2026-10-15T02:17:28.313Z"}],"updatedAt":"2026-11-25T22:58:54.226Z","epss":{"score":0.00354,"percentile":0.2155,"date":"2026-11-30T12:00:22.000Z"}}