diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-04-02 12:18:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-04-02 12:18:59 -0400 |
commit | ada63c6159474aeb9d5f420d3378c3d340ceba17 (patch) | |
tree | 085c63e2fe04b9f03b2f15d4348d099990f038c5 | |
parent | 346ce1d75c20ac74b131c28022ef814453d37564 (diff) | |
parent | 854fbd6e5f60fe99e8e3a569865409fca378f143 (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
-rw-r--r-- | lib/syscall.c | 1 |
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, | |||
12 | 12 | ||
13 | if (!try_get_task_stack(target)) { | 13 | if (!try_get_task_stack(target)) { |
14 | /* Task has no stack, so the task isn't in a syscall. */ | 14 | /* Task has no stack, so the task isn't in a syscall. */ |
15 | *sp = *pc = 0; | ||
15 | *callno = -1; | 16 | *callno = -1; |
16 | return 0; | 17 | return 0; |
17 | } | 18 | } |