]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 Jul 2023 10:17:07 +0000 (12:17 +0200)
commit9b4c100d1bc24e978700db43b65d7908a792ac35
tree4fa56110a77c7a4eb4cc7a1af8d105e491bb62c5
parentad97e36fe2868bb0c54b9ec05c662d6bb8821dc1
RDMA/siw: Fix potential page_array out of range access

BugLink: https://bugs.launchpad.net/bugs/2025067
[ 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: b9be6f18cf9e ("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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/infiniband/sw/siw/siw_qp_tx.c