diff options
author | Kulikov Vasiliy <segooon@gmail.com> | 2010-10-31 07:10:32 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-14 16:53:50 -0700 |
commit | 4312007ec44ba76536bd660a236701a7de21e98b (patch) | |
tree | 991b362ef29f622317cc9b08e2bf06b845890759 | |
parent | fe540c34cb49e6f1d5501fa89b5e552819f45c93 (diff) |
net: tipc: fix information leak to userland
commit 88f8a5e3e7defccd3925cabb1ee4d3994e5cdb52 upstream.
Structure sockaddr_tipc is copied to userland with padding bytes after
"id" field in union field "name" unitialized. It leads to leaking of
contents of kernel stack memory. We have to initialize them to zero.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | net/tipc/socket.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index e6d9abf7440..8ebf4975a0f 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -393,6 +393,7 @@ static int get_name(struct socket *sock, struct sockaddr *uaddr, struct sockaddr_tipc *addr = (struct sockaddr_tipc *)uaddr; struct tipc_sock *tsock = tipc_sk(sock->sk); + memset(addr, 0, sizeof(*addr)); if (peer) { if ((sock->state != SS_CONNECTED) && ((peer != 2) || (sock->state != SS_DISCONNECTING))) |