]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/siw: Fix potential page_array out of range access
authorDaniil Dulov <d.dulov@aladdin.ru>
Mon, 27 Feb 2023 09:17:51 +0000 (01:17 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:35:50 +0000 (11:35 +0200)
commitace9205e71d20ce031017231e769b30e61f1a8f2
tree33d2f57c8f7ecf379707d384fd1e2db06f7c7c76
parente2e5f57eaf6b7f93d27ef14a00df68a2e8789d46
RDMA/siw: Fix potential page_array out of range access

[ Upstream commit 271bfcfb83a9f77cbae3d6e1a16e3c14132922f0 ]

When seg is equal to MAX_ARRAY, the loop should break, otherwise
it will result in out of range access.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 43654ff73ad1 ("rdma/siw: transmit path")
Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru>
Link: https://lore.kernel.org/r/20230227091751.589612-1-d.dulov@aladdin.ru
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/sw/siw/siw_qp_tx.c