Skip to content

Commit

Permalink
netrom: Fix nr_getname() leak
Browse files Browse the repository at this point in the history
nr_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 80922bb commit f6b97b2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/netrom/af_netrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,7 @@ static int nr_getname(struct socket *sock, struct sockaddr *uaddr,
sax->fsa_ax25.sax25_family = AF_NETROM;
sax->fsa_ax25.sax25_ndigis = 1;
sax->fsa_ax25.sax25_call = nr->user_addr;
memset(sax->fsa_digipeater, 0, sizeof(sax->fsa_digipeater));
sax->fsa_digipeater[0] = nr->dest_addr;
*uaddr_len = sizeof(struct full_sockaddr_ax25);
} else {
Expand Down

0 comments on commit f6b97b2

Please sign in to comment.