summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2017-07-24 21:53:03 +0200
committerEric W. Biederman <ebiederm@xmission.com>2018-01-12 21:34:45 +0100
commit9943d3accb4ec5a85e72c65a9959257fa7d12500 (patch)
treed5de2c756cebab39175066202c56eda0b3b8deb8
parentsignal: Ensure no siginfo union member increases the size of struct siginfo (diff)
downloadlinux-9943d3accb4ec5a85e72c65a9959257fa7d12500.tar.xz
linux-9943d3accb4ec5a85e72c65a9959257fa7d12500.zip
signal: Clear si_sys_private before copying siginfo to userspace
In preparation for unconditionally copying the whole of siginfo to userspace clear si_sys_private. So this kernel internal value is guaranteed not to make it to userspace. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
-rw-r--r--kernel/signal.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index b9e5d825ee46..18aa55c1bb4f 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -643,6 +643,9 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
spin_unlock(&tsk->sighand->siglock);
posixtimer_rearm(info);
spin_lock(&tsk->sighand->siglock);
+
+ /* Don't expose the si_sys_private value to userspace */
+ info->si_sys_private = 0;
}
#endif
return signr;