CVE-2024-35940: Vulnerability in Linux Linux
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 Analysis
Technical Summary
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.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Sweden, Poland
CVE-2024-35940: Vulnerability in Linux 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
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.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
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
Related Threats
CVE-2025-8878: CWE-94 Improper Control of Generation of Code ('Code Injection') in properfraction Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress
MediumCVE-2025-8143: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in pencidesign Soledad
MediumCVE-2025-8142: CWE-98 Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') in pencidesign Soledad
HighCVE-2025-8105: CWE-94 Improper Control of Generation of Code ('Code Injection') in pencidesign Soledad
HighCVE-2025-8719: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in reubenthiessen Translate This gTranslate Shortcode
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.