CVE-2024-35954: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: scsi: sg: Avoid sg device teardown race sg_remove_sfp_usercontext() must not use sg_device_destroy() after calling scsi_device_put(). sg_device_destroy() is accessing the parent scsi_device request_queue which will already be set to NULL when the preceding call to scsi_device_put() removed the last reference to the parent scsi_device. The resulting NULL pointer exception will then crash the kernel.
AI Analysis
Technical Summary
CVE-2024-35954 is a vulnerability in the Linux kernel's SCSI generic (sg) driver subsystem. The flaw arises from a race condition during the teardown of sg devices, specifically in the function sg_remove_sfp_usercontext(). The vulnerability occurs because sg_remove_sfp_usercontext() improperly calls sg_device_destroy() after invoking scsi_device_put(). The scsi_device_put() function releases the last reference to the parent scsi_device, which results in the request_queue pointer of the scsi_device being set to NULL. Subsequently, sg_device_destroy() attempts to access this now NULL request_queue pointer, leading to a NULL pointer dereference. This causes the Linux kernel to crash, resulting in a denial of service (DoS) condition. The affected code paths are within the Linux kernel versions identified by specific commit hashes, indicating that the vulnerability affects certain recent kernel builds prior to the patch. There are no known exploits in the wild at the time of publication, and no CVSS score has been assigned yet. The vulnerability is technical in nature, involving kernel memory management and device lifecycle handling, and requires local code execution context to trigger the race condition and kernel crash.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running vulnerable Linux kernel versions with the SCSI generic driver enabled. The impact is a potential denial of service through kernel crashes, which can disrupt critical services, especially in data centers, cloud infrastructures, and enterprise environments relying on Linux servers for storage and compute workloads. Systems that handle SCSI devices, such as SAN storage arrays or virtualized environments using SCSI emulation, are particularly at risk. The disruption could affect availability of services, leading to operational downtime and potential financial losses. While this vulnerability does not directly lead to privilege escalation or data leakage, the induced kernel panic could be exploited by attackers to cause persistent service interruptions. European organizations with high reliance on Linux-based infrastructure, including telecommunications, finance, and public sector entities, could face increased operational risks if patches are not applied promptly.
Mitigation Recommendations
To mitigate this vulnerability, organizations should promptly update their Linux kernels to versions that include the patch fixing CVE-2024-35954. Since the vulnerability involves a race condition in kernel device teardown, applying the official Linux kernel patch is the most effective measure. Until patches are applied, organizations should limit access to systems running vulnerable kernels to trusted users only, as exploitation requires local code execution. Monitoring kernel logs for unexpected crashes or oops messages related to sg devices can help detect attempted exploitation. Additionally, disabling or unloading the sg driver module on systems where SCSI generic device support is not required can reduce the attack surface. For virtualized environments, ensure hypervisor and guest OS kernels are updated, as the vulnerability could impact virtual SCSI devices. Regular kernel updates and adherence to security best practices for Linux system hardening will further reduce risk.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain
CVE-2024-35954: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: scsi: sg: Avoid sg device teardown race sg_remove_sfp_usercontext() must not use sg_device_destroy() after calling scsi_device_put(). sg_device_destroy() is accessing the parent scsi_device request_queue which will already be set to NULL when the preceding call to scsi_device_put() removed the last reference to the parent scsi_device. The resulting NULL pointer exception will then crash the kernel.
AI-Powered Analysis
Technical Analysis
CVE-2024-35954 is a vulnerability in the Linux kernel's SCSI generic (sg) driver subsystem. The flaw arises from a race condition during the teardown of sg devices, specifically in the function sg_remove_sfp_usercontext(). The vulnerability occurs because sg_remove_sfp_usercontext() improperly calls sg_device_destroy() after invoking scsi_device_put(). The scsi_device_put() function releases the last reference to the parent scsi_device, which results in the request_queue pointer of the scsi_device being set to NULL. Subsequently, sg_device_destroy() attempts to access this now NULL request_queue pointer, leading to a NULL pointer dereference. This causes the Linux kernel to crash, resulting in a denial of service (DoS) condition. The affected code paths are within the Linux kernel versions identified by specific commit hashes, indicating that the vulnerability affects certain recent kernel builds prior to the patch. There are no known exploits in the wild at the time of publication, and no CVSS score has been assigned yet. The vulnerability is technical in nature, involving kernel memory management and device lifecycle handling, and requires local code execution context to trigger the race condition and kernel crash.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running vulnerable Linux kernel versions with the SCSI generic driver enabled. The impact is a potential denial of service through kernel crashes, which can disrupt critical services, especially in data centers, cloud infrastructures, and enterprise environments relying on Linux servers for storage and compute workloads. Systems that handle SCSI devices, such as SAN storage arrays or virtualized environments using SCSI emulation, are particularly at risk. The disruption could affect availability of services, leading to operational downtime and potential financial losses. While this vulnerability does not directly lead to privilege escalation or data leakage, the induced kernel panic could be exploited by attackers to cause persistent service interruptions. European organizations with high reliance on Linux-based infrastructure, including telecommunications, finance, and public sector entities, could face increased operational risks if patches are not applied promptly.
Mitigation Recommendations
To mitigate this vulnerability, organizations should promptly update their Linux kernels to versions that include the patch fixing CVE-2024-35954. Since the vulnerability involves a race condition in kernel device teardown, applying the official Linux kernel patch is the most effective measure. Until patches are applied, organizations should limit access to systems running vulnerable kernels to trusted users only, as exploitation requires local code execution. Monitoring kernel logs for unexpected crashes or oops messages related to sg devices can help detect attempted exploitation. Additionally, disabling or unloading the sg driver module on systems where SCSI generic device support is not required can reduce the attack surface. For virtualized environments, ensure hypervisor and guest OS kernels are updated, as the vulnerability could impact virtual SCSI devices. Regular kernel updates and adherence to security best practices for Linux system hardening will further reduce risk.
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.135Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9821c4522896dcbddcb0
Added to database: 5/21/2025, 9:08:49 AM
Last enriched: 6/28/2025, 3:26:39 AM
Last updated: 7/30/2025, 10:06:14 PM
Views: 8
Related Threats
CVE-2025-52621: CWE-346 Origin Validation Error in HCL Software BigFix SaaS Remediate
MediumCVE-2025-52620: CWE-20 Improper Input Validation in HCL Software BigFix SaaS Remediate
MediumCVE-2025-52619: CWE-209 Generation of Error Message Containing Sensitive Information in HCL Software BigFix SaaS Remediate
MediumCVE-2025-52618: CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in HCL Software BigFix SaaS Remediate
MediumCVE-2025-43201: An app may be able to unexpectedly leak a user's credentials in Apple Apple Music Classical for Android
HighActions
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.