projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e07db0d
)
osf_wait4(): fix infoleak
author
Al Viro
<viro@zeniv.linux.org.uk>
Mon, 15 May 2017 01:47:25 +0000
(21:47 -0400)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 25 May 2017 12:30:17 +0000
(14:30 +0200)
commit
a8c39544a6eb2093c04afd5005b6192bd0e880c6
upstream.
failing sys_wait4() won't fill struct rusage...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/alpha/kernel/osf_sys.c
patch
|
blob
|
history
diff --git
a/arch/alpha/kernel/osf_sys.c
b/arch/alpha/kernel/osf_sys.c
index 6cc08166ff00d0f616b3a10146014e3ca4453d4b..63f06a2b1f7f8f41fc7dcc7d526964eceddb8f63 100644
(file)
--- a/
arch/alpha/kernel/osf_sys.c
+++ b/
arch/alpha/kernel/osf_sys.c
@@
-1188,8
+1188,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);