]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
irda: Fix irda_getname() leak
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 6 Aug 2009 03:55:04 +0000 (03:55 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Sep 2009 03:34:07 +0000 (20:34 -0700)
commit 09384dfc76e526c3993c09c42e016372dc9dd22c upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/irda/af_irda.c

index e0fbcff6eb218eb8681f9bb16ed7da2f1e54e6d6..b06224bb06e63c1697752dedfaf085f00bba1799 100644 (file)
@@ -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;