CVE-2024-40970: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: Avoid hw_desc array overrun in dw-axi-dmac I have a use case where nr_buffers = 3 and in which each descriptor is composed by 3 segments, resulting in the DMA channel descs_allocated to be 9. Since axi_desc_put() handles the hw_desc considering the descs_allocated, this scenario would result in a kernel panic (hw_desc array will be overrun). To fix this, the proposal is to add a new member to the axi_dma_desc structure, where we keep the number of allocated hw_descs (axi_desc_alloc()) and use it in axi_desc_put() to handle the hw_desc array correctly. Additionally I propose to remove the axi_chan_start_first_queued() call after completing the transfer, since it was identified that unbalance can occur (started descriptors can be interrupted and transfer ignored due to DMA channel not being enabled).
AI Analysis
Technical Summary
CVE-2024-40970 is a vulnerability identified in the Linux kernel specifically related to the dw-axi-dmac (AXI DMA controller) driver. The issue arises from an overrun of the hw_desc array, which is used to manage hardware descriptors for DMA operations. In the described scenario, when the number of buffers (nr_buffers) is set to 3 and each descriptor consists of 3 segments, the total allocated DMA channel descriptors (descs_allocated) becomes 9. The function axi_desc_put() incorrectly handles the hw_desc array based on descs_allocated, leading to an out-of-bounds access and ultimately causing a kernel panic. This vulnerability is a classic buffer overrun issue within kernel memory management for DMA descriptors. The proposed fix involves adding a new member to the axi_dma_desc structure to track the exact number of allocated hw_descs and using this count in axi_desc_put() to prevent overruns. Additionally, the patch removes the call to axi_chan_start_first_queued() after transfer completion to avoid unbalanced states where started descriptors might be interrupted and transfers ignored due to the DMA channel not being enabled. This vulnerability can cause system instability and denial of service (DoS) through kernel panics triggered by malformed or unexpected DMA descriptor configurations. No known exploits are currently reported in the wild, and the vulnerability was published on July 12, 2024.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running affected Linux kernel versions with the dw-axi-dmac driver enabled, which is common in embedded systems, industrial control devices, and certain server environments using AXI DMA controllers. Exploitation could lead to kernel panics causing system crashes and denial of service, impacting availability of critical infrastructure, manufacturing systems, or cloud services relying on affected Linux kernels. Confidentiality and integrity impacts are limited as the vulnerability does not directly allow code execution or privilege escalation, but repeated crashes could disrupt operations and lead to downtime. Organizations in sectors such as manufacturing, telecommunications, and cloud service providers in Europe that deploy Linux-based embedded or specialized hardware are particularly at risk. The lack of known exploits reduces immediate threat but patching is critical to prevent potential future exploitation or accidental triggering of the bug.
Mitigation Recommendations
1. Apply the official Linux kernel patches addressing CVE-2024-40970 as soon as they become available from trusted sources or Linux distribution vendors. 2. For embedded or industrial systems using the dw-axi-dmac driver, verify kernel versions and update firmware or kernel images accordingly. 3. Conduct thorough testing of DMA-related subsystems after patching to ensure stability and correct descriptor handling. 4. Implement monitoring for kernel panics and system crashes related to DMA operations to detect potential exploitation or accidental triggers. 5. Limit access to systems running vulnerable kernels to trusted users and networks to reduce risk of malicious triggering. 6. For critical infrastructure, consider deploying redundant systems or failover mechanisms to maintain availability during patching or in case of crashes. 7. Engage with Linux distribution maintainers or vendors to confirm patch availability and backporting for long-term support kernels used in production environments.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Poland, Sweden
CVE-2024-40970: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: Avoid hw_desc array overrun in dw-axi-dmac I have a use case where nr_buffers = 3 and in which each descriptor is composed by 3 segments, resulting in the DMA channel descs_allocated to be 9. Since axi_desc_put() handles the hw_desc considering the descs_allocated, this scenario would result in a kernel panic (hw_desc array will be overrun). To fix this, the proposal is to add a new member to the axi_dma_desc structure, where we keep the number of allocated hw_descs (axi_desc_alloc()) and use it in axi_desc_put() to handle the hw_desc array correctly. Additionally I propose to remove the axi_chan_start_first_queued() call after completing the transfer, since it was identified that unbalance can occur (started descriptors can be interrupted and transfer ignored due to DMA channel not being enabled).
AI-Powered Analysis
Technical Analysis
CVE-2024-40970 is a vulnerability identified in the Linux kernel specifically related to the dw-axi-dmac (AXI DMA controller) driver. The issue arises from an overrun of the hw_desc array, which is used to manage hardware descriptors for DMA operations. In the described scenario, when the number of buffers (nr_buffers) is set to 3 and each descriptor consists of 3 segments, the total allocated DMA channel descriptors (descs_allocated) becomes 9. The function axi_desc_put() incorrectly handles the hw_desc array based on descs_allocated, leading to an out-of-bounds access and ultimately causing a kernel panic. This vulnerability is a classic buffer overrun issue within kernel memory management for DMA descriptors. The proposed fix involves adding a new member to the axi_dma_desc structure to track the exact number of allocated hw_descs and using this count in axi_desc_put() to prevent overruns. Additionally, the patch removes the call to axi_chan_start_first_queued() after transfer completion to avoid unbalanced states where started descriptors might be interrupted and transfers ignored due to the DMA channel not being enabled. This vulnerability can cause system instability and denial of service (DoS) through kernel panics triggered by malformed or unexpected DMA descriptor configurations. No known exploits are currently reported in the wild, and the vulnerability was published on July 12, 2024.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running affected Linux kernel versions with the dw-axi-dmac driver enabled, which is common in embedded systems, industrial control devices, and certain server environments using AXI DMA controllers. Exploitation could lead to kernel panics causing system crashes and denial of service, impacting availability of critical infrastructure, manufacturing systems, or cloud services relying on affected Linux kernels. Confidentiality and integrity impacts are limited as the vulnerability does not directly allow code execution or privilege escalation, but repeated crashes could disrupt operations and lead to downtime. Organizations in sectors such as manufacturing, telecommunications, and cloud service providers in Europe that deploy Linux-based embedded or specialized hardware are particularly at risk. The lack of known exploits reduces immediate threat but patching is critical to prevent potential future exploitation or accidental triggering of the bug.
Mitigation Recommendations
1. Apply the official Linux kernel patches addressing CVE-2024-40970 as soon as they become available from trusted sources or Linux distribution vendors. 2. For embedded or industrial systems using the dw-axi-dmac driver, verify kernel versions and update firmware or kernel images accordingly. 3. Conduct thorough testing of DMA-related subsystems after patching to ensure stability and correct descriptor handling. 4. Implement monitoring for kernel panics and system crashes related to DMA operations to detect potential exploitation or accidental triggers. 5. Limit access to systems running vulnerable kernels to trusted users and networks to reduce risk of malicious triggering. 6. For critical infrastructure, consider deploying redundant systems or failover mechanisms to maintain availability during patching or in case of crashes. 7. Engage with Linux distribution maintainers or vendors to confirm patch availability and backporting for long-term support kernels used in production environments.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-07-12T12:17:45.603Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9827c4522896dcbe152d
Added to database: 5/21/2025, 9:08:55 AM
Last enriched: 6/29/2025, 2:56:00 AM
Last updated: 8/17/2025, 11:11:14 AM
Views: 12
Related Threats
CVE-2025-9119: Cross Site Scripting in Netis WF2419
MediumCVE-2025-8098: CWE-276: Incorrect Default Permissions in Lenovo PC Manager
HighCVE-2025-53192: CWE-146 Improper Neutralization of Expression/Command Delimiters in Apache Software Foundation Apache Commons OGNL
HighCVE-2025-4371: CWE-347: Improper Verification of Cryptographic Signature in Lenovo 510 FHD Webcam
HighCVE-2025-32992: n/a
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.