{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-139150",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-11-30T13:22:15.917Z",
        "datePublished": "2026-11-30T13:32:02.537Z",
        "dateUpdated": "2026-12-01T05:41:35.558Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-12-01T05:41:35.558Z"
            },
            "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."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 8.1,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:N - The fix patches nvmet_rdma_write_data_done(), which runs when the RDMA WRITE that nvmet_rdma_queue_response() posts for a PI-enabled Read fails. The host controls that failure: the rkey in the Read capsule's keyed SGL (nvmet_rdma_map_sgl_keyed) causes REM_ACCESS_ERR, and dropping the connection causes FLUSH_ERR. PI requires mlx5 (IBK_INTEGRITY_HANDOVER), which runs on RoCEv2, a routable fabric.\nAC:H - ctrl->pi_support needs two configfs opt-ins, both off by default: the port's param_pi_enable and the subsystem's attr_pi_enable. It also needs a bdev with a CRC integrity profile and an mlx5 HCA. The attacker cannot create that configuration. The UAF outcome also needs another read still at the backing device after the early zero.\nPR:N - nvmet_req_init() and the RDMA CM connect path check only the hostnqn the host asserts in the Connect capsule, unless the optional DH-HMAC-CHAP is configured. An unauthenticated fabric peer can therefore open an I/O queue and issue Reads, much like an AUTH_SYS client.\nUI:N - No victim action is needed. The remote host issues the Read and then makes the WRITE fail or flush itself, through its rkey or its own disconnect.\nS:U - The refcount corruption and use-after-free stay inside the target kernel's own nvmet structures (nvmet_rdma_queue, the rsps array, and the sq/ns percpu_refs). No VM, IOMMU or sandbox boundary is crossed.\nC:H - When other in-flight reads drive sq->ref to zero early, nvmet_rdma_free_queue() kfree()s the queue and rsps array. A late nvmet_bio_done()->nvmet_req_complete() then dereferences req->sq and req->ops from freed memory, a heap UAF that can be turned into a read primitive.\nI:H - The same late completion writes cqe fields into the freed rsp. It also calls req->ops->queue_response through a pointer loaded from freed memory, so reallocated contents control an indirect call.\nA:H - With nothing else outstanding, the extra put leaves sq->ref at -1 after percpu_ref_kill_and_confirm(), so nvmet_sq_destroy() waits on free_done forever, and repeated connects hang more teardown workers. The undercounted ns->ref makes nvmet_ns_disable() hang, and a put after percpu_ref_exit() dereferences NULL."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/nvme/target/rdma.c"
                    ],
                    "versions": [
                        {
                            "version": "b09160c3996c11d62a08f9534c755103a10a89b4",
                            "lessThan": "04284e1aaa2644d0545b4da5796032b9bbaf3bf7",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "b09160c3996c11d62a08f9534c755103a10a89b4",
                            "lessThan": "8ad99847a4404d6511e9dc96d3424145594dc878",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "b09160c3996c11d62a08f9534c755103a10a89b4",
                            "lessThan": "96ef50841a6b1dd9aca7e6161306574c16f9dab7",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "b09160c3996c11d62a08f9534c755103a10a89b4",
                            "lessThan": "924393942038ea82073719ce999cc7272584f40e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "b09160c3996c11d62a08f9534c755103a10a89b4",
                            "lessThan": "5355474f0cef789cf22236351cf18d09ffa46984",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "b09160c3996c11d62a08f9534c755103a10a89b4",
                            "lessThan": "7adbb35416225a013739854fc5014417a835b4ad",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "b09160c3996c11d62a08f9534c755103a10a89b4",
                            "lessThan": "79c4b29b0520d52010caf94bc7b1b44c3e9de6f1",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "b09160c3996c11d62a08f9534c755103a10a89b4",
                            "lessThan": "f1dac2a2e75260d1466d9f03ccf0944d6d0449a4",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/nvme/target/rdma.c"
                    ],
                    "versions": [
                        {
                            "version": "5.8",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.8",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.275",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.226",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.193",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.163",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.119",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.65",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.6",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc1",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "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"
                                }
                            ]
                        }
                    ]
                }
            ],
            "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"
                }
            ],
            "title": "nvmet-rdma: fix double puts after a failed RDMA WRITE",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}