CVE-2026-139149: nvmet: don't clear sq->ctrl for a Connect with sqsize 0
In the Linux kernel, the following vulnerability has been resolved:
nvmet: don't clear sq->ctrl for a Connect with sqsize 0
nvmetinstallqueue() 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 nvmetsqdestroy() 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.226 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.119 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch b71df12605ca
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
The discovery subsystem is exposed over RDMA. Any host can trigger the condition there by sending Connect requests in the required sequence.
What does an attacker need to do to trigger the problem?
Over RDMA, the attacker can send two Connect requests together so that the second is parsed before the first executes. The second Connect must specify an sqsize of 0, causing it to clear the controller binding established by the first request.
What is the operational impact after exploitation?
Controllers and their cntlid values can leak until reboot; approximately 20 connections can leak around 10 controllers. A pending AER on an affected queue can cause nvmet_sq_destroy() to hang indefinitely, and a queue may retain its authenticated mark across a rebind.