Skip to main content

CVE-2024-35878: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-35878cvecve-2024-35878
Published: Sun May 19 2024 (05/19/2024, 08:34:35 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: of: module: prevent NULL pointer dereference in vsnprintf() In of_modalias(), we can get passed the str and len parameters which would cause a kernel oops in vsnprintf() since it only allows passing a NULL ptr when the length is also 0. Also, we need to filter out the negative values of the len parameter as these will result in a really huge buffer since snprintf() takes size_t parameter while ours is ssize_t... Found by Linux Verification Center (linuxtesting.org) with the Svace static analysis tool.

AI-Powered Analysis

AILast updated: 06/29/2025, 16:57:34 UTC

Technical Analysis

CVE-2024-35878 is a medium-severity vulnerability identified in the Linux kernel, specifically within the device tree subsystem's of_modalias() function. The issue arises from improper handling of the 'str' and 'len' parameters passed to the vsnprintf() function. vsnprintf() expects that if a NULL pointer is passed for the string buffer, the length parameter must be zero. However, in this vulnerability, a NULL pointer can be passed with a non-zero length, leading to a NULL pointer dereference and causing a kernel oops (crash). Additionally, negative values for the 'len' parameter are not properly filtered out. Since snprintf() uses an unsigned size_t for the buffer size, negative ssize_t values can be interpreted as very large positive numbers, potentially causing buffer overflows or excessive memory allocation attempts. This vulnerability is categorized under CWE-476 (NULL Pointer Dereference) and was discovered using static analysis tools by the Linux Verification Center. The flaw affects certain Linux kernel versions identified by specific commit hashes. Exploitation does not require privileges or user interaction, and the vulnerability can be triggered remotely over the network if the affected kernel is exposed. The CVSS v3.1 base score is 5.3, indicating a medium severity primarily due to its impact on availability (kernel crash) without compromising confidentiality or integrity. No known exploits are currently in the wild, and no patches are linked in the provided data, but it is expected that kernel maintainers will release fixes promptly given the nature of the flaw.

Potential Impact

For European organizations relying on Linux-based systems, this vulnerability poses a risk of denial-of-service (DoS) conditions due to kernel crashes triggered by crafted inputs to the device tree subsystem. This can affect servers, embedded devices, and network infrastructure running vulnerable Linux kernels. The impact is primarily on availability, potentially disrupting critical services, industrial control systems, or cloud environments. Since the vulnerability does not allow privilege escalation or data leakage, confidentiality and integrity impacts are minimal. However, the ease of triggering a kernel oops without authentication or user interaction means attackers could remotely cause service interruptions. Organizations in sectors such as telecommunications, manufacturing, finance, and government—where Linux is widely deployed—may face operational disruptions. The lack of known exploits reduces immediate risk, but the medium severity and potential for DoS warrant timely mitigation to maintain service continuity and system stability.

Mitigation Recommendations

European organizations should promptly identify Linux systems running affected kernel versions by checking kernel commit hashes or version numbers once detailed advisories are available. Applying official kernel patches or updates from trusted Linux distributions is the primary mitigation. In environments where immediate patching is not feasible, organizations should implement network-level protections such as firewall rules or intrusion prevention systems to block malformed packets or inputs targeting the device tree subsystem. Monitoring kernel logs for oops or crash signatures can help detect exploitation attempts early. Additionally, employing kernel hardening techniques like kernel lockdown features, seccomp filters, or running critical services in containers or virtual machines can reduce the blast radius of potential crashes. Coordination with Linux vendors and subscribing to security mailing lists will ensure timely awareness of patches and advisories. Finally, testing patches in staging environments before production deployment is recommended to avoid unintended disruptions.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-17T13:50:33.110Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d982ac4522896dcbe3757

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

Last enriched: 6/29/2025, 4:57:34 PM

Last updated: 8/12/2025, 3:02:41 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