projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
680d04e
)
VSOCK: Fix missing msg_namelen update in vsock_stream_recvmsg()
author
Mathias Krause
<
[email protected]
>
Sun, 7 Apr 2013 01:52:02 +0000
(
01:52
+0000)
committer
David S. Miller
<
[email protected]
>
Sun, 7 Apr 2013 20:28:02 +0000
(16:28 -0400)
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 <
[email protected]
>
Cc: Dmitry Torokhov <
[email protected]
>
Cc: George Zhang <
[email protected]
>
Signed-off-by: Mathias Krause <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/vmw_vsock/af_vsock.c
patch
|
blob
|
history
diff --git
a/net/vmw_vsock/af_vsock.c
b/net/vmw_vsock/af_vsock.c
index d8079daf1bdeaed0f341aaac673c8b9e1da7d96b..7f93e2a42d7a57f0cbdbe2305c942cce7b544d1b 100644
(file)
--- 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) {