From 50b487d01e495416f3b24c7fe9812d576bb0f340 Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Fri, 8 Feb 2019 16:52:55 +0000 Subject: Fix kernel info leak in routing message. from NetBSD; OK deraadt@ visa@ --- sys/net/rtsock.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/net/rtsock.c') 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; } -- cgit v1.2.3