summaryrefslogtreecommitdiff
path: root/sys/net/rtsock.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2019-02-08 16:52:55 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2019-02-08 16:52:55 +0000
commit50b487d01e495416f3b24c7fe9812d576bb0f340 (patch)
treea98a8bd1eecbb02cd2853cfd7628ef07b45ebe0f /sys/net/rtsock.c
parent1558e4f6fef1ac713c279d73adb2c60a86fbcc3a (diff)
Fix kernel info leak in routing message.
from NetBSD; OK deraadt@ visa@
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r--sys/net/rtsock.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index 89315b49466..a77e94c2ed5 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsock.c,v 1.282 2019/02/04 21:40:52 bluhm Exp $ */
+/* $OpenBSD: rtsock.c,v 1.283 2019/02/08 16:52:54 bluhm Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
@@ -1466,7 +1466,8 @@ again:
if (w->w_needed <= 0 && w->w_where) {
if (w->w_tmemsize < len) {
free(w->w_tmem, M_RTABLE, w->w_tmemsize);
- w->w_tmem = malloc(len, M_RTABLE, M_NOWAIT);
+ w->w_tmem = malloc(len, M_RTABLE,
+ M_NOWAIT | M_ZERO);
if (w->w_tmem)
w->w_tmemsize = len;
}