Skip to content

Commit

Permalink
rose: Fix rose_getname() leak
Browse files Browse the repository at this point in the history
rose_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 b4adbb4 commit 17ac2e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/rose/af_rose.c
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,7 @@ static int rose_getname(struct socket *sock, struct sockaddr *uaddr,
struct rose_sock *rose = rose_sk(sk);
int n;

memset(srose, 0, sizeof(*srose));
if (peer != 0) {
if (sk->sk_state != TCP_ESTABLISHED)
return -ENOTCONN;
Expand Down

0 comments on commit 17ac2e9

Please sign in to comment.