CVE-2026-99939: scsi: ufs: bsg: Complete the job on error
In the Linux kernel, the following vulnerability has been resolved:
scsi: ufs: bsg: Complete the job on error
When ufsbsgrequest() fails, it returns a non-zero status without calling bsgjobdone(). bsgqueuerq() then ends the request with BLKSTSIOERR without running bsgcomplete(), leaking the job's device reference and mapped scatterlists.
Always complete the job via bsgjobdone() and return 0, matching other BSG transports. Requests failing with a negative errno now return it from SGIO with the 4-byte result in the reply, while positive status codes still return 0 from SGIO with the reply header.
Affected Software
Event History
Frequently Asked Questions
What systems are exposed to this issue?
Systems using the Linux kernel UFS BSG transport are exposed when they process UFS BSG requests that cause ufs_bsg_request() to fail. The provided information does not identify affected kernel versions or whether the relevant interface is enabled by default.
What is the practical impact of triggering the failure path?
The failing request can bypass bsg_job_done(), leaking the BSG job's device reference and mapped scatterlists. This is a resource-leak condition associated with UFS BSG request errors.
How does the fix change error reporting to callers?
For requests that fail with a negative errno, SG_IO now returns that errno and includes the 4-byte result in the reply. Positive status codes continue to return 0 from SG_IO with the reply header.