diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-05-14 21:47:25 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-05-21 13:10:07 -0400 |
commit | a8c39544a6eb2093c04afd5005b6192bd0e880c6 (patch) | |
tree | 4781aa7e6a1d7737ba0e8264f2f23560ced84188 /arch/alpha | |
parent | a7cc722fff0b32bcd28bf4722dff816b0b695f7d (diff) | |
download | lwn-a8c39544a6eb2093c04afd5005b6192bd0e880c6.tar.gz lwn-a8c39544a6eb2093c04afd5005b6192bd0e880c6.zip |
osf_wait4(): fix infoleak
failing sys_wait4() won't fill struct rusage...
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/alpha')
-rw-r--r-- | arch/alpha/kernel/osf_sys.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 9ec56dc97374..ce93124a850b 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -1201,8 +1201,10 @@ SYSCALL_DEFINE4(osf_wait4, pid_t, pid, int __user *, ustatus, int, options, if (!access_ok(VERIFY_WRITE, ur, sizeof(*ur))) return -EFAULT; - err = 0; - err |= put_user(status, ustatus); + err = put_user(status, ustatus); + if (ret < 0) + return err ? err : ret; + err |= __put_user(r.ru_utime.tv_sec, &ur->ru_utime.tv_sec); err |= __put_user(r.ru_utime.tv_usec, &ur->ru_utime.tv_usec); err |= __put_user(r.ru_stime.tv_sec, &ur->ru_stime.tv_sec); |