summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-04-02 09:18:59 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-04-02 09:18:59 -0700
commitada63c6159474aeb9d5f420d3378c3d340ceba17 (patch)
tree085c63e2fe04b9f03b2f15d4348d099990f038c5 /lib
parent346ce1d75c20ac74b131c28022ef814453d37564 (diff)
parent854fbd6e5f60fe99e8e3a569865409fca378f143 (diff)
Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core fix from Thomas Gleixner: "Prevent leaking kernel memory via /proc/$pid/syscall when the queried task is not in a syscall" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: lib/syscall: Clear return values when no stack
Diffstat (limited to 'lib')
-rw-r--r--lib/syscall.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/syscall.c b/lib/syscall.c
index 17d5ff5fa6a3..2c6cd1b5c3ea 100644
--- a/lib/syscall.c
+++ b/lib/syscall.c
@@ -12,6 +12,7 @@ static int collect_syscall(struct task_struct *target, long *callno,
if (!try_get_task_stack(target)) {
/* Task has no stack, so the task isn't in a syscall. */
+ *sp = *pc = 0;
*callno = -1;
return 0;
}