Skip to main content

CVE-2024-35940: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-35940cvecve-2024-35940
Published: Sun May 19 2024 (05/19/2024, 10:10:45 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: pstore/zone: Add a null pointer check to the psz_kmsg_read kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity.

AI-Powered Analysis

AILast updated: 06/29/2025, 08:25:31 UTC

Technical Analysis

CVE-2024-35940 is a medium-severity vulnerability identified in the Linux kernel, specifically within the pstore subsystem's zone handling code. The issue arises from the function psz_kmsg_read, which uses kasprintf() to allocate memory dynamically. kasprintf() can return a NULL pointer if the memory allocation fails, but the vulnerable code did not check for this NULL pointer before dereferencing it. This lack of validation leads to a potential null pointer dereference (CWE-476), which can cause a kernel panic or system crash, resulting in a denial of service (DoS) condition. The vulnerability does not impact confidentiality or integrity but affects availability due to the possibility of crashing the kernel. Exploitation requires local access with low privileges (PR:L), no user interaction is needed (UI:N), and the attack vector is local (AV:L). The vulnerability scope is unchanged (S:U), meaning it affects only the vulnerable component without impacting other system components. The CVSS v3.1 base score is 5.5, reflecting a medium severity level. No known exploits are currently reported in the wild. The fix involves adding a null pointer check after kasprintf() to ensure the pointer is valid before use, preventing the null dereference and subsequent crash.

Potential Impact

For European organizations, this vulnerability primarily poses a risk of denial of service on Linux systems running affected kernel versions. Since Linux is widely deployed across servers, cloud infrastructure, and embedded devices in Europe, an attacker with local access could trigger system crashes, disrupting critical services and operations. This could impact sectors relying heavily on Linux servers, such as finance, telecommunications, government, and manufacturing. Although the vulnerability does not allow privilege escalation or data compromise, the availability impact could lead to operational downtime, loss of productivity, and potential financial losses. Systems exposed to untrusted users or multi-tenant environments are at higher risk. However, the requirement for local access limits remote exploitation, reducing the risk from external attackers but emphasizing the need for internal security controls.

Mitigation Recommendations

European organizations should promptly apply the available Linux kernel patches that address CVE-2024-35940 by adding the necessary null pointer checks in the pstore/zone code. System administrators must verify that all Linux systems, especially those running kernel versions containing the vulnerable commit (noted by the specific git commit hash), are updated to patched versions. In environments where immediate patching is not feasible, organizations should restrict local access to trusted users only and implement strict access controls and monitoring to detect suspicious activities. Employing kernel crash monitoring and automated recovery mechanisms can help mitigate availability impacts. Additionally, conducting regular audits of kernel versions and maintaining an up-to-date inventory of Linux systems will facilitate timely vulnerability management. Security teams should also educate users about the risks of executing untrusted code locally to prevent accidental exploitation.

Need more detailed analysis?Get Pro

Technical Details

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

Threat ID: 682d9828c4522896dcbe221b

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

Last enriched: 6/29/2025, 8:25:31 AM

Last updated: 7/30/2025, 11:11:03 PM

Views: 12

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