stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "wireless: wext: terminate ifr name coming from userspace" has been added to the 4.12-stable tree
@ 2017-08-08 23:29 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-08-08 23:29 UTC (permalink / raw)
  To: alexander.levin, davem, gregkh; +Cc: stable, stable-commits


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 <stable@vger.kernel.org> know about it.


>From foo@baz Tue Aug  8 16:27:29 PDT 2017
From: "Levin, Alexander" <alexander.levin@verizon.com>
Date: Tue, 18 Jul 2017 04:23:16 +0000
Subject: wireless: wext: terminate ifr name coming from userspace

From: "Levin, Alexander" <alexander.levin@verizon.com>


[ 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 <alexander.levin@verizon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-08 23:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-08 23:29 Patch "wireless: wext: terminate ifr name coming from userspace" has been added to the 4.12-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).