{"id":"CVE-2026-139393","state":"PUBLISHED","title":"scsi: scsi_debug: Fix a locking bug in resp_write_same()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: scsi_debug: Fix a locking bug in resp_write_same()\n\nIf fetch_to_dev_buffer() fails in resp_write_same(), the function jumps\nto 'out' without releasing the data write lock acquired earlier via\nsdeb_data_write_lock(). Jump to 'unlock' instead so that\nsdeb_data_write_unlock() is called on the error path. This bug has been\ndiscovered by building the scsi_debug driver with Clang and modified\nlock context annotations. The modified lock context annotations are\navailable in patch \"scsi: scsi_debug: Improve lock context annotations\".","publishedAt":"2026-11-30T13:34:20.539Z","updatedAt":"2026-11-30T13:34:20.539Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"84f3a3c01d70efba736bc42155cf32722067b327","status":"affected","lessThan":"9fa387c4bea66d6f586fdadca438940268f079ce","versionType":"git"},{"version":"84f3a3c01d70efba736bc42155cf32722067b327","status":"affected","lessThan":"85224decd4e075ca5263c8d6d84eb74483a7a644","versionType":"git"},{"version":"84f3a3c01d70efba736bc42155cf32722067b327","status":"affected","lessThan":"662f4d7e7da5abea384c96d3de86e336014fa5b5","versionType":"git"},{"version":"84f3a3c01d70efba736bc42155cf32722067b327","status":"affected","lessThan":"2f50ca3d46b4d5916874ba19612498c0a9c1f5f9","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/scsi_debug.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.11","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","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/scsi/scsi_debug.c"]}],"references":["https://git.kernel.org/stable/c/9fa387c4bea66d6f586fdadca438940268f079ce","https://git.kernel.org/stable/c/85224decd4e075ca5263c8d6d84eb74483a7a644","https://git.kernel.org/stable/c/662f4d7e7da5abea384c96d3de86e336014fa5b5","https://git.kernel.org/stable/c/2f50ca3d46b4d5916874ba19612498c0a9c1f5f9"],"weaknesses":[],"ingestedAt":"2026-11-30T13:48:04.491Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139393.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139393","state":"PUBLISHED","datePublished":"2026-11-30T13:34:20.539Z","dateUpdated":"2026-11-30T13:34:20.539Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.931Z"},"containers":{"cna":{"title":"scsi: scsi_debug: Fix a locking bug in resp_write_same()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: scsi_debug: Fix a locking bug in resp_write_same()\n\nIf fetch_to_dev_buffer() fails in resp_write_same(), the function jumps\nto 'out' without releasing the data write lock acquired earlier via\nsdeb_data_write_lock(). Jump to 'unlock' instead so that\nsdeb_data_write_unlock() is called on the error path. This bug has been\ndiscovered by building the scsi_debug driver with Clang and modified\nlock context annotations. The modified lock context annotations are\navailable in patch \"scsi: scsi_debug: Improve lock context annotations\"."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"84f3a3c01d70efba736bc42155cf32722067b327","status":"affected","lessThan":"9fa387c4bea66d6f586fdadca438940268f079ce","versionType":"git"},{"version":"84f3a3c01d70efba736bc42155cf32722067b327","status":"affected","lessThan":"85224decd4e075ca5263c8d6d84eb74483a7a644","versionType":"git"},{"version":"84f3a3c01d70efba736bc42155cf32722067b327","status":"affected","lessThan":"662f4d7e7da5abea384c96d3de86e336014fa5b5","versionType":"git"},{"version":"84f3a3c01d70efba736bc42155cf32722067b327","status":"affected","lessThan":"2f50ca3d46b4d5916874ba19612498c0a9c1f5f9","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/scsi_debug.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.11","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","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/scsi/scsi_debug.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/9fa387c4bea66d6f586fdadca438940268f079ce"},{"url":"https://git.kernel.org/stable/c/85224decd4e075ca5263c8d6d84eb74483a7a644"},{"url":"https://git.kernel.org/stable/c/662f4d7e7da5abea384c96d3de86e336014fa5b5"},{"url":"https://git.kernel.org/stable/c/2f50ca3d46b4d5916874ba19612498c0a9c1f5f9"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:34:20.539Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}