]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/rtrs-srv: Avoid null pointer deref during path establishment
authorMd Haris Iqbal <haris.iqbal@ionos.com>
Wed, 21 Aug 2024 11:22:14 +0000 (13:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:51 +0000 (15:11 +0200)
commit394b2f4d5e014820455af3eb5859eb328eaafcfd
tree3d65e7b39ce87a394ddb0f7462b688cc1ed8e1ed
parenteb54979471aa97182e05aa4e91a1072fa862bf62
RDMA/rtrs-srv: Avoid null pointer deref during path establishment

[ Upstream commit d0e62bf7b575fbfe591f6f570e7595dd60a2f5eb ]

For RTRS path establishment, RTRS client initiates and completes con_num
of connections. After establishing all its connections, the information
is exchanged between the client and server through the info_req message.
During this exchange, it is essential that all connections have been
established, and the state of the RTRS srv path is CONNECTED.

So add these sanity checks, to make sure we detect and abort process in
error scenarios to avoid null pointer deref.

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-9-haris.iqbal@ionos.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/ulp/rtrs/rtrs-srv.c