]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet-tcp: add bounds check on Transfer Tag
authorVarun Prakash <varun@chelsio.com>
Tue, 20 Sep 2022 18:36:49 +0000 (00:06 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:22:58 +0000 (13:22 +0200)
commit735b8457549447ebc794e92ca634b0f0c9116e71
tree888c82eace9aa1ad97f7086c82989b873ed64145
parent9e95015cf6a59ee4786c0705bc90a385d235be98
nvmet-tcp: add bounds check on Transfer Tag

[ Upstream commit c685d197247be54b291fde68b2888e05388bfe24 ]

ttag is used as an index to get cmd in nvmet_tcp_handle_h2c_data_pdu(),
add a bounds check to avoid out-of-bounds access.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/target/tcp.c