{"id":"CVE-2026-99939","state":"PUBLISHED","title":"scsi: ufs: bsg: Complete the job on error","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: ufs: bsg: Complete the job on error\n\nWhen ufs_bsg_request() fails, it returns a non-zero status without calling\nbsg_job_done(). bsg_queue_rq() then ends the request with BLK_STS_IOERR\nwithout running bsg_complete(), leaking the job's device reference and\nmapped scatterlists.\n\nAlways complete the job via bsg_job_done() and return 0, matching other BSG\ntransports. Requests failing with a negative errno now return it from SG_IO\nwith the 4-byte result in the reply, while positive status codes still\nreturn 0 from SG_IO with the reply header.","publishedAt":"2026-11-30T13:18:27.857Z","updatedAt":"2026-12-06T00:44:25.286Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b13a3539eb2affcb8833c189d68d6a4b99c41f6e","status":"affected","lessThan":"91a5c0131cc0235308994c4fd9fcd051ca3b61a4","versionType":"git"},{"version":"b13a3539eb2affcb8833c189d68d6a4b99c41f6e","status":"affected","lessThan":"c161498d36e5f0d83f8776ea4df05c83051a95be","versionType":"git"},{"version":"b13a3539eb2affcb8833c189d68d6a4b99c41f6e","status":"affected","lessThan":"faba6b1b3c26e45873aa73a98b17b0f23dc25ba9","versionType":"git"},{"version":"b13a3539eb2affcb8833c189d68d6a4b99c41f6e","status":"affected","lessThan":"6252388f4ee900826173c2a71d9071b7a2b699f9","versionType":"git"},{"version":"b13a3539eb2affcb8833c189d68d6a4b99c41f6e","status":"affected","lessThan":"b75af28847a4cd6eb1275beb49cfb9da322926e6","versionType":"git"},{"version":"b13a3539eb2affcb8833c189d68d6a4b99c41f6e","status":"affected","lessThan":"cc0ce3fe8fac073ecded4f32c8ee5b89da1397e8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/ufs/core/ufs_bsg.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.3","versionType":"semver"},{"version":"6.1.194","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.63","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.4","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/ufs/core/ufs_bsg.c"]}],"references":["https://git.kernel.org/stable/c/91a5c0131cc0235308994c4fd9fcd051ca3b61a4","https://git.kernel.org/stable/c/c161498d36e5f0d83f8776ea4df05c83051a95be","https://git.kernel.org/stable/c/faba6b1b3c26e45873aa73a98b17b0f23dc25ba9","https://git.kernel.org/stable/c/6252388f4ee900826173c2a71d9071b7a2b699f9","https://git.kernel.org/stable/c/b75af28847a4cd6eb1275beb49cfb9da322926e6","https://git.kernel.org/stable/c/cc0ce3fe8fac073ecded4f32c8ee5b89da1397e8"],"weaknesses":[],"ingestedAt":"2026-12-06T00:58:04.620Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/99xxx/CVE-2026-99939.json","commit":"aae4286ea28e6b46e94c1e0cb6d4ca2c0f8bff31","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99939","state":"PUBLISHED","datePublished":"2026-11-30T13:18:27.857Z","dateUpdated":"2026-12-06T00:44:25.286Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:25:14.448Z"},"containers":{"cna":{"title":"scsi: ufs: bsg: Complete the job on error","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: ufs: bsg: Complete the job on error\n\nWhen ufs_bsg_request() fails, it returns a non-zero status without calling\nbsg_job_done(). bsg_queue_rq() then ends the request with BLK_STS_IOERR\nwithout running bsg_complete(), leaking the job's device reference and\nmapped scatterlists.\n\nAlways complete the job via bsg_job_done() and return 0, matching other BSG\ntransports. Requests failing with a negative errno now return it from SG_IO\nwith the 4-byte result in the reply, while positive status codes still\nreturn 0 from SG_IO with the reply header."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b13a3539eb2affcb8833c189d68d6a4b99c41f6e","status":"affected","lessThan":"91a5c0131cc0235308994c4fd9fcd051ca3b61a4","versionType":"git"},{"version":"b13a3539eb2affcb8833c189d68d6a4b99c41f6e","status":"affected","lessThan":"c161498d36e5f0d83f8776ea4df05c83051a95be","versionType":"git"},{"version":"b13a3539eb2affcb8833c189d68d6a4b99c41f6e","status":"affected","lessThan":"faba6b1b3c26e45873aa73a98b17b0f23dc25ba9","versionType":"git"},{"version":"b13a3539eb2affcb8833c189d68d6a4b99c41f6e","status":"affected","lessThan":"6252388f4ee900826173c2a71d9071b7a2b699f9","versionType":"git"},{"version":"b13a3539eb2affcb8833c189d68d6a4b99c41f6e","status":"affected","lessThan":"b75af28847a4cd6eb1275beb49cfb9da322926e6","versionType":"git"},{"version":"b13a3539eb2affcb8833c189d68d6a4b99c41f6e","status":"affected","lessThan":"cc0ce3fe8fac073ecded4f32c8ee5b89da1397e8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/ufs/core/ufs_bsg.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.3","versionType":"semver"},{"version":"6.1.194","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.63","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.4","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/ufs/core/ufs_bsg.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/91a5c0131cc0235308994c4fd9fcd051ca3b61a4"},{"url":"https://git.kernel.org/stable/c/c161498d36e5f0d83f8776ea4df05c83051a95be"},{"url":"https://git.kernel.org/stable/c/faba6b1b3c26e45873aa73a98b17b0f23dc25ba9"},{"url":"https://git.kernel.org/stable/c/6252388f4ee900826173c2a71d9071b7a2b699f9"},{"url":"https://git.kernel.org/stable/c/b75af28847a4cd6eb1275beb49cfb9da322926e6"},{"url":"https://git.kernel.org/stable/c/cc0ce3fe8fac073ecded4f32c8ee5b89da1397e8"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-06T00:44:25.286Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.3","versionEndExcluding":"6.1.194"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.3","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.3","versionEndExcluding":"6.12.117"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.3","versionEndExcluding":"6.18.63"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.3","versionEndExcluding":"7.3.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.3","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}