From: Al Viro Date: Sat, 20 Aug 2016 20:18:53 +0000 (-0400) Subject: mips: copy_from_user() must zero the destination on access_ok() failure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e69d700535ac43a18032b3c399c69bf4639e89a2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mips: copy_from_user() must zero the destination on access_ok() failure Cc: stable@vger.kernel.org Signed-off-by: Al Viro --- diff --git a/arch/mips/include/asm/uaccess.h b/arch/mips/include/asm/uaccess.h index 11b965f98d95..21a2aaba20d5 100644 --- a/arch/mips/include/asm/uaccess.h +++ b/arch/mips/include/asm/uaccess.h @@ -14,6 +14,7 @@ #include #include #include +#include #include /* @@ -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; \