From: Eric Dumazet Date: Thu, 6 Aug 2009 03:31:07 +0000 (+0000) Subject: netrom: Fix nr_getname() leak X-Git-Tag: v2.6.30.6~5 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0535beef12f0d415e334516b981b2994b76b78cf;p=karo-tx-linux.git netrom: Fix nr_getname() leak commit f6b97b29513950bfbf621a83d85b6f86b39ec8db upstream. nr_getname() can leak kernel memory to user. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- 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 {