From: Emese Revfy Date: Wed, 17 Apr 2013 19:03:26 +0000 (-0700) Subject: CHROMIUM: signal: stop info leak via the tkill and the tgkill syscalls X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Flinux.git;a=commitdiff_plain;h=59e70abe316cbb584c9aed6d405ae180c39d3531 CHROMIUM: signal: stop info leak via the tkill and the tgkill syscalls This fixes a kernel memory contents leak via the tkill and tgkill syscalls for compat processes. This is visible in the siginfo_t->_sifields._rt.si_sigval.sival_ptr field when handling signals delivered from tkill. The place of the infoleak: int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) { ... put_user_ex(ptr_to_compat(from->si_ptr), &to->si_ptr); ... } Signed-off-by: Emese Revfy Reviewed-by: PaX Team Signed-off-by: Kees Cook Cc: stable@vger.kernel.org BUG=chromium:223444 TEST=link build, PoC fails to show leaks [ sent to lkml: http://marc.info/?l=linux-kernel&m=136622640810847&w=2 ] Change-Id: If7603776a2f5dc28dceef4034f80b6979d18ca80 Signed-off-by: Kees Cook Reviewed-on: https://gerrit.chromium.org/gerrit/48390 Reviewed-by: Will Drewry --- diff --git a/kernel/signal.c b/kernel/signal.c index d62067937dba..0921e2687427 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -2876,7 +2876,7 @@ do_send_specific(pid_t tgid, pid_t pid, int sig, struct siginfo *info) static int do_tkill(pid_t tgid, pid_t pid, int sig) { - struct siginfo info; + struct siginfo info = {}; info.si_signo = sig; info.si_errno = 0;