Cloudanix VulnDB

CVE-2025-21704

High · 7.8

CVSS

7.8

EPSS

0.4%

Published

Feb 22, 2025

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A bug in the way Linux processes messages from certain USB devices can let an attacker corrupt memory and potentially take control of the computer if they can interact with those devices.

Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
Low
Impact
Full Compromise
Component
OS kernel
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Medium

What it actually does

Insufficient buffer size validation in the CDC-ACM USB driver allows out-of-bounds memory access when reassembling fragmented control notifications, leading to integer wrap-around and memory corruption on subsequent fragments.

Why it matters to the business

Attackers with local access or the ability to trigger USB device interactions can achieve privilege escalation and full system compromise on affected Linux kernels; prevalence in servers, containers, and desktops using USB modems increases exposure, with automatic opening by ModemManager removing a key mitigation.

How an attack unfolds

An attacker supplies a malicious or malformed USB CDC notification split across fragments where the initial fragment is shorter than expected; the driver skips the size check, miscalculates expected_size, and performs unsafe memory operations when the size decreases, resulting in corruption after userspace opens the ttyACM device.

How to fix it

Update the Linux kernel to commit a4e1ae5c0533964170197e4fb4f33bc8c1db5cd2 or later stable releases that include the buffer size check; for Bitnami mariadb deployments, upgrade to version 10.1.48 or newer containing the fixed kernel.

How to confirm the fix worked

Confirm the running kernel contains commit a4e1ae5c0533964170197e4fb4f33bc8c1db5cd2; test by attaching a CDC-ACM device and verifying no error logs or crashes occur on notification receipt; review dmesg for the new size-check error message.

Typical attack path

  1. Attach or emulate a USB CDC-ACM device that sends fragmented notifications
  2. Ensure /dev/ttyACM* is opened (via ModemManager or direct access)
  3. Deliver short first fragment followed by subsequent fragments that trigger size wrap-around
  4. Leverage resulting memory corruption for privilege escalation or code execution

How to detect it

Search kernel logs for cdc-acm error messages about short fragments or notification handling; inspect dmesg and syslog around USB attach events; correlate with processes opening /dev/ttyACM* such as ModemManager.

What your security team should do

  • Apply the kernel fix immediately on all systems exposing ttyACM devices
  • Disable or restrict ModemManager where USB CDC-ACM devices are not required
  • Monitor for new kernel releases and schedule staged rollouts given the 613-day publication window
  • Audit environments for USB device attachment policies to reduce local attack surface

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 linux 0 No fix
Debian:11 linux-6.1 0 6.1.129-1~deb11u1
Debian:12 linux 0 No fix
Debian:13 linux 0 No fix
Debian:13 linux 0 6.12.16-1
Linux Kernel 2.6.12 5.4.291
SUSE:Linux Enterprise High Availability Extension 15 SP6 kernel-default 0 6.4.0-150600.23.47.2
SUSE:Linux Enterprise Live Patching 12 SP5 kernel-default 0 4.12.14-122.261.1
SUSE:Linux Enterprise Live Patching 12 SP5 kgraft-patch-SLE12-SP5_Update_69 0 1-8.3.1
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-default 0 6.4.0-150600.23.47.2
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-livepatch-SLE15-SP6-RT_Update_10 0 1-150600.1.5.1
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-livepatch-SLE15-SP6_Update_10 0 1-150600.13.5.1
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-64kb 0 6.4.0-150600.23.47.2
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-default 0 6.4.0-150600.23.47.2
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-default-base 0 6.4.0-150600.23.47.2.150600.12.20.2
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-source 0 6.4.0-150600.23.47.2
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-zfcpdump 0 6.4.0-150600.23.47.2
SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 kernel-coco 0 6.4.0-15061.21.coco15sp6.1
SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 kernel-coco_debug 0 6.4.0-15061.21.coco15sp6.1
SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 kernel-source-coco 0 6.4.0-15061.21.coco15sp6.1
SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 kernel-syms-coco 0 6.4.0-15061.21.coco15sp6.1
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-docs 0 6.4.0-150600.23.47.1
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-obs-build 0 6.4.0-150600.23.47.1
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-source 0 6.4.0-150600.23.47.2
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-syms 0 6.4.0-150600.23.47.1
SUSE:Linux Enterprise Module for Legacy 15 SP6 kernel-default 0 6.4.0-150600.23.47.2
SUSE:Linux Enterprise Module for Public Cloud 15 SP6 kernel-azure 0 6.4.0-150600.8.34.2
SUSE:Linux Enterprise Module for Public Cloud 15 SP6 kernel-source-azure 0 6.4.0-150600.8.34.2
SUSE:Linux Enterprise Module for Public Cloud 15 SP6 kernel-syms-azure 0 6.4.0-150600.8.34.1
SUSE:Linux Enterprise Server 12 SP5-LTSS kernel-default 0 4.12.14-122.261.1
SUSE:Linux Enterprise Server 12 SP5-LTSS kernel-source 0 4.12.14-122.261.1
SUSE:Linux Enterprise Server 12 SP5-LTSS kernel-syms 0 4.12.14-122.261.1
SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 kernel-default 0 4.12.14-122.261.1
SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 kernel-source 0 4.12.14-122.261.1
SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 kernel-syms 0 4.12.14-122.261.1
SUSE:Linux Enterprise Workstation Extension 15 SP6 kernel-default 0 6.4.0-150600.23.47.2
SUSE:Real Time Module 15 SP6 kernel-rt 0 6.4.0-150600.10.34.1
SUSE:Real Time Module 15 SP6 kernel-rt_debug 0 6.4.0-150600.10.34.1
SUSE:Real Time Module 15 SP6 kernel-source-rt 0 6.4.0-150600.10.34.1
SUSE:Real Time Module 15 SP6 kernel-syms-rt 0 6.4.0-150600.10.34.1
Ubuntu:24.10 linux-aws 0 6.11.0-1014.15
openSUSE:Leap 15.6 dtb-aarch64 0 6.4.0-150600.23.47.1
openSUSE:Leap 15.6 kernel-64kb 0 6.4.0-150600.23.47.2
openSUSE:Leap 15.6 kernel-azure 0 6.4.0-150600.8.34.2
openSUSE:Leap 15.6 kernel-debug 0 6.4.0-150600.23.47.2
openSUSE:Leap 15.6 kernel-default 0 6.4.0-150600.23.47.2
openSUSE:Leap 15.6 kernel-default-base 0 6.4.0-150600.23.47.2.150600.12.20.2
openSUSE:Leap 15.6 kernel-docs 0 6.4.0-150600.23.47.1
openSUSE:Leap 15.6 kernel-kvmsmall 0 6.4.0-150600.23.47.2
openSUSE:Leap 15.6 kernel-obs-build 0 6.4.0-150600.23.47.1
openSUSE:Leap 15.6 kernel-obs-qa 0 6.4.0-150600.23.47.1
openSUSE:Leap 15.6 kernel-rt 0 6.4.0-150600.10.34.1
openSUSE:Leap 15.6 kernel-rt_debug 0 6.4.0-150600.10.34.1
openSUSE:Leap 15.6 kernel-source 0 6.4.0-150600.23.47.2
openSUSE:Leap 15.6 kernel-source-azure 0 6.4.0-150600.8.34.2
openSUSE:Leap 15.6 kernel-source-rt 0 6.4.0-150600.10.34.1
openSUSE:Leap 15.6 kernel-syms 0 6.4.0-150600.23.47.1
openSUSE:Leap 15.6 kernel-syms-azure 0 6.4.0-150600.8.34.1
openSUSE:Leap 15.6 kernel-syms-rt 0 6.4.0-150600.10.34.1
openSUSE:Leap 15.6 kernel-zfcpdump 0 6.4.0-150600.23.47.2

Related vulnerabilities