[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1365335522-29931-17-git-send-email-minipli@googlemail.com>
Date: Sun, 7 Apr 2013 13:52:02 +0200
From: Mathias Krause <minipli@...glemail.com>
To: "David S. Miller" <davem@...emloft.net>
Cc: netdev@...r.kernel.org,
Allan Stephens <allan.stephens@...driver.com>,
Aloisio Almeida Jr <aloisio.almeida@...nbossa.org>,
Andy King <acking@...are.com>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Dmitry Torokhov <dtor@...are.com>,
George Zhang <georgezhang@...are.com>,
Gustavo Padovan <gustavo@...ovan.org>,
Johan Hedberg <johan.hedberg@...il.com>,
Jon Maloy <jon.maloy@...csson.com>,
Lauro Ramos Venancio <lauro.venancio@...nbossa.org>,
Marcel Holtmann <marcel@...tmann.org>,
Ralf Baechle <ralf@...ux-mips.org>,
Samuel Ortiz <sameo@...ux.intel.com>,
Samuel Ortiz <samuel@...tiz.org>,
Sjur Braendeland <sjur.brandeland@...ricsson.com>,
Ursula Braun <ursula.braun@...ibm.com>,
Brad Spengler <spender@...ecurity.net>,
Mathias Krause <minipli@...glemail.com>
Subject: [PATCH 16/16] VSOCK: Fix missing msg_namelen update in vsock_stream_recvmsg()
The code misses to update the msg_namelen member to 0 and therefore
makes net/socket.c leak the local, uninitialized sockaddr_storage
variable to userland -- 128 bytes of kernel stack memory.
Cc: Andy King <acking@...are.com>
Cc: Dmitry Torokhov <dtor@...are.com>
Cc: George Zhang <georgezhang@...are.com>
Signed-off-by: Mathias Krause <minipli@...glemail.com>
---
net/vmw_vsock/af_vsock.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index ca511c4..08a228d 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -1670,6 +1670,8 @@ vsock_stream_recvmsg(struct kiocb *kiocb,
vsk = vsock_sk(sk);
err = 0;
+ msg->msg_namelen = 0;
+
lock_sock(sk);
if (sk->sk_state != SS_CONNECTED) {
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists