{"id":"CVE-2026-139149","state":"PUBLISHED","title":"nvmet: don't clear sq->ctrl for a Connect with sqsize 0","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet: don't clear sq->ctrl for a Connect with sqsize 0\n\nnvmet_install_queue() checks sqsize first and jumps to err on zero,\nwhere sq->ctrl is set to NULL. Since commit b71df12605ca the cmpxchg()\nthat sets sq->ctrl comes after the checks, so err now undoes a bind\nthat this call never made. Over RDMA a host can send two Connects\ntogether and the second is parsed before the first executes, so a\nsecond Connect with sqsize 0 clears the sq->ctrl the first one set.\nThe reference it held is never dropped and the controller leaks, with\nits cntlid, until reboot. The discovery subsystem lets any host do\nthat, 20 connections leak around 10 controllers. A pending AER on such\na queue hangs nvmet_sq_destroy() forever, and a queue can keep its\n\"authenticated\" mark across a rebind.\n\nReturn the status directly, as the two checks after it do, so err is\nonly reached after this call's cmpxchg() succeeded.","publishedAt":"2026-11-30T13:32:01.999Z","updatedAt":"2026-11-30T13:32:01.999Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b71df12605cabab47d58bd926badaf4130280e4d","status":"affected","lessThan":"6c6d541fdc556659d6e8d6d608d38fe03bbd82cd","versionType":"git"},{"version":"b71df12605cabab47d58bd926badaf4130280e4d","status":"affected","lessThan":"b6c4b529ef42c6995a75c2384a19fbd4f3740bb0","versionType":"git"},{"version":"b71df12605cabab47d58bd926badaf4130280e4d","status":"affected","lessThan":"24177b0909ed41af78e7b5f73e864bfc116fd806","versionType":"git"},{"version":"b71df12605cabab47d58bd926badaf4130280e4d","status":"affected","lessThan":"6c28bf6920b09baec6852d3ca58b52778e1464b9","versionType":"git"},{"version":"b71df12605cabab47d58bd926badaf4130280e4d","status":"affected","lessThan":"24b9e5fb0e160802950aa0caba19576edcc9094e","versionType":"git"},{"version":"b71df12605cabab47d58bd926badaf4130280e4d","status":"affected","lessThan":"961ff9e3a453665574fa143ea5f496b97350333a","versionType":"git"},{"version":"b71df12605cabab47d58bd926badaf4130280e4d","status":"affected","lessThan":"89480d137bf0d943a82c64f86ae2407a15276b5e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/fabrics-cmd.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.226","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.193","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","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/nvme/target/fabrics-cmd.c"]}],"references":["https://git.kernel.org/stable/c/6c6d541fdc556659d6e8d6d608d38fe03bbd82cd","https://git.kernel.org/stable/c/b6c4b529ef42c6995a75c2384a19fbd4f3740bb0","https://git.kernel.org/stable/c/24177b0909ed41af78e7b5f73e864bfc116fd806","https://git.kernel.org/stable/c/6c28bf6920b09baec6852d3ca58b52778e1464b9","https://git.kernel.org/stable/c/24b9e5fb0e160802950aa0caba19576edcc9094e","https://git.kernel.org/stable/c/961ff9e3a453665574fa143ea5f496b97350333a","https://git.kernel.org/stable/c/89480d137bf0d943a82c64f86ae2407a15276b5e"],"weaknesses":[],"ingestedAt":"2026-11-30T13:44:05.999Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139149.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139149","state":"PUBLISHED","datePublished":"2026-11-30T13:32:01.999Z","dateUpdated":"2026-11-30T13:32:01.999Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.917Z"},"containers":{"cna":{"title":"nvmet: don't clear sq->ctrl for a Connect with sqsize 0","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet: don't clear sq->ctrl for a Connect with sqsize 0\n\nnvmet_install_queue() checks sqsize first and jumps to err on zero,\nwhere sq->ctrl is set to NULL. Since commit b71df12605ca the cmpxchg()\nthat sets sq->ctrl comes after the checks, so err now undoes a bind\nthat this call never made. Over RDMA a host can send two Connects\ntogether and the second is parsed before the first executes, so a\nsecond Connect with sqsize 0 clears the sq->ctrl the first one set.\nThe reference it held is never dropped and the controller leaks, with\nits cntlid, until reboot. The discovery subsystem lets any host do\nthat, 20 connections leak around 10 controllers. A pending AER on such\na queue hangs nvmet_sq_destroy() forever, and a queue can keep its\n\"authenticated\" mark across a rebind.\n\nReturn the status directly, as the two checks after it do, so err is\nonly reached after this call's cmpxchg() succeeded."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b71df12605cabab47d58bd926badaf4130280e4d","status":"affected","lessThan":"6c6d541fdc556659d6e8d6d608d38fe03bbd82cd","versionType":"git"},{"version":"b71df12605cabab47d58bd926badaf4130280e4d","status":"affected","lessThan":"b6c4b529ef42c6995a75c2384a19fbd4f3740bb0","versionType":"git"},{"version":"b71df12605cabab47d58bd926badaf4130280e4d","status":"affected","lessThan":"24177b0909ed41af78e7b5f73e864bfc116fd806","versionType":"git"},{"version":"b71df12605cabab47d58bd926badaf4130280e4d","status":"affected","lessThan":"6c28bf6920b09baec6852d3ca58b52778e1464b9","versionType":"git"},{"version":"b71df12605cabab47d58bd926badaf4130280e4d","status":"affected","lessThan":"24b9e5fb0e160802950aa0caba19576edcc9094e","versionType":"git"},{"version":"b71df12605cabab47d58bd926badaf4130280e4d","status":"affected","lessThan":"961ff9e3a453665574fa143ea5f496b97350333a","versionType":"git"},{"version":"b71df12605cabab47d58bd926badaf4130280e4d","status":"affected","lessThan":"89480d137bf0d943a82c64f86ae2407a15276b5e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/fabrics-cmd.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.226","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.193","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","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/nvme/target/fabrics-cmd.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/6c6d541fdc556659d6e8d6d608d38fe03bbd82cd"},{"url":"https://git.kernel.org/stable/c/b6c4b529ef42c6995a75c2384a19fbd4f3740bb0"},{"url":"https://git.kernel.org/stable/c/24177b0909ed41af78e7b5f73e864bfc116fd806"},{"url":"https://git.kernel.org/stable/c/6c28bf6920b09baec6852d3ca58b52778e1464b9"},{"url":"https://git.kernel.org/stable/c/24b9e5fb0e160802950aa0caba19576edcc9094e"},{"url":"https://git.kernel.org/stable/c/961ff9e3a453665574fa143ea5f496b97350333a"},{"url":"https://git.kernel.org/stable/c/89480d137bf0d943a82c64f86ae2407a15276b5e"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:32:01.999Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"5.15.226"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.1.193"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}