Skip to content

Commit

Permalink
econet: Fix econet_getname() leak
Browse files Browse the repository at this point in the history
econet_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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Aug 6, 2009
1 parent 17ac2e9 commit 80922bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/econet/af_econet.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ static int econet_getname(struct socket *sock, struct sockaddr *uaddr,
if (peer)
return -EOPNOTSUPP;

memset(sec, 0, sizeof(*sec));
mutex_lock(&econet_mutex);

sk = sock->sk;
Expand Down

0 comments on commit 80922bb

Please sign in to comment.