arc: don't leak bits of kernel stack into coredump
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 10 Sep 2016 20:31:04 +0000 (16:31 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Oct 2016 07:01:32 +0000 (03:01 -0400)
commit8cffabab018cad0dfcfe3ab44ff8c2510fc2408d
treea5f5ab5ac0d8a86645256b47416dbaba4faa1bf5
parentf2e81c026017222c18b178f175adf415c276b131
arc: don't leak bits of kernel stack into coredump

commit 7798bf2140ebcc36eafec6a4194fffd8d585d471 upstream.

On faulting sigreturn we do get SIGSEGV, all right, but anything
we'd put into pt_regs could end up in the coredump.  And since
__copy_from_user() never zeroed on arc, we'd better bugger off
on its failure without copying random uninitialized bits of
kernel stack into pt_regs...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arc/kernel/signal.c