nvmet-tcp: do not continue for invalid icreq
Subsystems (2)
PATCH 1/1 nvmet-tcp: do not continue for invalid icreq
From: Hannes Reinecke <[email protected]>
When the length check for an icreq sqe fails we should not continue processing but rather return immediately as all other contents of that sqe cannot be relied on.
Signed-off-by Hannes Reinecke <[email protected]>
--- drivers/nvme/target/tcp.c | 1 + 1 file changed, 1 insertion(+)
drivers/nvme/target/tcp.c +1 -0
@@ -898,6 +898,7 @@ static int nvmet_tcp_handle_icreq(struct nvmet_tcp_queue *queue)pr_err ("bad nvme-tcp pdu length (%d)\n" ,le32_to_cpu (icreq->hdr.plen));nvmet_tcp_fatal_error (queue); +return -EPROTO ; }if (icreq->pfv !=NVME_TCP_PFV_1_0 ) {
Signature · 1 line
2.35.3
Reviewed-by Sagi Grimberg <[email protected]>
Looks good:
Reviewed-by Christoph Hellwig <[email protected]>
Thanks, applied to nvme-6.9.