DECnet: don't leak uninitialized stack byte
authorDan Rosenberg <drosenberg@vsecurity.com>
Tue, 23 Nov 2010 11:02:13 +0000 (11:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 28 Nov 2010 19:32:30 +0000 (11:32 -0800)
A single uninitialized padding byte is leaked to userspace.

Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
CC: stable <stable@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/decnet/af_decnet.c

index a76b78de679fa7e928cfae7b62c0a7e73c2256dd..6f97268ed85fe5de5b5d3318a038f49d0f65629e 100644 (file)
@@ -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;