From: Dan Rosenberg Date: Tue, 23 Nov 2010 11:02:13 +0000 (+0000) Subject: DECnet: don't leak uninitialized stack byte X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3c6f27bf33052ea6ba9d82369fb460726fb779c0;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git DECnet: don't leak uninitialized stack byte A single uninitialized padding byte is leaked to userspace. Signed-off-by: Dan Rosenberg CC: stable Signed-off-by: David S. Miller --- diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index a76b78de679f..6f97268ed85f 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c @@ -1556,6 +1556,8 @@ static int __dn_getsockopt(struct socket *sock, int level,int optname, char __us if (r_len > sizeof(struct linkinfo_dn)) r_len = sizeof(struct linkinfo_dn); + memset(&link, 0, sizeof(link)); + switch(sock->state) { case SS_CONNECTING: link.idn_linkstate = LL_CONNECTING;