summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-08-06 05:55:04 +0200
committerDavid S. Miller <davem@davemloft.net>2009-08-06 22:08:46 +0200
commit09384dfc76e526c3993c09c42e016372dc9dd22c (patch)
treeb93d8030e280c357e71c3efe6e5e39e454e3fdcd
parentappletalk: fix atalk_getname() leak (diff)
downloadlinux-09384dfc76e526c3993c09c42e016372dc9dd22c.tar.xz
linux-09384dfc76e526c3993c09c42e016372dc9dd22c.zip
irda: Fix irda_getname() leak
irda_getname() can leak kernel memory to user. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/irda/af_irda.c1
1 files changed, 1 insertions, 0 deletions
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;