signal: fix information leak in copy_siginfo_from_user32
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / kernel / signal32.c
index 1670f15ef69e34972986081deb9b1f87b0bb2bb3..81fd38f4fbaaf1b9ef340aee5d1e2d8de9fa7d60 100644 (file)
@@ -201,8 +201,6 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, const siginfo_t *from)
 
 int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
 {
-       memset(to, 0, sizeof *to);
-
        if (copy_from_user(to, from, __ARCH_SI_PREAMBLE_SIZE) ||
            copy_from_user(to->_sifields._pad,
                           from->_sifields._pad, SI_PAD_SIZE))