summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Rosenberg <drosenberg@vsecurity.com>2010-11-23 11:02:13 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2010-12-09 13:24:19 -0800
commit7f8ad3074fee297abee71d801c93a2ee0d90e451 (patch)
tree23f3e2b4090a6f95b5e0c245902ef20c29e2387b
parentec1793bd760a355fb69468f01705d3267651f8ca (diff)
downloadlwn-7f8ad3074fee297abee71d801c93a2ee0d90e451.tar.gz
lwn-7f8ad3074fee297abee71d801c93a2ee0d90e451.zip
DECnet: don't leak uninitialized stack byte
commit 3c6f27bf33052ea6ba9d82369fb460726fb779c0 upstream. A single uninitialized padding byte is leaked to userspace. Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--net/decnet/af_decnet.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index 3c23ab33dbc0..1140f81528b9 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -1558,6 +1558,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;