From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:50684 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752675AbdHHX3g (ORCPT ); Tue, 8 Aug 2017 19:29:36 -0400 Subject: Patch "wireless: wext: terminate ifr name coming from userspace" has been added to the 4.12-stable tree To: alexander.levin@verizon.com, davem@davemloft.net, gregkh@linuxfoundation.org Cc: , From: Date: Tue, 08 Aug 2017 16:29:34 -0700 Message-ID: <150223497470144@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 wireless: wext: terminate ifr name coming from userspace to the 4.12-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: wireless-wext-terminate-ifr-name-coming-from-userspace.patch and it can be found in the queue-4.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Tue Aug 8 16:27:29 PDT 2017 From: "Levin, Alexander" Date: Tue, 18 Jul 2017 04:23:16 +0000 Subject: wireless: wext: terminate ifr name coming from userspace From: "Levin, Alexander" [ Upstream commit 98de4e0ea47d106846fc0e30ce4e644283fa7fc2 ] ifr name is assumed to be a valid string by the kernel, but nothing was forcing username to pass a valid string. In turn, this would cause panics as we tried to access the string past it's valid memory. Signed-off-by: Sasha Levin Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/core/dev_ioctl.c | 2 ++ 1 file changed, 2 insertions(+) --- a/net/core/dev_ioctl.c +++ b/net/core/dev_ioctl.c @@ -423,6 +423,8 @@ int dev_ioctl(struct net *net, unsigned if (copy_from_user(&iwr, arg, sizeof(iwr))) return -EFAULT; + iwr.ifr_name[sizeof(iwr.ifr_name) - 1] = 0; + return wext_handle_ioctl(net, &iwr, cmd, arg); } Patches currently in stable-queue which might be from alexander.levin@verizon.com are queue-4.12/packet-fix-use-after-free-in-prb_retire_rx_blk_timer_expired.patch queue-4.12/wireless-wext-terminate-ifr-name-coming-from-userspace.patch