IB/iser: Fix possible NULL deref at iser_inv_desc()
authorIsrael Rukshin <israelr@mellanox.com>
Wed, 26 Sep 2018 09:44:18 +0000 (09:44 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Nov 2019 17:00:53 +0000 (18:00 +0100)
commit24adb0e7d14b59266993b548de9ea2b60ea85570
treef3173ba3ecf7bc4feed6614993d150fe2b5f924f
parent2b149bb378bc34545549d2e8c35f2bbdf1debc92
IB/iser: Fix possible NULL deref at iser_inv_desc()

[ Upstream commit 65f07f5a09dacf3b60619f196f096ea3671a5eda ]

In case target remote invalidates bogus rkey and signature is not used,
pi_ctx is NULL deref.

The commit also fails the connection on bogus remote invalidation.

Fixes: 59caaed7a72a ("IB/iser: Support the remote invalidation exception")
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/ulp/iser/iser_initiator.c