Skip to main content

CVE-2024-42127: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-42127cvecve-2024-42127
Published: Tue Jul 30 2024 (07/30/2024, 07:46:24 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: drm/lima: fix shared irq handling on driver remove lima uses a shared interrupt, so the interrupt handlers must be prepared to be called at any time. At driver removal time, the clocks are disabled early and the interrupts stay registered until the very end of the remove process due to the devm usage. This is potentially a bug as the interrupts access device registers which assumes clocks are enabled. A crash can be triggered by removing the driver in a kernel with CONFIG_DEBUG_SHIRQ enabled. This patch frees the interrupts at each lima device finishing callback so that the handlers are already unregistered by the time we fully disable clocks.

AI-Powered Analysis

AILast updated: 06/29/2025, 05:27:17 UTC

Technical Analysis

CVE-2024-42127 is a vulnerability identified in the Linux kernel specifically affecting the lima DRM (Direct Rendering Manager) driver, which is used for managing graphics on certain ARM Mali GPUs. The issue arises from the handling of shared interrupts during the driver removal process. The lima driver uses a shared interrupt line, meaning multiple devices or drivers share the same interrupt request (IRQ). Proper handling requires that interrupt handlers remain ready to be invoked at any time. However, during driver removal, the clocks controlling the device are disabled early, while the interrupt handlers remain registered until the very end due to the use of devm (device-managed resources). This sequence creates a race condition where interrupts can still be triggered after the clocks are disabled, leading to the interrupt handlers accessing device registers that are no longer powered. This can cause a kernel crash or system instability, especially when the kernel is compiled with CONFIG_DEBUG_SHIRQ enabled, which is a debugging feature that checks shared IRQ handling correctness. The patch for this vulnerability changes the driver removal sequence to free the interrupts earlier in the lima device finishing callback, ensuring that interrupt handlers are unregistered before clocks are disabled, thus preventing invalid register access and potential crashes. This vulnerability does not appear to have known exploits in the wild as of now and is primarily a stability and denial-of-service risk rather than a direct code execution or privilege escalation vector.

Potential Impact

For European organizations, the impact of CVE-2024-42127 primarily relates to system stability and availability. Systems running Linux kernels with the affected lima driver, particularly those using ARM Mali GPUs in embedded devices, IoT, or specialized computing environments, may experience kernel crashes or reboots during driver removal or updates. This can lead to service interruptions, especially in environments where uptime is critical such as industrial control systems, telecommunications infrastructure, or edge computing nodes. Although this vulnerability does not directly expose confidentiality or integrity risks, repeated crashes could cause denial-of-service conditions, impacting operational continuity. Organizations relying on Linux-based devices with ARM Mali GPUs should be aware of potential disruptions during maintenance or driver updates. Since no known exploits exist, the immediate risk is moderate, but unpatched systems remain vulnerable to accidental or maliciously induced crashes.

Mitigation Recommendations

To mitigate CVE-2024-42127, European organizations should: 1) Apply the official Linux kernel patch that adjusts the interrupt freeing sequence in the lima driver to ensure interrupts are unregistered before clocks are disabled. 2) Update Linux kernel versions to those including this fix as soon as they become available from trusted distributions or vendors. 3) For environments where kernel updates are delayed, avoid removing or reloading the lima driver dynamically, especially on production systems, to reduce the risk of triggering the crash. 4) Enable and monitor kernel logs for any unusual interrupt handling or driver removal errors to detect potential exploitation attempts or accidental crashes. 5) In development or testing environments, enable CONFIG_DEBUG_SHIRQ to identify shared IRQ handling issues proactively. 6) Coordinate with hardware and software vendors to ensure embedded devices using ARM Mali GPUs receive timely firmware and kernel updates incorporating this fix. 7) Implement robust backup and recovery procedures to minimize downtime in case of crashes.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-07-29T15:50:41.184Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9827c4522896dcbe1b15

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

Last enriched: 6/29/2025, 5:27:17 AM

Last updated: 8/1/2025, 10:19:38 AM

Views: 11

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