Subject: [PATCH] DECnet: don't leak uninitialized stack byte

From: Dan Rosenberg <[email-masked]>
Date: Tue, 23 Nov 2010 16:02:13 -0500

A single uninitialized padding byte is leaked to userspace.

Signed-off-by: Dan Rosenberg <[email-masked]>
CC: stable <[email-masked]>
---

 net/decnet/af_decnet.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index d6b93d1..cf38f52 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;