[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <aad5b4ca27f0fe050129e61c3c80409fbc4f7344.1489497268.git.jslaby@suse.cz>
Date: Tue, 14 Mar 2017 14:15:27 +0100
From: Jiri Slaby <jslaby@...e.cz>
To: stable@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Steve Wise <swise@...ngridcomputing.com>,
Doug Ledford <dledford@...hat.com>, Jiri Slaby <jslaby@...e.cz>
Subject: [PATCH 3.12 36/60] rdma_cm: fail iwarp accepts w/o connection params
From: Steve Wise <swise@...ngridcomputing.com>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit f2625f7db4dd0bbd16a9c7d2950e7621f9aa57ad upstream.
cma_accept_iw() needs to return an error if conn_params is NULL.
Since this is coming from user space, we can crash.
Reported-by: Shaobo He <shaobo@...utah.edu>
Acked-by: Sean Hefty <sean.hefty@...el.com>
Signed-off-by: Steve Wise <swise@...ngridcomputing.com>
Signed-off-by: Doug Ledford <dledford@...hat.com>
Signed-off-by: Jiri Slaby <jslaby@...e.cz>
---
drivers/infiniband/core/cma.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 1429143301a7..ce6a1afcb410 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -2914,6 +2914,9 @@ static int cma_accept_iw(struct rdma_id_private *id_priv,
struct iw_cm_conn_param iw_param;
int ret;
+ if (!conn_param)
+ return -EINVAL;
+
ret = cma_modify_qp_rtr(id_priv, conn_param);
if (ret)
return ret;
--
2.12.0
Powered by blists - more mailing lists