Subject: [PATCH] econet: Fix econet_getname() leak

From: Eric Dumazet <[email-masked]>
Date: Thu, 06 Aug 2009 15:48:36 +0200

econet_getname() can leak kernel memory to user.

Signed-off-by: Eric Dumazet <[email-masked]>
---
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index e114da7..0e0254f 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -520,6 +520,7 @@ static int econet_getname(struct socket *sock, struct sockaddr *uaddr,
 	if (peer)
 		return -EOPNOTSUPP;
 
+	memset(sec, 0, sizeof(*sec));
 	mutex_lock(&econet_mutex);
 
 	sk = sock->sk;