Al Viro 6c85501f2f fix infoleak in waitid(2)
kernel_waitid() can return a PID, an error or 0.  rusage is filled in the first
case and waitid(2) rusage should've been copied out exactly in that case, *not*
whenever kernel_waitid() has not returned an error.  Compat variant shares that
braino; none of kernel_wait4() callers do, so the below ought to fix it.

Reported-and-tested-by: Alexander Potapenko <glider@google.com>
Fixes: ce72a16fa705 ("wait4(2)/waitid(2): separate copying rusage to userland")
Cc: stable@vger.kernel.org # v4.13
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2017-09-29 13:43:15 -04:00
..
2017-05-12 15:57:15 -07:00
2017-09-08 18:26:48 -07:00
2017-05-23 10:01:37 +02:00
2017-08-16 16:48:34 -07:00
2017-09-05 09:46:59 -04:00
2017-01-12 07:01:56 -07:00
2017-07-15 20:46:47 -04:00
2017-05-18 10:30:19 -06:00
2017-09-29 13:43:15 -04:00
2017-09-12 13:21:00 -07:00
2017-09-08 18:26:51 -07:00
2017-07-25 15:08:32 +02:00
2017-08-21 12:47:31 -07:00
2017-09-08 18:26:48 -07:00
2017-09-04 19:05:15 -04:00