Amanieu d'Antras 26135022f8 signal: fix information leak in copy_siginfo_to_user
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>
2015-08-07 04:39:40 +03:00
..
2012-09-17 13:42:21 +01:00
2015-05-27 13:22:24 +01:00
2014-05-29 09:08:08 +01:00
2014-12-09 13:12:47 -08:00
2015-06-02 17:44:51 +01:00
2014-07-10 12:36:40 +01:00
2014-09-25 15:35:41 +01:00
2015-04-24 08:23:45 -07:00
2014-11-28 10:24:59 +00:00
2015-07-01 11:53:46 -07:00
2015-04-13 20:40:10 +02:00
2015-01-27 09:38:08 +00:00