Kees Cook 854fbd6e5f lib/syscall: Clear return values when no stack
Commit:

  aa1f1a639621 ("lib/syscall: Pin the task stack in collect_syscall()")

... added logic to handle a process stack not existing, but left sp and pc
uninitialized, which can be later reported via /proc/$pid/syscall for zombie
processes, potentially exposing kernel memory to userspace.

  Zombie /proc/$pid/syscall before:
  -1 0xffffffff9a060100 0xffff92f42d6ad900

  Zombie /proc/$pid/syscall after:
  -1 0x0 0x0

Reported-by: Robert Święcki <robert@swiecki.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org # v4.9+
Fixes: aa1f1a639621 ("lib/syscall: Pin the task stack in collect_syscall()")
Link: http://lkml.kernel.org/r/20170323224616.GA92694@beast
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-03-24 07:43:35 +01:00
..
2017-02-24 17:46:57 -08:00
2016-10-11 15:06:30 -07:00
2017-02-24 17:46:57 -08:00
2017-01-24 12:23:35 -05:00
2017-01-24 12:23:35 -05:00
2017-02-24 17:46:57 -08:00
2017-02-13 21:44:10 -05:00
2016-05-23 17:04:14 -07:00
2016-12-06 10:17:03 +02:00
2017-03-07 13:18:23 -05:00
2017-02-24 17:46:57 -08:00
2017-02-24 17:46:56 -08:00
2016-05-30 15:26:57 -07:00
2016-08-02 17:31:41 -04:00
2017-02-27 18:43:47 -08:00