]> 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)
committerChristoph Hellwig <hch@lst.de>
Tue, 27 Sep 2022 07:22:08 +0000 (09:22 +0200)
commitf818f6c713002f65629c0325b0290f3613bc9ea7
tree446e00e2bd252c66f8a0191b4d4eea5c9fe6b0cf
parent139708b8006af1be39c4784f90f321a5fdd9edac
nvmet-tcp: add bounds check on Transfer Tag

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>
drivers/nvme/target/tcp.c