CVE-2026-139393

scsi: scsi_debug: Fix a locking bug in resp_write_same()

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

scsi: scsi_debug: Fix a locking bug in resp_write_same()

If fetch_to_dev_buffer() fails in resp_write_same(), the function jumps
to 'out' without releasing the data write lock acquired earlier via
sdeb_data_write_lock(). Jump to 'unlock' instead so that
sdeb_data_write_unlock() is called on the error path. This bug has been
discovered by building the scsi_debug driver with Clang and modified
lock context annotations. The modified lock context annotations are
available in patch "scsi: scsi_debug: Improve lock context annotations".

Analysis

AI-generated

Technical impact

A flaw in the scsi_debug module of the Linux kernel caused the resp_write_same() function to skip releasing a data write lock when fetch_to_dev_buffer() failed. The code jumps to an error path that bypasses the corresponding unlock, leaving the lock held. This defect can result in a deadlock or lock contention that may block legitimate I/O operations, effectively causing a denial of service. The weakness is a classic race or resource‑management flaw, classed as a locking bug.

Affected Systems

Linux kernel versions that include the scsi_debug driver are affected, regardless of patch level. The bug was fixed in recent kernel patches and applies to all builds where the scsi_debug module is compiled and loaded.

Risk and Exploitability

The vulnerability does not have an assigned CVSS score and its EPSS is not available, indicating low exploitation probability. It is not listed in the CISA KEV catalog, and there are no public exploits. The attack vector would require local or privileged access to load or reconfigure the scsi_debug module, meaning that risk to systems with strict module loading controls is limited. However, on systems where scsi_debug is enabled and accessible, the defect could lead to service interruption if an attacker triggers the failed buffer fetch path.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a kernel update that contains the patch fixing the scsi_debug locking bug.
  • If the scsi_debug driver is not required, disable or unload the module to eliminate the risk surface.
  • Restrict the ability to load kernel modules so that only trusted, privileged users can load scsi_debug, reducing the local attack surface.

Generated by OpenCVE AI on November 30, 2026 at 21:56 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-362
CWE-828
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: scsi: scsi_debug: Fix a locking bug in resp_write_same() If fetch_to_dev_buffer() fails in resp_write_same(), the function jumps to 'out' without releasing the data write lock acquired earlier via sdeb_data_write_lock(). Jump to 'unlock' instead so that sdeb_data_write_unlock() is called on the error path. This bug has been discovered by building the scsi_debug driver with Clang and modified lock context annotations. The modified lock context annotations are available in patch "scsi: scsi_debug: Improve lock context annotations".
Title scsi: scsi_debug: Fix a locking bug in resp_write_same()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

  • CWE-828

    Signal Handler with Functionality that is not Asynchronous-Safe

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:34 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM