]> git.itanic.dy.fi Git - linux-stable/commit
signal: fix information leak in copy_siginfo_to_user
authorAmanieu d'Antras <amanieu@gmail.com>
Thu, 6 Aug 2015 22:46:29 +0000 (15:46 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Aug 2015 03:51:51 +0000 (20:51 -0700)
commitd096e80771d3a68dbb559140a0b4c475ee5051cd
tree1ce7205b897f31a6313d8800a4cf57efcbed15ba
parentfda4653f0dd865a7d54ad53825cc74e15b75f70d
signal: fix information leak in copy_siginfo_to_user

commit 26135022f85105ad725cda103fa069e29e83bd16 upstream.

This function may copy the si_addr_lsb, si_lower and si_upper fields to
user mode when they haven't been initialized, which can leak kernel
stack data to user mode.

Just checking the value of si_code is insufficient because the same
si_code value is shared between multiple signals.  This is solved by
checking the value of si_signo in addition to si_code.

Signed-off-by: Amanieu d'Antras <amanieu@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/signal32.c
kernel/signal.c