]> 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)
commit6c0feb0bfecd51a94d170422a3eb07ac11a0f869
tree888c82eace9aa1ad97f7086c82989b873ed64145
parentadf6bfe8a19e8c19ee28c2d0f199eec947a9daae
nvmet-tcp: add bounds check on Transfer Tag

[ Upstream commit f818f6c713002f65629c0325b0290f3613bc9ea7 ]

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