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.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
b71df12605cabab47d58bd926badaf4130280e4d to < 6c6d541fdc556659d6e8d6d608d38fe03bbd82cdaffectedb71df12605cabab47d58bd926badaf4130280e4d to < b6c4b529ef42c6995a75c2384a19fbd4f3740bb0affectedb71df12605cabab47d58bd926badaf4130280e4d to < 24177b0909ed41af78e7b5f73e864bfc116fd806affectedb71df12605cabab47d58bd926badaf4130280e4d to < 6c28bf6920b09baec6852d3ca58b52778e1464b9affectedb71df12605cabab47d58bd926badaf4130280e4d to < 24b9e5fb0e160802950aa0caba19576edcc9094eaffectedb71df12605cabab47d58bd926badaf4130280e4d to < 961ff9e3a453665574fa143ea5f496b97350333aaffectedb71df12605cabab47d58bd926badaf4130280e4d to < 89480d137bf0d943a82c64f86ae2407a15276b5eaffected
Linux Linux
Default version status: affected
5.15affected0 to < 5.15unaffected5.15.226 to ≤ 5.15.*unaffected6.1.193 to ≤ 6.1.*unaffected6.6.163 to ≤ 6.6.*unaffected6.12.119 to ≤ 6.12.*unaffected6.18.65 to ≤ 6.18.*unaffected7.3.6 to ≤ 7.3.*unaffected7.4-rc1 to ≤ *unaffected
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 ↗