nvmet-tcp: propagate nvmet_tcp_build_pdu_iovec() errors to its callers
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 52a0a98549344ca20ad81a4176d68d28e3c05a5c · < ea8e356acb165cb1fd75537a52e1f66e5e76c538| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nvmet-tcp: propagate nvmet_tcp_build_pdu_iovec() errors to its callers
Currently, when nvmet_tcp_build_pdu_iovec() detects an out-of-bounds PDU length or offset, it triggers nvmet_tcp_fatal_error(cmd->queue) and returns early. However, because the function returns void, the callers are entirely unaware that a fatal error has occurred and that the cmd->recv_msg.msg_iter was left uninitialized.
Callers such as nvmet_tcp_handle_h2c_data_pdu() proceed to blindly overwrite the queue state with queue->rcv_state = NVMET_TCP_RECV_DATA Consequently, the socket receiving loop may attempt to read incoming network data into the uninitialized iterator.
Fix this by shifting the error handling responsibility to the callers.
From the CVE record · Linux
The Linux kernel’s nvmet-tcp component fails to pass PDU length or offset errors to its callers. When an out-of-bounds PDU is received over the network, the socket loop may try to read data into an uninitialized iterator. The input does not specify authentication or user-interaction requirements.
Operators running the Linux kernel with nvmet-tcp should check their installations; affected versions were not provided.