CVE-2026-139149
published high CVSS 3.1 · 7.5nvmet: don't clear sq->ctrl for a Connect with sqsize 0
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxb71df12605cabab47d58bd926badaf4130280e4d to < 6c6d541fdc556659d6e8d6d608d38fe03bbd82cd · b71df12605cabab47d58bd926badaf4130280e4d to < b6c4b529ef42c6995a75c2384a19fbd4f3740bb0 · b71df12605cabab47d58bd926badaf4130280e4d to < 24177b0909ed41af78e7b5f73e864bfc116fd806 · b71df12605cabab47d58bd926badaf4130280e4d to < 6c28bf6920b09baec6852d3ca58b52778e1464b9 · b71df12605cabab47d58bd926badaf4130280e4d to < 24b9e5fb0e160802950aa0caba19576edcc9094e · b71df12605cabab47d58bd926badaf4130280e4d to < 961ff9e3a453665574fa143ea5f496b97350333a · b71df12605cabab47d58bd926badaf4130280e4d to < 89480d137bf0d943a82c64f86ae2407a15276b5e · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.15 (affected) · 0 to < 5.15 (unaffected · semver) · 5.15.226 through 5.15.* (unaffected · semver) · 6.1.193 through 6.1.* (unaffected · semver) · 6.6.163 through 6.6.* (unaffected · semver) · 6.12.119 through 6.12.* (unaffected · semver) · 6.18.65 through 6.18.* (unaffected · semver) · 7.3.6 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: nvmet: don't clear sq->ctrl for a Connect with sqsize 0 nvmet_install_queue() checks sqsize first and jumps to err on zero, where sq->ctrl is set to NULL. Since commit b71df12605ca the cmpxchg() that sets sq->ctrl comes after the checks, so err now undoes a bind that this call never made. Over RDMA a host can send two Connects together and the second is parsed before the first executes, so a second Connect with sqsize 0 clears the sq->ctrl the first one set. The reference it held is never dropped and the controller leaks, with its cntlid, until reboot. The discovery subsystem lets any host do that, 20 connections leak around 10 controllers. A pending AER on such a queue hangs nvmet_sq_destroy() forever, and a queue can keep its "authenticated" mark across a rebind. Return the status directly, as the two checks after it do, so err is only reached after this call's cmpxchg() succeeded.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.5 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Scenarios
- en: AV:N - The malformed input is a second NVMe-oF Fabrics Connect capsule (qid 0, sqsize 0) sent by the remote host over nvmet-rdma. nvmet_rdma_handle_command() parses it with nvmet_req_init()/nvmet_parse_connect_cmd() while the first Connect's RDMA READ is still pending, then nvmet_install_queue() clears sq->ctrl. RoCEv2/iWARP are routable IP. nvmet-tcp is unaffected because it has only one queue->connect slot. AC:L - The attacker controls both sides. It posts two keyed-SGL Connects back to back on a new admin queue, so both are parsed while sq->ctrl is NULL, before nvmet_rdma_read_data_done() runs either one. If they arrive before ESTABLISHED, nvmet_rdma_queue_established() parses both in its loop. A miss costs only a reconnect; the commit reports about 10 leaked controllers per 20 connections. PR:N - nvmet_alloc_ctrl() admits any hostnqn to the well-known discovery subsystem: nvmet_host_allowed() returns true for nvmet_disc_subsys and nvmet_setup_auth() skips DH-HMAC-CHAP for it. The nvme_rdma_cm_req private data is not authenticated either, so the Connect pair needs no credentials. UI:N - No victim action is involved. The remote host sends its own Connects, then disconnects its own queue. That runs nvmet_rdma_free_queue()->nvmet_sq_destroy() with sq->ctrl == NULL, which skips the final nvmet_ctrl_put(). S:U - The leaked nvmet_ctrl and its cntlid stay inside the target kernel's own nvmet state. No VM, IOMMU or sandbox boundary is crossed. C:N - Nothing is disclosed. The leaked controller's stale ctrl->sqs[0] points at the freed nvmet_rdma_queue, but only the root-only 0400 debugfs host_traddr file reads it. The commit's 'authenticated mark kept across a rebind' needs DH-HMAC-CHAP to finish between the two Connects, and I found no path for that: the second Connect's RDMA READ runs ahead of any AUTH_SEND data READ. I:N - The defect drops a reference rather than freeing early: the err label of nvmet_install_queue() sets sq->ctrl = NULL, which pins the controller instead of freeing it. No remote actor writes through the stale sqs[0] pointer or modifies any data. A:H - Each hit leaks an nvmet_ctrl (128 error-log slots, changed_ns_list, debugfs dir) and its cntlid in the global cntlid_ida until reboot. Once the default IDs 1..0xffef run out, every later Connect fails CTRL_BUSY on every default-range subsystem, for all hosts. A pending AER on the cleared queue also hangs nvmet_sq_destroy() forever, because nvmet_async_events_failall() is skipped.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | b71df12605cabab47d58bd926badaf4130280e4d to < 6c6d541fdc556659d6e8d6d608d38fe03bbd82cd (affected · git)b71df12605cabab47d58bd926badaf4130280e4d to < b6c4b529ef42c6995a75c2384a19fbd4f3740bb0 (affected · git)b71df12605cabab47d58bd926badaf4130280e4d to < 24177b0909ed41af78e7b5f73e864bfc116fd806 (affected · git)b71df12605cabab47d58bd926badaf4130280e4d to < 6c28bf6920b09baec6852d3ca58b52778e1464b9 (affected · git)b71df12605cabab47d58bd926badaf4130280e4d to < 24b9e5fb0e160802950aa0caba19576edcc9094e (affected · git)b71df12605cabab47d58bd926badaf4130280e4d to < 961ff9e3a453665574fa143ea5f496b97350333a (affected · git)b71df12605cabab47d58bd926badaf4130280e4d to < 89480d137bf0d943a82c64f86ae2407a15276b5e (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 5.15 (affected)0 to < 5.15 (unaffected · semver)5.15.226 through 5.15.* (unaffected · semver)6.1.193 through 6.1.* (unaffected · semver)6.6.163 through 6.6.* (unaffected · semver)6.12.119 through 6.12.* (unaffected · semver)6.18.65 through 6.18.* (unaffected · semver)7.3.6 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
7- https://git.kernel.org/stable/c/24177b0909ed41af78e7b5f73e864bfc116fd806
- https://git.kernel.org/stable/c/24b9e5fb0e160802950aa0caba19576edcc9094e
- https://git.kernel.org/stable/c/6c28bf6920b09baec6852d3ca58b52778e1464b9
- https://git.kernel.org/stable/c/6c6d541fdc556659d6e8d6d608d38fe03bbd82cd
- https://git.kernel.org/stable/c/89480d137bf0d943a82c64f86ae2407a15276b5e
- https://git.kernel.org/stable/c/961ff9e3a453665574fa143ea5f496b97350333a
- https://git.kernel.org/stable/c/b6c4b529ef42c6995a75c2384a19fbd4f3740bb0
Provider assertions
1Linux · cna
nvmet: don't clear sq->ctrl for a Connect with sqsize 0
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- aa9f29e84422d930725465260af4b238cc7e9e69a2a163a3c52b4435e46ef82d
- Ingested
- 01 Dec 2026, 05:47:22 UTC
- Source record
- Official CVE record