Skip to main content

CVE-2024-40904: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-40904cvecve-2024-40904
Published: Fri Jul 12 2024 (07/12/2024, 12:20:45 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: USB: class: cdc-wdm: Fix CPU lockup caused by excessive log messages The syzbot fuzzer found that the interrupt-URB completion callback in the cdc-wdm driver was taking too long, and the driver's immediate resubmission of interrupt URBs with -EPROTO status combined with the dummy-hcd emulation to cause a CPU lockup: cdc_wdm 1-1:1.0: nonzero urb status received: -71 cdc_wdm 1-1:1.0: wdm_int_callback - 0 bytes watchdog: BUG: soft lockup - CPU#0 stuck for 26s! [syz-executor782:6625] CPU#0 Utilization every 4s during lockup: #1: 98% system, 0% softirq, 3% hardirq, 0% idle #2: 98% system, 0% softirq, 3% hardirq, 0% idle #3: 98% system, 0% softirq, 3% hardirq, 0% idle #4: 98% system, 0% softirq, 3% hardirq, 0% idle #5: 98% system, 1% softirq, 3% hardirq, 0% idle Modules linked in: irq event stamp: 73096 hardirqs last enabled at (73095): [<ffff80008037bc00>] console_emit_next_record kernel/printk/printk.c:2935 [inline] hardirqs last enabled at (73095): [<ffff80008037bc00>] console_flush_all+0x650/0xb74 kernel/printk/printk.c:2994 hardirqs last disabled at (73096): [<ffff80008af10b00>] __el1_irq arch/arm64/kernel/entry-common.c:533 [inline] hardirqs last disabled at (73096): [<ffff80008af10b00>] el1_interrupt+0x24/0x68 arch/arm64/kernel/entry-common.c:551 softirqs last enabled at (73048): [<ffff8000801ea530>] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (73048): [<ffff8000801ea530>] handle_softirqs+0xa60/0xc34 kernel/softirq.c:582 softirqs last disabled at (73043): [<ffff800080020de8>] __do_softirq+0x14/0x20 kernel/softirq.c:588 CPU: 0 PID: 6625 Comm: syz-executor782 Tainted: G W 6.10.0-rc2-syzkaller-g8867bbd4a056 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Testing showed that the problem did not occur if the two error messages -- the first two lines above -- were removed; apparently adding material to the kernel log takes a surprisingly large amount of time. In any case, the best approach for preventing these lockups and to avoid spamming the log with thousands of error messages per second is to ratelimit the two dev_err() calls. Therefore we replace them with dev_err_ratelimited().

AI-Powered Analysis

AILast updated: 06/29/2025, 12:57:06 UTC

Technical Analysis

CVE-2024-40904 is a vulnerability identified in the Linux kernel's USB subsystem, specifically within the cdc-wdm driver which handles USB CDC (Communications Device Class) WDM (Wireless Device Management) devices. The issue was discovered through fuzz testing by syzbot, which revealed that the interrupt-URB (USB Request Block) completion callback in the cdc-wdm driver could cause a CPU lockup. This occurs because the driver immediately resubmits interrupt URBs with a -EPROTO status code, which combined with dummy-hcd emulation, leads to excessive logging of error messages. The logging itself is time-consuming and results in a soft lockup where the CPU is stuck in a high utilization state (approximately 98% system CPU usage) for extended periods (e.g., 26 seconds), effectively freezing the system. The root cause is the unthrottled dev_err() calls that flood the kernel log with thousands of error messages per second, causing the CPU to be overwhelmed. The fix implemented involves replacing these dev_err() calls with dev_err_ratelimited(), which rate-limits the error messages and prevents the CPU lockup by reducing the logging overhead. This vulnerability affects Linux kernel versions prior to the patch and is particularly relevant for systems using the cdc-wdm driver, which is common in devices that manage cellular modems and other wireless communication hardware over USB. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, the impact of CVE-2024-40904 can be significant in environments where Linux systems interface with cellular modems or wireless communication devices via USB, such as in telecommunications infrastructure, IoT gateways, industrial control systems, and mobile network equipment. A CPU lockup can lead to system unavailability, disrupting critical services and operations. This could affect network reliability, data transmission, and device management, potentially causing downtime in sectors like telecommunications, manufacturing, transportation, and public services. The lockup does not appear to allow privilege escalation or direct data compromise but impacts system availability and stability, which can have cascading effects on business continuity and operational technology environments. Given the widespread use of Linux in servers, embedded systems, and network devices across Europe, failure to patch this vulnerability could expose organizations to denial-of-service conditions triggered by USB device interactions or fuzzing attacks targeting the cdc-wdm driver.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernels to versions that include the patch replacing dev_err() with dev_err_ratelimited() in the cdc-wdm driver. Specifically, kernel maintainers and system administrators should monitor official Linux kernel releases and backport patches to long-term support (LTS) kernels where applicable. Additionally, organizations should audit their systems to identify devices using the cdc-wdm driver, particularly those managing cellular modems or wireless USB devices. Where possible, limit or control USB device connections to trusted hardware to reduce exposure. Implement kernel logging rate-limiting configurations and monitor kernel logs for unusual error message flooding that could indicate attempts to trigger this vulnerability. In environments where kernel updates are delayed, consider disabling or unloading the cdc-wdm driver if it is not required, or isolating affected systems to minimize impact. Finally, integrate this vulnerability into incident response and patch management workflows to ensure timely remediation.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-07-12T12:17:45.579Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9829c4522896dcbe2dfd

Added to database: 5/21/2025, 9:08:57 AM

Last enriched: 6/29/2025, 12:57:06 PM

Last updated: 8/2/2025, 5:02:10 AM

Views: 17

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats