Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1489254

[PATCH 4.7 171/184] mips: copy_from_user() must zero the destination on access_ok() failure

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 4.7 171/184] mips: copy_from_user() must zero the destination on access_ok() failure
Date Thu, 22 Sep 2016 20:00:04 +0200
Message-ID <skgrW-10r-101@gated-at.bofh.it> (permalink)
References <skgid-VW-5@gated-at.bofh.it>
X-Original-To linux-kernel@vger.kernel.org
X-Mailer git-send-email 2.10.0
User-Agent quilt/0.64
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 34
Organization linux.* mail to news gateway
X-Original-Cc Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>
X-Original-Date Thu, 22 Sep 2016 19:41:45 +0200
X-Original-Message-ID <20160922174056.018885691@linuxfoundation.org>
X-Original-References <20160922174048.653794923@linuxfoundation.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1489254

Show key headers only | View raw


4.7-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Al Viro <viro@zeniv.linux.org.uk>

commit e69d700535ac43a18032b3c399c69bf4639e89a2 upstream.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/mips/include/asm/uaccess.h |    3 +++
 1 file changed, 3 insertions(+)

--- a/arch/mips/include/asm/uaccess.h
+++ b/arch/mips/include/asm/uaccess.h
@@ -14,6 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/thread_info.h>
+#include <linux/string.h>
 #include <asm/asm-eva.h>
 
 /*
@@ -1170,6 +1171,8 @@ extern size_t __copy_in_user_eva(void *_
 			__cu_len = __invoke_copy_from_user(__cu_to,	\
 							   __cu_from,	\
 							   __cu_len);   \
+		} else {						\
+			memset(__cu_to, 0, __cu_len);			\
 		}							\
 	}								\
 	__cu_len;							\

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 4.7 171/184] mips: copy_from_user() must zero the destination on access_ok() failure Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-09-22 20:00 +0200

csiph-web