diff options
author | 2017-07-20 16:47:21 +0000 | |
---|---|---|
committer | 2017-07-20 16:47:21 +0000 | |
commit | 2464381ce4efec2c8002fd2c4af6a1764eb1548f (patch) | |
tree | 4cd62e9b35fa3033bcf83e5c1a02ab598ec4d928 | |
parent | Avoid cross reference to mandoc(1) because it may cause a message (diff) | |
download | wireguard-openbsd-2464381ce4efec2c8002fd2c4af6a1764eb1548f.tar.xz wireguard-openbsd-2464381ce4efec2c8002fd2c4af6a1764eb1548f.zip |
Initialize a local variable to not leak kernel stack info to userland
if TIOCGPGRP fail.
Issue found by Ilja van Sprundel.
ok bluhm@, millert@, deraadt@
-rw-r--r-- | sys/kern/kern_descrip.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 827fc9502f6..623015f75fd 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_descrip.c,v 1.140 2017/02/11 19:51:06 guenther Exp $ */ +/* $OpenBSD: kern_descrip.c,v 1.141 2017/07/20 16:47:21 mpi Exp $ */ /* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */ /* @@ -435,6 +435,7 @@ restart: *retval = ((struct pipe *)fp->f_data)->pipe_pgid; break; } + tmp = 0; error = (*fp->f_ops->fo_ioctl) (fp, TIOCGPGRP, (caddr_t)&tmp, p); *retval = -tmp; |