From: Eric Dumazet Date: Thu, 6 Aug 2009 03:55:04 +0000 (+0000) Subject: irda: Fix irda_getname() leak X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=09384dfc76e526c3993c09c42e016372dc9dd22c;p=linux-beck.git irda: Fix irda_getname() leak irda_getname() can leak kernel memory to user. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index cb762c8723ea..3ec2b434ea75 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;