{"id":"CVE-2026-139150","state":"PUBLISHED","title":"nvmet-rdma: fix double puts after a failed RDMA WRITE","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet-rdma: fix double puts after a failed RDMA WRITE\n\nFor a read with T10-PI the RDMA WRITE is posted alone and\nnvmet_rdma_write_data_done() posts the SEND once the metadata check\nresult is known. By then the request has been completed and its\nreferences put: __nvmet_req_complete() put ns->ref and the pc_ref, and\nnvmet_req_complete() sq->ref, right after queuing the response. The\nerror branch of nvmet_rdma_write_data_done() copies the one from\nnvmet_rdma_read_data_done() and calls nvmet_req_uninit(), which puts\nall three again. A WRITE fails whenever the connection ends with reads\nin flight, which is up to the host. Depending on timing the sq->ref\ncount goes to zero early and the queue is freed under the remaining\ncompletions, or never reaches zero and nvmet_sq_destroy() sleeps\nforever, or percpu_ref_put() dereferences NULL after percpu_ref_exit().\nns->ref stays too low for good, so disabling the namespace hangs too.\nReproduced with KASAN over rxe with a test patch forcing the PI path.\n\nDrop the nvmet_req_uninit(). The branch still releases the RDMA context\nand the response, which is all the request owns at that point.","publishedAt":"2026-11-30T13:32:02.537Z","updatedAt":"2026-11-30T13:32:02.537Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b09160c3996c11d62a08f9534c755103a10a89b4","status":"affected","lessThan":"04284e1aaa2644d0545b4da5796032b9bbaf3bf7","versionType":"git"},{"version":"b09160c3996c11d62a08f9534c755103a10a89b4","status":"affected","lessThan":"8ad99847a4404d6511e9dc96d3424145594dc878","versionType":"git"},{"version":"b09160c3996c11d62a08f9534c755103a10a89b4","status":"affected","lessThan":"96ef50841a6b1dd9aca7e6161306574c16f9dab7","versionType":"git"},{"version":"b09160c3996c11d62a08f9534c755103a10a89b4","status":"affected","lessThan":"924393942038ea82073719ce999cc7272584f40e","versionType":"git"},{"version":"b09160c3996c11d62a08f9534c755103a10a89b4","status":"affected","lessThan":"5355474f0cef789cf22236351cf18d09ffa46984","versionType":"git"},{"version":"b09160c3996c11d62a08f9534c755103a10a89b4","status":"affected","lessThan":"7adbb35416225a013739854fc5014417a835b4ad","versionType":"git"},{"version":"b09160c3996c11d62a08f9534c755103a10a89b4","status":"affected","lessThan":"79c4b29b0520d52010caf94bc7b1b44c3e9de6f1","versionType":"git"},{"version":"b09160c3996c11d62a08f9534c755103a10a89b4","status":"affected","lessThan":"f1dac2a2e75260d1466d9f03ccf0944d6d0449a4","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/rdma.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.8","versionType":"semver"},{"version":"5.10.275","status":"unaffected","lessThanOrEqual":"5.10.*","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/rdma.c"]}],"references":["https://git.kernel.org/stable/c/04284e1aaa2644d0545b4da5796032b9bbaf3bf7","https://git.kernel.org/stable/c/8ad99847a4404d6511e9dc96d3424145594dc878","https://git.kernel.org/stable/c/96ef50841a6b1dd9aca7e6161306574c16f9dab7","https://git.kernel.org/stable/c/924393942038ea82073719ce999cc7272584f40e","https://git.kernel.org/stable/c/5355474f0cef789cf22236351cf18d09ffa46984","https://git.kernel.org/stable/c/7adbb35416225a013739854fc5014417a835b4ad","https://git.kernel.org/stable/c/79c4b29b0520d52010caf94bc7b1b44c3e9de6f1","https://git.kernel.org/stable/c/f1dac2a2e75260d1466d9f03ccf0944d6d0449a4"],"weaknesses":[],"ingestedAt":"2026-11-30T13:44:05.999Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139150.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139150","state":"PUBLISHED","datePublished":"2026-11-30T13:32:02.537Z","dateUpdated":"2026-11-30T13:32:02.537Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.917Z"},"containers":{"cna":{"title":"nvmet-rdma: fix double puts after a failed RDMA WRITE","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet-rdma: fix double puts after a failed RDMA WRITE\n\nFor a read with T10-PI the RDMA WRITE is posted alone and\nnvmet_rdma_write_data_done() posts the SEND once the metadata check\nresult is known. By then the request has been completed and its\nreferences put: __nvmet_req_complete() put ns->ref and the pc_ref, and\nnvmet_req_complete() sq->ref, right after queuing the response. The\nerror branch of nvmet_rdma_write_data_done() copies the one from\nnvmet_rdma_read_data_done() and calls nvmet_req_uninit(), which puts\nall three again. A WRITE fails whenever the connection ends with reads\nin flight, which is up to the host. Depending on timing the sq->ref\ncount goes to zero early and the queue is freed under the remaining\ncompletions, or never reaches zero and nvmet_sq_destroy() sleeps\nforever, or percpu_ref_put() dereferences NULL after percpu_ref_exit().\nns->ref stays too low for good, so disabling the namespace hangs too.\nReproduced with KASAN over rxe with a test patch forcing the PI path.\n\nDrop the nvmet_req_uninit(). The branch still releases the RDMA context\nand the response, which is all the request owns at that point."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b09160c3996c11d62a08f9534c755103a10a89b4","status":"affected","lessThan":"04284e1aaa2644d0545b4da5796032b9bbaf3bf7","versionType":"git"},{"version":"b09160c3996c11d62a08f9534c755103a10a89b4","status":"affected","lessThan":"8ad99847a4404d6511e9dc96d3424145594dc878","versionType":"git"},{"version":"b09160c3996c11d62a08f9534c755103a10a89b4","status":"affected","lessThan":"96ef50841a6b1dd9aca7e6161306574c16f9dab7","versionType":"git"},{"version":"b09160c3996c11d62a08f9534c755103a10a89b4","status":"affected","lessThan":"924393942038ea82073719ce999cc7272584f40e","versionType":"git"},{"version":"b09160c3996c11d62a08f9534c755103a10a89b4","status":"affected","lessThan":"5355474f0cef789cf22236351cf18d09ffa46984","versionType":"git"},{"version":"b09160c3996c11d62a08f9534c755103a10a89b4","status":"affected","lessThan":"7adbb35416225a013739854fc5014417a835b4ad","versionType":"git"},{"version":"b09160c3996c11d62a08f9534c755103a10a89b4","status":"affected","lessThan":"79c4b29b0520d52010caf94bc7b1b44c3e9de6f1","versionType":"git"},{"version":"b09160c3996c11d62a08f9534c755103a10a89b4","status":"affected","lessThan":"f1dac2a2e75260d1466d9f03ccf0944d6d0449a4","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/rdma.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.8","versionType":"semver"},{"version":"5.10.275","status":"unaffected","lessThanOrEqual":"5.10.*","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/rdma.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/04284e1aaa2644d0545b4da5796032b9bbaf3bf7"},{"url":"https://git.kernel.org/stable/c/8ad99847a4404d6511e9dc96d3424145594dc878"},{"url":"https://git.kernel.org/stable/c/96ef50841a6b1dd9aca7e6161306574c16f9dab7"},{"url":"https://git.kernel.org/stable/c/924393942038ea82073719ce999cc7272584f40e"},{"url":"https://git.kernel.org/stable/c/5355474f0cef789cf22236351cf18d09ffa46984"},{"url":"https://git.kernel.org/stable/c/7adbb35416225a013739854fc5014417a835b4ad"},{"url":"https://git.kernel.org/stable/c/79c4b29b0520d52010caf94bc7b1b44c3e9de6f1"},{"url":"https://git.kernel.org/stable/c/f1dac2a2e75260d1466d9f03ccf0944d6d0449a4"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:32:02.537Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"5.10.275"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"5.15.226"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.1.193"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}