[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170310083954.019687122@linuxfoundation.org>
Date: Fri, 10 Mar 2017 10:09:10 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Shaobo He <shaobo@...utah.edu>,
Sean Hefty <sean.hefty@...el.com>,
Steve Wise <swise@...ngridcomputing.com>,
Doug Ledford <dledford@...hat.com>
Subject: [PATCH 4.9 117/153] rdma_cm: fail iwarp accepts w/o connection params
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
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: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/infiniband/core/cma.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -3540,6 +3540,9 @@ static int cma_accept_iw(struct rdma_id_
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;
Powered by blists - more mailing lists