Skip to main content

CVE-2024-26749: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-26749cvecve-2024-26749
Published: Wed Apr 03 2024 (04/03/2024, 17:00:35 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: usb: cdns3: fixed memory use after free at cdns3_gadget_ep_disable() ... cdns3_gadget_ep_free_request(&priv_ep->endpoint, &priv_req->request); list_del_init(&priv_req->list); ... 'priv_req' actually free at cdns3_gadget_ep_free_request(). But list_del_init() use priv_req->list after it. [ 1542.642868][ T534] BUG: KFENCE: use-after-free read in __list_del_entry_valid+0x10/0xd4 [ 1542.642868][ T534] [ 1542.653162][ T534] Use-after-free read at 0x000000009ed0ba99 (in kfence-#3): [ 1542.660311][ T534] __list_del_entry_valid+0x10/0xd4 [ 1542.665375][ T534] cdns3_gadget_ep_disable+0x1f8/0x388 [cdns3] [ 1542.671571][ T534] usb_ep_disable+0x44/0xe4 [ 1542.675948][ T534] ffs_func_eps_disable+0x64/0xc8 [ 1542.680839][ T534] ffs_func_set_alt+0x74/0x368 [ 1542.685478][ T534] ffs_func_disable+0x18/0x28 Move list_del_init() before cdns3_gadget_ep_free_request() to resolve this problem.

AI-Powered Analysis

AILast updated: 06/29/2025, 18:10:35 UTC

Technical Analysis

CVE-2024-26749 is a use-after-free vulnerability identified in the Linux kernel's USB gadget driver for Cadence USB 3 (cdns3). The flaw occurs in the function cdns3_gadget_ep_disable(), which is responsible for disabling USB endpoints. Specifically, the vulnerability arises due to incorrect ordering of operations: the function cdns3_gadget_ep_free_request() frees a memory structure pointed to by 'priv_req', but immediately after, list_del_init() is called on priv_req->list, which accesses memory that has already been freed. This results in a use-after-free condition, which can lead to undefined behavior including kernel crashes, memory corruption, or potential escalation of privileges if exploited. The kernel's Kernel Electric Fence (KFENCE) debugging tool detected this bug, confirming the use-after-free read in the linked list deletion routine. The fix involves reordering the calls so that list_del_init() is executed before the memory is freed, preventing access to freed memory. This vulnerability affects versions of the Linux kernel containing the vulnerable cdns3 USB gadget driver code prior to the patch. No known exploits are reported in the wild as of the publication date. The vulnerability is technical and low-level, impacting the USB gadget subsystem used primarily in embedded or specialized Linux systems that implement USB device functionality via the cdns3 controller driver.

Potential Impact

For European organizations, the impact of CVE-2024-26749 depends largely on their use of Linux systems with the affected cdns3 USB gadget driver. This driver is typically found in embedded devices, IoT devices, or specialized hardware that uses the Cadence USB 3 controller to present USB device endpoints. Organizations deploying such devices in industrial control systems, telecommunications infrastructure, or specialized computing environments may be at risk. Exploitation could lead to kernel crashes causing denial of service or, in worst cases, privilege escalation allowing attackers to gain higher-level access to the system. This could compromise confidentiality, integrity, and availability of affected devices. Given the kernel-level nature of the flaw, successful exploitation could undermine the security of critical infrastructure or sensitive data processed by these devices. However, the lack of known exploits and the specialized nature of the affected driver somewhat limits the immediate widespread impact. Nonetheless, organizations using embedded Linux devices with this USB controller should prioritize patching to avoid potential targeted attacks.

Mitigation Recommendations

1. Apply the official Linux kernel patches that reorder the list_del_init() and cdns3_gadget_ep_free_request() calls to eliminate the use-after-free condition. Monitor Linux kernel mailing lists and distributions for updates addressing CVE-2024-26749. 2. Identify and inventory all devices running Linux kernels with the cdns3 USB gadget driver, particularly embedded and IoT devices, and verify their kernel versions. 3. For devices that cannot be immediately patched, consider disabling USB gadget functionality if not required, or restrict physical and logical access to USB interfaces to reduce attack surface. 4. Employ kernel hardening techniques such as Kernel Electric Fence (KFENCE), Kernel Address Sanitizer (KASAN), or other memory safety tools during development and testing to detect similar issues early. 5. Monitor system logs for unusual kernel errors or crashes related to USB gadget endpoints, which may indicate attempted exploitation. 6. Collaborate with device vendors to ensure timely firmware and kernel updates are provided and applied. 7. Implement network segmentation and strict access controls around devices with embedded Linux to limit potential lateral movement if compromise occurs.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-02-19T14:20:24.169Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d982ac4522896dcbe3a1f

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

Last enriched: 6/29/2025, 6:10:35 PM

Last updated: 8/9/2025, 4:08:11 AM

Views: 8

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