nvmet-tcp: check return value of nvmet_tcp_set_queue_sock
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nvmet-tcp: check return value of nvmet_tcp_set_queue_sock
The return value of nvmet_tcp_set_queue_sock() is currently ignored in nvmet_tcp_tls_handshake_done(). If it fails (e.g., due to the socket not being in TCP_ESTABLISHED state), the socket callbacks will not be properly set, leading to queue and socket leakage.
Fix this by capturing the return value and calling nvmet_tcp_schedule_release_queue() on failure to ensure proper cleanup.
From the CVE record · Linux
The Linux kernel's nvmet-tcp component ignores a failure when setting up socket callbacks after a TLS handshake. If setup fails, such as when the socket is not in the TCP_ESTABLISHED state, the queue and socket can leak. The input does not specify how an attacker could trigger this condition or whether authentication or user interaction is required.
Engineers running Linux kernels with nvmet-tcp should check their installations; affected versions are not specified.