summaryrefslogtreecommitdiffstats
path: root/net/netrom
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-08-06 05:31:07 +0200
committerDavid S. Miller <davem@davemloft.net>2009-08-06 22:08:43 +0200
commitf6b97b29513950bfbf621a83d85b6f86b39ec8db (patch)
tree6271c640ac365f409ffff31aa1343fd315c42841 /net/netrom
parenteconet: Fix econet_getname() leak (diff)
downloadlinux-f6b97b29513950bfbf621a83d85b6f86b39ec8db.tar.xz
linux-f6b97b29513950bfbf621a83d85b6f86b39ec8db.zip
netrom: Fix nr_getname() leak
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>
Diffstat (limited to 'net/netrom')
-rw-r--r--net/netrom/af_netrom.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index ce51ce012cda..ce1a34b99c23 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -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 {