aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi
diff options
context:
space:
mode:
authorSagi Grimberg <[email protected]>2021-02-03 01:20:25 -0800
committerChristoph Hellwig <[email protected]>2021-02-03 16:57:36 +0100
commitcb8563f5c735a042ea2dd7df1ad55ae06d63ffeb (patch)
tree81c4f3e276b7dcec9bdfde8d9a5b5ec5d23186c8 /lib/mpi
parent46121fa7c2dc55bcbb729b6a2ab323aa1e8986cf (diff)
nvmet-tcp: fix out-of-bounds access when receiving multiple h2cdata PDUs
When the host sends multiple h2cdata PDUs, we keep track on the receive progress and calculate the scatterlist index and offsets. The issue is that sg_offset should only be kept for the first iov entry we map in the iovec as this is the difference between our cursor and the sg entry offset itself. In addition, the sg index was calculated wrong because we should not round up when dividing the command byte offset with PAG_SIZE. Fixes: 872d26a391da ("nvmet-tcp: add NVMe over TCP target driver") Reported-by: Narayan Ayalasomayajula <[email protected]> Tested-by: Narayan Ayalasomayajula <[email protected]> Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'lib/mpi')
0 files changed, 0 insertions, 0 deletions