CVE-2026-139152: nvmet-tcp: don't read a removed port at Connect time
In the Linux kernel, the following vulnerability has been resolved:
nvmet-tcp: don't read a removed port at Connect time
nvmettcpalloccmd() takes the nvmet port of a command from queue->port, and the commands of a queue are allocated from the io work when the Connect arrives. nvmettcpremoveport() shuts down the queues that have no controller yet and frees the port without waiting for them, they're released later from a work. An io work handling a Connect at that moment reads the freed port for every command of the queue and hands the result to the core.
Note the nvmet port in the queue at allocation. It outlives the transport port.
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.10.275 - 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 - Compensating control
Record the nvmet port in the queue at allocation, rather than reading the port at Connect time.
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using the Linux kernel's NVMe target TCP transport (nvmet-tcp) are exposed when they accept Connect requests while an NVMe target port is being removed. The issue concerns queues that do not yet have a controller when the port-removal path runs.
What timing is required for exploitation or triggering?
A Connect request must be handled by I/O work at the same time nvmet_tcp_remove_port() shuts down queues without controllers and frees the transport port. The Connect handling can then allocate commands that read the freed port through queue->port.
What is the remediation described by the fix?
The fix records the NVMe target port in the queue during allocation rather than obtaining it from the transport port during command allocation. The stored queue port outlives the transport port, preventing command allocation from reading a removed port.