Skip to main content

CVE-2024-39479: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-39479cvecve-2024-39479
Published: Fri Jul 05 2024 (07/05/2024, 06:55:08 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: drm/i915/hwmon: Get rid of devm When both hwmon and hwmon drvdata (on which hwmon depends) are device managed resources, the expectation, on device unbind, is that hwmon will be released before drvdata. However, in i915 there are two separate code paths, which both release either drvdata or hwmon and either can be released before the other. These code paths (for device unbind) are as follows (see also the bug referenced below): Call Trace: release_nodes+0x11/0x70 devres_release_group+0xb2/0x110 component_unbind_all+0x8d/0xa0 component_del+0xa5/0x140 intel_pxp_tee_component_fini+0x29/0x40 [i915] intel_pxp_fini+0x33/0x80 [i915] i915_driver_remove+0x4c/0x120 [i915] i915_pci_remove+0x19/0x30 [i915] pci_device_remove+0x32/0xa0 device_release_driver_internal+0x19c/0x200 unbind_store+0x9c/0xb0 and Call Trace: release_nodes+0x11/0x70 devres_release_all+0x8a/0xc0 device_unbind_cleanup+0x9/0x70 device_release_driver_internal+0x1c1/0x200 unbind_store+0x9c/0xb0 This means that in i915, if use devm, we cannot gurantee that hwmon will always be released before drvdata. Which means that we have a uaf if hwmon sysfs is accessed when drvdata has been released but hwmon hasn't. The only way out of this seems to be do get rid of devm_ and release/free everything explicitly during device unbind. v2: Change commit message and other minor code changes v3: Cleanup from i915_hwmon_register on error (Armin Wolf) v4: Eliminate potential static analyzer warning (Rodrigo) Eliminate fetch_and_zero (Jani) v5: Restore previous logic for ddat_gt->hwmon_dev error return (Andi)

AI-Powered Analysis

AILast updated: 07/03/2025, 00:57:41 UTC

Technical Analysis

CVE-2024-39479 is a high-severity vulnerability in the Linux kernel's Intel i915 graphics driver, specifically within the hardware monitoring (hwmon) subsystem. The issue arises due to improper management of device-managed resources during device unbinding. In the affected code paths, both the hwmon device and its dependent driver data (drvdata) are device-managed resources expected to be released in a specific order: hwmon should be released before drvdata. However, in the i915 driver, two separate code paths exist that can release either hwmon or drvdata first, violating this expectation. This leads to a use-after-free (UAF) condition if the hwmon sysfs interface is accessed after drvdata has been freed but before hwmon is released. The root cause is the use of devm (device-managed) resource management which does not guarantee the release order required to prevent this UAF. The fix involves removing devm-based management and explicitly releasing and freeing resources during device unbind to ensure correct ordering. The vulnerability can cause high impact on confidentiality, integrity, and availability as indicated by the CVSS 3.1 score of 7.8 (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H). Exploiting this flaw requires local privileges but no user interaction, and could allow an attacker to execute arbitrary code or cause denial of service by exploiting the UAF condition in the kernel graphics driver. No known exploits are currently reported in the wild. The vulnerability affects Linux kernel versions containing the specified commit hashes, which correspond to recent kernel versions incorporating the i915 driver.

Potential Impact

For European organizations, this vulnerability poses a significant risk especially for those relying on Linux-based systems with Intel integrated graphics using the i915 driver. This includes enterprise servers, workstations, and embedded devices running Linux kernels with the affected versions. Successful exploitation could lead to privilege escalation, arbitrary code execution in kernel space, or system crashes, impacting confidentiality, integrity, and availability of critical systems. Organizations in sectors such as finance, government, telecommunications, and critical infrastructure that use Linux extensively could face operational disruptions or data breaches. The local privilege requirement means attackers need some form of initial access, but once obtained, the vulnerability could be leveraged to gain full control over affected systems. The lack of user interaction requirement facilitates automated exploitation by malicious insiders or malware. Given the widespread use of Linux in European IT environments, the vulnerability could have broad impact if not mitigated promptly.

Mitigation Recommendations

1. Apply the official Linux kernel patches that remove devm-based resource management in the i915 driver and explicitly manage resource release order during device unbind. Monitor Linux kernel mailing lists and vendor advisories for updated kernel releases addressing CVE-2024-39479. 2. For organizations unable to immediately patch, consider disabling or restricting access to the hwmon sysfs interface related to the i915 driver to limit exposure. 3. Implement strict access controls and monitoring on systems with Intel integrated graphics to detect suspicious local activity that could indicate exploitation attempts. 4. Employ kernel hardening techniques such as Kernel Address Space Layout Randomization (KASLR), Kernel Page Table Isolation (KPTI), and seccomp filters to reduce exploitation likelihood. 5. Conduct thorough audits of local user privileges and limit unnecessary local access to reduce the attack surface. 6. Maintain up-to-date intrusion detection and endpoint protection solutions capable of identifying exploitation attempts targeting kernel vulnerabilities. 7. Test patches in controlled environments before deployment to ensure stability and compatibility with existing workloads.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-06-25T14:23:23.746Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9829c4522896dcbe2ce4

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

Last enriched: 7/3/2025, 12:57:41 AM

Last updated: 8/4/2025, 4:27:28 AM

Views: 10

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