Skip to content

Commit

Permalink
irda: Fix irda_getname() leak
Browse files Browse the repository at this point in the history
irda_getname() can leak kernel memory to user.

Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Eric Dumazet authored and davem330 committed Aug 6, 2009
1 parent 3d39247 commit 09384df
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/irda/af_irda.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 09384df

Please sign in to comment.