From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:60814 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755242AbdCJIeI (ORCPT ); Fri, 10 Mar 2017 03:34:08 -0500 Subject: Patch "rdma_cm: fail iwarp accepts w/o connection params" has been added to the 4.4-stable tree To: swise@opengridcomputing.com, dledford@redhat.com, gregkh@linuxfoundation.org, sean.hefty@intel.com, shaobo@cs.utah.edu Cc: , From: Date: Fri, 10 Mar 2017 09:33:20 +0100 Message-ID: <1489134800045@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled rdma_cm: fail iwarp accepts w/o connection params to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: rdma_cm-fail-iwarp-accepts-w-o-connection-params.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From f2625f7db4dd0bbd16a9c7d2950e7621f9aa57ad Mon Sep 17 00:00:00 2001 From: Steve Wise Date: Tue, 21 Feb 2017 11:21:57 -0800 Subject: rdma_cm: fail iwarp accepts w/o connection params From: Steve Wise 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 Acked-by: Sean Hefty Signed-off-by: Steve Wise Signed-off-by: Doug Ledford Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/core/cma.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -3349,6 +3349,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; Patches currently in stable-queue which might be from swise@opengridcomputing.com are queue-4.4/rdma_cm-fail-iwarp-accepts-w-o-connection-params.patch