linux/drivers/infiniband/ulp
Saravanan Vajravel 277fbf63b3 IB/isert: Fix incorrect release of isert connection
[ Upstream commit 699826f4e3 ]

The ib_isert module is releasing the isert connection both in
isert_wait_conn() handler as well as isert_free_conn() handler.
In isert_wait_conn() handler, it is expected to wait for iSCSI
session logout operation to complete. It should free the isert
connection only in isert_free_conn() handler.

When a bunch of iSER target is cleared, this issue can lead to
use-after-free memory issue as isert conn is twice released

Fixes: b02efbfc9a ("iser-target: Fix implicit termination of connections")
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Saravanan Vajravel <saravanan.vajravel@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Link: https://lore.kernel.org/r/20230606102531.162967-4-saravanan.vajravel@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2023-06-21 16:01:00 +02:00
..
ipoib IB/IPoIB: Fix legacy IPoIB due to wrong number of queues 2023-02-14 19:11:43 +01:00
iser IB/iser: Fix login with authentication 2022-08-16 15:56:33 +03:00
isert IB/isert: Fix incorrect release of isert connection 2023-06-21 16:01:00 +02:00
opa_vnic IB: move from strlcpy with unused retval to strscpy 2022-08-21 14:18:02 +03:00
rtrs RDMA/rtrs: Fix rxe_dealloc_pd warning 2023-06-21 16:00:57 +02:00
srp RDMA/srp: Move large values to a new enum for gcc13 2023-01-24 07:24:31 +01:00
srpt RDMA/srpt: Add a check for valid 'mad_agent' pointer 2023-05-11 23:03:34 +09:00
Makefile RDMA/rtrs: include client and server modules into kernel compilation 2020-05-17 18:57:15 -03:00