projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05d9d0b
)
mips: copy_from_user() must zero the destination on access_ok() failure
author
Al Viro
<viro@zeniv.linux.org.uk>
Sat, 20 Aug 2016 20:18:53 +0000
(16:18 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Tue, 13 Sep 2016 21:49:41 +0000
(17:49 -0400)
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/mips/include/asm/uaccess.h
patch
|
blob
|
history
diff --git
a/arch/mips/include/asm/uaccess.h
b/arch/mips/include/asm/uaccess.h
index 11b965f98d9589f7ba1686877a9f054a4c1ae42e..21a2aaba20d5ed4ae9eb551b19ab208dbf5aa3c2 100644
(file)
--- 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 *__to, const void *__from, size_t __n);
__cu_len = __invoke_copy_from_user(__cu_to, \
__cu_from, \
__cu_len); \
+ } else { \
+ memset(__cu_to, 0, __cu_len); \
} \
} \
__cu_len; \