CVE-2026-99571: nvme-tcp: Validate the queue state under the queue lock in the address attribute
In the Linux kernel, the following vulnerability has been resolved:
nvme-tcp: Validate the queue state under the queue lock in the address attribute
Reading the "address" sysfs attribute calls kernelgetsockname() on the admin queue socket, which can race with the queue teardown during connection error recovery: a reader can observe NVMETCPQLIVE set, then block on the queue lock while nvmetcpfreequeue() releases the socket and clears queue->sock without holding the lock. Once the reader acquires the lock it dereferences the NULL socket pointer.
Commit 76d54bf20cdc ("nvme-tcp: don't access released socket during error recovery") had the queue liveness check inside the lock. Commit 782373ba2766 ("nvme: tcp: avoid race between queuelock lock and destroy") moved it back out because the lock itself is destroyed in nvmetcpfreequeue(), so a reader arriving late trips mutexdestroy().
Check the queue liveness inside the queue lock, and clear queue->sock under the same lock. The teardown clears NVMETCPQLIVE under the lock well before the socket is released, so a reader either sees the bit cleared or a socket that cannot be released while it holds the lock. To also close the lock lifetime race, the queue locks are now owned by the controller: they are initialized with the queue array and only destroyed when the controller is freed, which cannot happen while a sysfs attribute read is still in progress. The queue count is computed by the NVMETCPOPTNRQUEUES() macro from the original connect options for both initialization and destruction, as reconnects may shrink ctrl->queuecount.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.2 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.7 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.5-1
Event History
Frequently Asked Questions
What conditions are required for the race to occur?
The nvme-tcp admin queue must be undergoing teardown during connection error recovery while the queue's "address" sysfs attribute is being read. The reader can observe the queue as live before waiting on the queue lock, after which teardown may release and clear the socket.
Who is exposed to this issue?
Systems using the Linux kernel nvme-tcp driver are exposed when a process reads the affected admin queue sysfs address attribute concurrently with connection-error recovery. The supplied data does not identify affected kernel versions or sysfs permission requirements.
What does the fix change?
The fix validates queue liveness while holding the queue lock and clears the queue socket under that same lock. This ensures an attribute reader sees either a non-live queue or a socket that cannot be released while the reader holds the lock.