Skip to contentSkip to conversation

core fix for 4.11

GIT PULL Thomas Gleixner 1 participant 1 message Apr 2, 2017 Library code

lore
Share & tools
lore
#0 lore raw

Linus,

please pull the latest core-urgent-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-urgent-for-linus

Prevent leaking kernel memory via /proc/$pid/syscall when the queried task is not in a syscall.

Thanks,

tglx

------------------>
Kees Cook (1):
lib/syscall: Clear return values when no stack

 lib/syscall.c | 1 +
 1 file changed, 1 insertion(+)
lib/syscall.c +1 -0
index 17d5ff5fa6a3..2c6cd1b5c3ea 100644
@@ -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;
 	}