Skip to main content

CVE-2024-49874: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-49874cvecve-2024-49874
Published: Mon Oct 21 2024 (10/21/2024, 18:01:14 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: i3c: master: svc: Fix use after free vulnerability in svc_i3c_master Driver Due to Race Condition In the svc_i3c_master_probe function, &master->hj_work is bound with svc_i3c_master_hj_work, &master->ibi_work is bound with svc_i3c_master_ibi_work. And svc_i3c_master_ibi_work can start the hj_work, svc_i3c_master_irq_handler can start the ibi_work. If we remove the module which will call svc_i3c_master_remove to make cleanup, it will free master->base through i3c_master_unregister while the work mentioned above will be used. The sequence of operations that may lead to a UAF bug is as follows: CPU0 CPU1 | svc_i3c_master_hj_work svc_i3c_master_remove | i3c_master_unregister(&master->base)| device_unregister(&master->dev) | device_release | //free master->base | | i3c_master_do_daa(&master->base) | //use master->base Fix it by ensuring that the work is canceled before proceeding with the cleanup in svc_i3c_master_remove.

AI-Powered Analysis

AILast updated: 06/28/2025, 21:09:51 UTC

Technical Analysis

CVE-2024-49874 is a use-after-free (UAF) vulnerability identified in the Linux kernel's i3c master driver, specifically within the svc_i3c_master component. The vulnerability arises due to a race condition involving asynchronous work queues and the removal of the i3c master device. The i3c (Improved Inter-Integrated Circuit) bus is a communication protocol used for connecting peripheral devices to processors, and the Linux kernel includes drivers to manage this hardware interface. In this case, the svc_i3c_master driver binds two work structures, hj_work and ibi_work, to asynchronous handler functions svc_i3c_master_hj_work and svc_i3c_master_ibi_work respectively. These work items can trigger each other: svc_i3c_master_ibi_work can start hj_work, and the interrupt handler svc_i3c_master_irq_handler can start ibi_work. The vulnerability occurs when the kernel module is removed, triggering svc_i3c_master_remove to clean up resources. During cleanup, the master->base structure is freed via i3c_master_unregister, but concurrently, the asynchronous work items may still be executing or scheduled to execute, leading to a use-after-free scenario where freed memory is accessed. This can cause kernel crashes, data corruption, or potentially allow an attacker to execute arbitrary code in kernel context if exploited. The fix involves ensuring that all asynchronous work is properly canceled and completed before freeing resources during module removal, preventing the race condition and use-after-free. This vulnerability affects specific Linux kernel versions identified by commit hashes and was published on October 21, 2024. No known exploits are reported in the wild at this time, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, this vulnerability poses a significant risk primarily to systems running vulnerable Linux kernel versions with the i3c master driver enabled. The i3c bus is commonly used in embedded systems, IoT devices, and some industrial control systems, which are prevalent in sectors such as manufacturing, automotive, telecommunications, and critical infrastructure. Exploitation could lead to kernel crashes causing denial of service, or in worst cases, privilege escalation and arbitrary code execution at the kernel level, compromising system integrity and confidentiality. This is particularly critical for organizations relying on Linux-based embedded devices or servers that manage sensitive data or control critical operations. The impact is heightened in environments where patching is slow or where devices have limited update mechanisms. Additionally, disruption or compromise of industrial or telecom equipment could have cascading effects on service availability and safety. Although no active exploits are known, the complexity of the vulnerability and its presence in the kernel underline the importance of timely mitigation to prevent potential future attacks.

Mitigation Recommendations

1. Immediate patching: Apply the official Linux kernel patches that address CVE-2024-49874 as soon as they are available and tested. Monitor kernel updates from trusted sources and prioritize deployment in affected environments. 2. Kernel version management: Maintain an inventory of Linux kernel versions in use, especially for embedded and IoT devices, and upgrade to versions that include the fix. 3. Module management: Avoid unnecessary loading and unloading of the i3c master driver module on production systems to reduce the risk window. 4. Work queue monitoring: Implement monitoring to detect abnormal kernel work queue behavior or frequent module reloads that might indicate exploitation attempts. 5. Access control: Restrict permissions to load/unload kernel modules to trusted administrators only, minimizing the risk of unauthorized triggering of the vulnerable code path. 6. Device isolation: Segment and isolate devices using the i3c bus in network and operational topology to limit potential lateral movement if exploitation occurs. 7. Incident readiness: Prepare incident response plans for kernel-level compromises, including forensic capabilities and recovery procedures. 8. Vendor coordination: For embedded devices or third-party hardware running vulnerable kernels, coordinate with vendors for firmware updates or mitigations.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-10-21T12:17:06.020Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9825c4522896dcbe084e

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

Last enriched: 6/28/2025, 9:09:51 PM

Last updated: 8/13/2025, 2:20:15 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