]> git.ipfire.org Git - thirdparty/kernel/stable.git/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)
committerJiri Slaby <jslaby@suse.cz>
Tue, 25 Aug 2015 14:57:03 +0000 (16:57 +0200)
commited5dbb4e2a71ab04d0d4d7be83e28ab774aefdf8
tree5924d9710c4ae57dff723bac325f5a7a41a7ac00
parentce624e9ce4ef6efa702698ba52e793a84f96d606
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: Jiri Slaby <jslaby@suse.cz>
arch/arm64/kernel/signal32.c
kernel/signal.c