diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-08-06 03:31:07 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-08 20:34:09 -0700 |
commit | 0535beef12f0d415e334516b981b2994b76b78cf (patch) | |
tree | 677ae3212dd6338d2a8293dbce55029a7d7f5d2a | |
parent | e9ddac8017a55bd2ab3ba5611403dcfcbf29e7be (diff) | |
download | lwn-0535beef12f0d415e334516b981b2994b76b78cf.tar.gz lwn-0535beef12f0d415e334516b981b2994b76b78cf.zip |
netrom: Fix nr_getname() leak
commit f6b97b29513950bfbf621a83d85b6f86b39ec8db upstream.
nr_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>
-rw-r--r-- | net/netrom/af_netrom.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 3be0e016ab7d..0c3e7551dbb7 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c @@ -848,6 +848,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 { |