diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2016-08-20 16:18:53 -0400 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 10:57:58 +0200 |
| commit | a8bf3beffe3b4f3b85dbfa98ec02ff2c67956642 (patch) | |
| tree | af0ed4cbed2c17012bd26b079d5a1f26aadfa4e7 /arch/mips/include/asm/uaccess.h | |
| parent | 204ecf7c2787420dde7be8d60dfd84c85c43ba1c (diff) | |
mips: copy_from_user() must zero the destination on access_ok() failure
commit e69d700535ac43a18032b3c399c69bf4639e89a2 upstream.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'arch/mips/include/asm/uaccess.h')
| -rw-r--r-- | arch/mips/include/asm/uaccess.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/include/asm/uaccess.h b/arch/mips/include/asm/uaccess.h index f3fa3750f..e09339df2 100644 --- a/arch/mips/include/asm/uaccess.h +++ b/arch/mips/include/asm/uaccess.h @@ -13,6 +13,7 @@ #include <linux/kernel.h> #include <linux/errno.h> #include <linux/thread_info.h> +#include <linux/string.h> /* * The fs value determines whether argument validity checking should be @@ -938,6 +939,8 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n); might_fault(); \ __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \ __cu_len); \ + } else { \ + memset(__cu_to, 0, __cu_len); \ } \ __cu_len; \ }) |
