Commit 1c2228d7 authored by Varun Prakash's avatar Varun Prakash Committed by Jialin Zhang
Browse files

nvmet-tcp: add bounds check on Transfer Tag

stable inclusion
from stable-v5.10.150
commit d5bb45f47b37d10f010355686b28c9ebacb361d4
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0XA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d5bb45f47b37d10f010355686b28c9ebacb361d4



--------------------------------

[ Upstream commit b6a545ff ]

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: default avatarVarun Prakash <varun@chelsio.com>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parent ee49686d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment