CHROMIUM: signal: stop info leak via the tkill and the tgkill syscalls
authorEmese Revfy <re.emese@gmail.com>
Wed, 17 Apr 2013 19:03:26 +0000 (12:03 -0700)
committerChromeBot <chrome-bot@google.com>
Thu, 18 Apr 2013 22:56:46 +0000 (15:56 -0700)
commit59e70abe316cbb584c9aed6d405ae180c39d3531
tree72e8fca81a51f4efe3916aad4a33c0aac6597d4f
parentd5d937a9e25de0320c401bd751d5d197d8adf5b1
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 <re.emese@gmail.com>
Reviewed-by: PaX Team <pageexec@freemail.hu>
Signed-off-by: Kees Cook <keescook@chromium.org>
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 <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/48390
Reviewed-by: Will Drewry <wad@chromium.org>
kernel/signal.c