[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1497897167-14556-161-git-send-email-w@1wt.eu>
Date: Mon, 19 Jun 2017 20:30:59 +0200
From: Willy Tarreau <w@....eu>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
linux@...ck-us.net
Cc: Steve Wise <swise@...ngridcomputing.com>,
Doug Ledford <dledford@...hat.com>, Willy Tarreau <w@....eu>
Subject: [PATCH 3.10 160/268] rdma_cm: fail iwarp accepts w/o connection params
From: Steve Wise <swise@...ngridcomputing.com>
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: Willy Tarreau <w@....eu>
---
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 71c2c711..818cac9 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -2772,6 +2772,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.8.0.rc2.1.gbe9624a
Powered by blists - more mailing lists