OpenCloudOS-Kernel/drivers/infiniband/ulp
Md Haris Iqbal 01b9be936e RDMA/rtrs-clt: Reset cid to con_num - 1 to stay in bounds
[ Upstream commit 3e4289b29e216a55d08a89e126bc0b37cbad9f38 ]

In the function init_conns(), after the create_con() and create_cm() for
loop if something fails. In the cleanup for loop after the destroy tag, we
access out of bound memory because cid is set to clt_path->s.con_num.

This commits resets the cid to clt_path->s.con_num - 1, to stay in bounds
in the cleanup loop later.

Fixes: 6a98d71dae ("RDMA/rtrs: client: main functionality")
Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Grzegorz Prajsner <grzegorz.prajsner@ionos.com>
Link: https://patch.msgid.link/20240821112217.41827-7-haris.iqbal@ionos.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-10-04 16:29:31 +02:00
..
ipoib RDMA/IPoIB: Fix format truncation compilation errors 2024-06-12 11:12:11 +02:00
iser IB/iser: Prevent invalidating wrong MR 2024-01-25 15:35:40 -08:00
isert Revert "IB/isert: Fix incorrect release of isert connection" 2023-08-22 17:01:04 +03:00
opa_vnic IB: move from strlcpy with unused retval to strscpy 2022-08-21 14:18:02 +03:00
rtrs RDMA/rtrs-clt: Reset cid to con_num - 1 to stay in bounds 2024-10-04 16:29:31 +02:00
srp RDMA/srp: Do not call scsi_done() from srp_abort() 2023-09-11 14:15:58 +03:00
srpt RDMA/srpt: Do not register event handler until srpt device is fully setup 2024-03-26 18:19:58 -04:00
Makefile RDMA/rtrs: include client and server modules into kernel compilation 2020-05-17 18:57:15 -03:00