nvme-tcp: fix UAF when detecting digest errors
We should also bail from the io_work loop when we set rd_enabled to true,
so we don't attempt to read data from the socket when the TCP stream is
already out-of-sync or corrupted.
Fixes: 3f2304f8c6
("nvme-tcp: add NVMe over TCP host driver")
Reported-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
6a02a61e81
commit
160f3549a9
|
@ -1229,7 +1229,7 @@ static void nvme_tcp_io_work(struct work_struct *w)
|
|||
else if (unlikely(result < 0))
|
||||
return;
|
||||
|
||||
if (!pending)
|
||||
if (!pending || !queue->rd_enabled)
|
||||
return;
|
||||
|
||||
} while (!time_after(jiffies, deadline)); /* quota is exhausted */
|
||||
|
|
Loading…
Reference in New Issue