CVE-2025-68371 in Linuxinfo

Summary

by MITRE • 12/24/2025

In the Linux kernel, the following vulnerability has been resolved:

scsi: smartpqi: Fix device resources accessed after device removal

Correct possible race conditions during device removal.

Previously, a scheduled work item to reset a LUN could still execute after the device was removed, leading to use-after-free and other resource access issues.

This race condition occurs because the abort handler may schedule a LUN reset concurrently with device removal via sdev_destroy(), leading to use-after-free and improper access to freed resources.

- Check in the device reset handler if the device is still present in the controller's SCSI device list before running; if not, the reset is skipped.

- Cancel any pending TMF work that has not started in sdev_destroy().

- Ensure device freeing in sdev_destroy() is done while holding the LUN reset mutex to avoid races with ongoing resets.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 01/12/2026

The vulnerability identified as CVE-2025-68371 affects the Linux kernel's SCSI subsystem, specifically within the smartpqi driver that manages certain HP Smart Array controllers. This issue represents a critical race condition that can lead to use-after-free conditions and improper resource access during device removal operations. The flaw occurs in the interaction between device removal and scheduled reset operations, creating a window where system resources can be accessed after they have been freed, potentially leading to system instability or security vulnerabilities.

The technical root cause stems from improper synchronization mechanisms during device lifecycle management within the SCSI subsystem. When a SCSI device is removed through the sdev_destroy() function, the system schedules a work item to reset the Logical Unit Number (LUN) but does not properly prevent execution of this reset operation if the device has already been removed. This creates a race condition where the abort handler schedules a LUN reset concurrently with device removal, allowing the reset handler to access memory locations that have already been freed or deallocated. The vulnerability manifests as a use-after-free condition that can result in memory corruption and potentially arbitrary code execution.

The operational impact of this vulnerability extends beyond simple system instability to potential security implications within enterprise storage environments. Organizations using HP Smart Array controllers that rely on the smartpqi driver are at risk of system crashes, data corruption, or denial of service conditions when devices are removed or reconfigured. The vulnerability is particularly concerning in high-availability environments where storage subsystems undergo frequent reconfiguration or where automated device management processes might trigger device removals. Attackers could potentially exploit this race condition to cause system crashes or potentially escalate privileges through memory corruption techniques.

The fix implemented addresses the race condition through multiple defensive measures that align with established security best practices. The primary solution involves checking device presence in the controller's SCSI device list before executing reset operations in the device reset handler, effectively preventing execution on removed devices. Additionally, the implementation ensures that any pending Task Management Function (TMF) work items are canceled during device removal through the sdev_destroy() function, preventing stale operations from executing. The fix also enforces proper locking mechanisms by ensuring device freeing operations occur while holding the LUN reset mutex, which prevents concurrent access between reset operations and device removal processes. These mitigations align with CWE-362, which describes race conditions, and address patterns commonly associated with improper resource management in kernel space operations.

The remediation approach follows industry standards for kernel security hardening and adheres to ATT&CK framework concepts related to privilege escalation and system compromise through kernel vulnerabilities. The solution demonstrates proper synchronization practices that prevent the type of concurrent access issues that have historically led to serious security vulnerabilities in operating system kernels. Organizations should prioritize patching this vulnerability as it represents a potential pathway for attackers to disrupt storage services or potentially gain elevated privileges within affected systems. The fix specifically targets the smartpqi driver's handling of device removal and reset operations, making it particularly relevant for enterprises using HP storage solutions in mission-critical environments where storage subsystem reliability is paramount.

Responsible

Linux

Reservation

12/16/2025

Disclosure

12/24/2025

Moderation

accepted

CPE

ready

EPSS

0.00161

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!