diff options
author | 2018-11-17 18:55:50 +0000 | |
---|---|---|
committer | 2018-11-17 18:55:50 +0000 | |
commit | b20a1666616e9e8e7b0cbfa88a220e6295a3c9c6 (patch) | |
tree | 8e9a24ae68824232ef56a68ef6645c9ecca77639 | |
parent | Use a very regular call pattern to pledge, so that we can continue to (diff) | |
download | wireguard-openbsd-b20a1666616e9e8e7b0cbfa88a220e6295a3c9c6.tar.xz wireguard-openbsd-b20a1666616e9e8e7b0cbfa88a220e6295a3c9c6.zip |
Avoid leaking kernel memory in struct kevent padding.
From NetBSD (maxv). OK deraadt@ visa@
-rw-r--r-- | sys/kern/kern_event.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 1af10f0b1b9..8a4ede8ae90 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_event.c,v 1.99 2018/09/04 02:38:25 cheloha Exp $ */ +/* $OpenBSD: kern_event.c,v 1.100 2018/11/17 18:55:50 millert Exp $ */ /*- * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org> @@ -309,6 +309,7 @@ filt_proc(struct knote *kn, long hint) /* * register knote with new process. */ + memset(&kev, 0, sizeof(kev)); kev.ident = hint & NOTE_PDATAMASK; /* pid */ kev.filter = kn->kn_filter; kev.flags = kn->kn_flags | EV_ADD | EV_ENABLE | EV_FLAG1; |