Skip to main content

CVE-2024-40903: Vulnerability in Linux Linux

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

Description

In the Linux kernel, the following vulnerability has been resolved: usb: typec: tcpm: fix use-after-free case in tcpm_register_source_caps There could be a potential use-after-free case in tcpm_register_source_caps(). This could happen when: * new (say invalid) source caps are advertised * the existing source caps are unregistered * tcpm_register_source_caps() returns with an error as usb_power_delivery_register_capabilities() fails This causes port->partner_source_caps to hold on to the now freed source caps. Reset port->partner_source_caps value to NULL after unregistering existing source caps.

AI-Powered Analysis

AILast updated: 06/28/2025, 04:10:06 UTC

Technical Analysis

CVE-2024-40903 is a use-after-free vulnerability identified in the Linux kernel's USB Type-C Port Manager (TCPM) subsystem, specifically within the function tcpm_register_source_caps(). This function is responsible for managing the registration of USB Power Delivery (USB PD) source capabilities, which are the power profiles a USB Type-C port can advertise to connected devices. The vulnerability arises when new source capabilities, potentially invalid, are advertised while existing source capabilities are being unregistered. If the call to usb_power_delivery_register_capabilities() fails during this process, tcpm_register_source_caps() returns an error but fails to reset the pointer port->partner_source_caps to NULL. Consequently, this pointer continues to reference memory that has already been freed, leading to a use-after-free condition. This flaw could be exploited by an attacker who can manipulate USB PD source capabilities, potentially causing kernel memory corruption, system instability, or even privilege escalation if exploited successfully. The vulnerability affects multiple Linux kernel versions identified by specific commit hashes, indicating it is present in recent kernel builds prior to the patch. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet. The patch involves resetting the port->partner_source_caps pointer to NULL after unregistering existing source capabilities to prevent dangling references.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to systems running vulnerable Linux kernel versions with USB Type-C support enabled. Given the widespread use of Linux in servers, desktops, and embedded devices across Europe, especially in sectors such as telecommunications, finance, government, and critical infrastructure, exploitation could lead to system crashes or unauthorized code execution at the kernel level. This could result in denial of service or potential privilege escalation, compromising confidentiality, integrity, and availability of affected systems. The threat is particularly relevant for organizations that rely on USB Type-C peripherals or power delivery features, including laptops, IoT devices, and industrial control systems. While no active exploitation is known, the vulnerability could be leveraged in targeted attacks or as part of a multi-stage exploit chain. The impact is heightened in environments where physical access or USB device connection is possible, such as corporate offices, data centers, or public access points.

Mitigation Recommendations

European organizations should promptly apply the official Linux kernel patches that address CVE-2024-40903 once available. In the interim, they should audit and inventory systems running vulnerable kernel versions, especially those with USB Type-C ports enabled. Disabling USB Type-C Power Delivery features or restricting USB port usage via endpoint security controls can reduce attack surface. Implement strict USB device whitelisting policies and employ USB port control solutions to prevent unauthorized device connections. Monitoring kernel logs for unusual USB PD activity and anomalous error messages related to tcpm_register_source_caps can aid in early detection. For critical systems, consider deploying kernel integrity monitoring and exploit mitigation technologies such as Kernel Page Table Isolation (KPTI) and Control Flow Integrity (CFI). Regularly update Linux distributions and maintain a robust patch management process. Additionally, educate IT staff about the risks associated with USB device connections and enforce physical security controls to limit unauthorized access to USB ports.

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: 682d9821c4522896dcbdde72

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

Last enriched: 6/28/2025, 4:10:06 AM

Last updated: 8/11/2025, 9:37:24 AM

Views: 18

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