Skip to main content

CVE-2024-56719: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-56719cvecve-2024-56719
Published: Sun Dec 29 2024 (12/29/2024, 08:48:51 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: net: stmmac: fix TSO DMA API usage causing oops Commit 66600fac7a98 ("net: stmmac: TSO: Fix unbalanced DMA map/unmap for non-paged SKB data") moved the assignment of tx_skbuff_dma[]'s members to be later in stmmac_tso_xmit(). The buf (dma cookie) and len stored in this structure are passed to dma_unmap_single() by stmmac_tx_clean(). The DMA API requires that the dma cookie passed to dma_unmap_single() is the same as the value returned from dma_map_single(). However, by moving the assignment later, this is not the case when priv->dma_cap.addr64 > 32 as "des" is offset by proto_hdr_len. This causes problems such as: dwc-eth-dwmac 2490000.ethernet eth0: Tx DMA map failed and with DMA_API_DEBUG enabled: DMA-API: dwc-eth-dwmac 2490000.ethernet: device driver tries to +free DMA memory it has not allocated [device address=0x000000ffffcf65c0] [size=66 bytes] Fix this by maintaining "des" as the original DMA cookie, and use tso_des to pass the offset DMA cookie to stmmac_tso_allocator(). Full details of the crashes can be found at: https://lore.kernel.org/all/d8112193-0386-4e14-b516-37c2d838171a@nvidia.com/ https://lore.kernel.org/all/klkzp5yn5kq5efgtrow6wbvnc46bcqfxs65nz3qy77ujr5turc@bwwhelz2l4dw/

AI-Powered Analysis

AILast updated: 06/27/2025, 22:42:39 UTC

Technical Analysis

CVE-2024-56719 is a vulnerability identified in the Linux kernel's network subsystem, specifically within the stmmac Ethernet driver responsible for handling the TSO (TCP Segmentation Offload) DMA API usage. The issue arises from improper handling of DMA mapping and unmapping operations in the stmmac_tso_xmit() function. A commit (66600fac7a98) changed the timing of when the tx_skbuff_dma[] structure members are assigned, causing a mismatch between the DMA cookie passed to dma_unmap_single() and the original value returned by dma_map_single(). This mismatch occurs particularly when the device's DMA addressing capability exceeds 32 bits (priv->dma_cap.addr64 > 32), due to an offset applied to the DMA cookie by proto_hdr_len. The consequence is that the driver attempts to unmap DMA memory that it did not allocate, leading to errors such as "Tx DMA map failed" and debug messages indicating attempts to free unallocated DMA memory. This can cause kernel oops or crashes, impacting network functionality and system stability. The fix involves preserving the original DMA cookie in the "des" variable and using a separate offset DMA cookie (tso_des) for allocation, ensuring correct pairing of map/unmap calls. No known exploits are reported in the wild, and no CVSS score has been assigned yet. The vulnerability affects multiple Linux kernel versions identified by specific commit hashes. Detailed technical discussion and crash reports are available in linked kernel mailing list archives.

Potential Impact

For European organizations relying on Linux-based systems, especially those using embedded devices, servers, or network appliances with stmmac Ethernet controllers, this vulnerability could lead to network interface instability or kernel crashes. Such disruptions may cause denial of service conditions, impacting availability of critical services. In environments where high network throughput and reliability are essential—such as telecommunications, financial services, and industrial control systems—this could degrade operational continuity. Although exploitation does not appear to allow privilege escalation or data leakage directly, the instability and potential for repeated kernel faults could be leveraged by attackers to disrupt services or cause cascading failures. Organizations with large-scale Linux deployments or those using custom kernels incorporating affected commits are at higher risk. The lack of requirement for user interaction or authentication means that any network traffic triggering the flawed TSO DMA handling could provoke the issue, increasing exposure. However, the need for specific hardware and driver configurations limits the scope somewhat.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernels to versions containing the fix for CVE-2024-56719 as soon as patches are available from their Linux distribution vendors or upstream kernel sources. For embedded or custom Linux systems, recompiling the kernel with the corrected stmmac driver code is necessary. Network administrators should audit their hardware inventory to identify devices using stmmac Ethernet controllers with DMA capabilities exceeding 32 bits, as these are most susceptible. Enabling kernel debugging and DMA API debug features temporarily can help detect improper DMA unmap attempts during testing phases. Where immediate patching is not feasible, organizations can consider disabling TSO offloading on affected interfaces as a temporary workaround, though this may reduce network performance. Rigorous testing in staging environments is recommended before deploying updates to production, to ensure stability and compatibility. Monitoring kernel logs for DMA-related errors can provide early warning of exploitation attempts or instability. Coordination with hardware vendors and Linux distribution maintainers will facilitate timely patch deployment.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-12-27T15:00:39.858Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9820c4522896dcbdd188

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

Last enriched: 6/27/2025, 10:42:39 PM

Last updated: 8/14/2025, 2:13:27 PM

Views: 16

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