linux_dsm_epyc7002/drivers/infiniband
Md Haris Iqbal c6f81f3a9c RDMA/rtrs: Only allow addition of path to an already established session
[ Upstream commit 03e9b33a0fd677f554b03352646c13459bf60458 ]

While adding a path from the client side to an already established
session, it was possible to provide the destination IP to a different
server. This is dangerous.

This commit adds an extra member to the rtrs_msg_conn_req structure, named
first_conn; which is supposed to notify if the connection request is the
first for that session or not.

On the server side, if a session does not exist but the first_conn
received inside the rtrs_msg_conn_req structure is 1, the connection
request is failed. This signifies that the connection request is for an
already existing session, and since the server did not find one, it is an
wrong connection request.

Fixes: 6a98d71dae ("RDMA/rtrs: client: main functionality")
Fixes: 9cb8374804 ("RDMA/rtrs: server: main functionality")
Link: https://lore.kernel.org/r/20210212134525.103456-3-jinpu.wang@cloud.ionos.com
Signed-off-by: Md Haris Iqbal <haris.iqbal@cloud.ionos.com>
Reviewed-by: Lutz Pogrell <lutz.pogrell@cloud.ionos.com>
Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-04 11:38:08 +01:00
..
core RDMA/ucma: Fix use-after-free bug in ucma_create_uevent 2021-03-04 11:38:08 +01:00
hw RDMA/hns: Fixes missing error code of CMDQ 2021-03-04 11:38:08 +01:00
sw RDMA/siw: Fix calculation of tx_valid_cpus size 2021-03-04 11:38:05 +01:00
ulp RDMA/rtrs: Only allow addition of path to an already established session 2021-03-04 11:38:08 +01:00
Kconfig RMDA/sw: Don't allow drivers using dma_virt_ops on highmem configs 2020-11-12 13:27:41 -04:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00