[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1288448801-6303-1-git-send-email-segooon@gmail.com>
Date: Sat, 30 Oct 2010 18:26:40 +0400
From: Vasiliy Kulikov <segooon@...il.com>
To: kernel-janitors@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <eric.dumazet@...il.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] net: core: sock: fix information leak to userland
"Address" variable might be not fully initialized in sock->ops->get_name().
The only current implementation is get_name(), it leaves some padding
fields of sockaddr_tipc uninitialized. It leads to leaking of contents
of kernel stack memory.
Signed-off-by: Vasiliy Kulikov <segooon@...il.com>
---
Compile tested.
net/core/sock.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index 3eed542..759dd81 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -930,6 +930,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
{
char address[128];
+ memset(&address, 0, sizeof(address));
if (sock->ops->getname(sock, (struct sockaddr *)address, &lv, 2))
return -ENOTCONN;
if (lv < len)
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists