Subject: [PATCH] irda: Fix irda_getname() leak

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

irda_getname() can leak kernel memory to user.

Signed-off-by: Eric Dumazet <[email-masked]>
---
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index cb762c8..3ec2b43 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -714,6 +714,7 @@ static int irda_getname(struct socket *sock, struct sockaddr *uaddr,
 	struct sock *sk = sock->sk;
 	struct irda_sock *self = irda_sk(sk);
 
+	memset(&saddr, 0, sizeof(saddr));
 	if (peer) {
 		if (sk->sk_state != TCP_ESTABLISHED)
 			return -ENOTCONN;