From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:40020 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030566AbdD2GZ6 (ORCPT ); Sat, 29 Apr 2017 02:25:58 -0400 Subject: Patch "kcm: return immediately after copy_from_user() failure" has been added to the 4.9-stable tree To: xiyou.wangcong@gmail.com, davem@davemloft.net, gregkh@linuxfoundation.org, tom@herbertland.com Cc: , From: Date: Sat, 29 Apr 2017 08:24:01 +0200 Message-ID: <1493447041146190@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 kcm: return immediately after copy_from_user() failure to the 4.9-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: kcm-return-immediately-after-copy_from_user-failure.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Sat Apr 29 08:22:13 CEST 2017 From: WANG Cong Date: Thu, 23 Mar 2017 11:03:31 -0700 Subject: kcm: return immediately after copy_from_user() failure From: WANG Cong [ Upstream commit a80db69e47d764bbcaf2fec54b1f308925e7c490 ] There is no reason to continue after a copy_from_user() failure. Fixes: ab7ac4eb9832 ("kcm: Kernel Connection Multiplexor module") Cc: Tom Herbert Signed-off-by: Cong Wang Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/kcm/kcmsock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/net/kcm/kcmsock.c +++ b/net/kcm/kcmsock.c @@ -1685,7 +1685,7 @@ static int kcm_ioctl(struct socket *sock struct kcm_attach info; if (copy_from_user(&info, (void __user *)arg, sizeof(info))) - err = -EFAULT; + return -EFAULT; err = kcm_attach_ioctl(sock, &info); @@ -1695,7 +1695,7 @@ static int kcm_ioctl(struct socket *sock struct kcm_unattach info; if (copy_from_user(&info, (void __user *)arg, sizeof(info))) - err = -EFAULT; + return -EFAULT; err = kcm_unattach_ioctl(sock, &info); @@ -1706,7 +1706,7 @@ static int kcm_ioctl(struct socket *sock struct socket *newsock = NULL; if (copy_from_user(&info, (void __user *)arg, sizeof(info))) - err = -EFAULT; + return -EFAULT; err = kcm_clone(sock, &info, &newsock); Patches currently in stable-queue which might be from xiyou.wangcong@gmail.com are queue-4.9/ipv6-check-skb-protocol-before-lookup-for-nexthop.patch queue-4.9/kcm-return-immediately-after-copy_from_user-failure.patch