<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/vmw_vsock, branch v3.15.5</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/vmw_vsock?h=v3.15.5</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/vmw_vsock?h=v3.15.5'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-05-05T17:13:50Z</updated>
<entry>
<title>vsock: Make transport the proto owner</title>
<updated>2014-05-05T17:13:50Z</updated>
<author>
<name>Andy King</name>
<email>acking@vmware.com</email>
</author>
<published>2014-05-01T22:20:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2c4a336e0a3e203fab6aa8d8f7bb70a0ad968a6b'/>
<id>urn:sha1:2c4a336e0a3e203fab6aa8d8f7bb70a0ad968a6b</id>
<content type='text'>
Right now the core vsock module is the owner of the proto family. This
means there's nothing preventing the transport module from unloading if
there are open sockets, which results in a panic. Fix that by allowing
the transport to be the owner, which will refcount it properly.

Includes version bump to 1.0.1.0-k

Passes checkpatch this time, I swear...

Acked-by: Dmitry Torokhov &lt;dtor@vmware.com&gt;
Signed-off-by: Andy King &lt;acking@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Fix use after free by removing length arg from sk_data_ready callbacks.</title>
<updated>2014-04-11T20:15:36Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2014-04-11T20:15:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=676d23690fb62b5d51ba5d659935e9f7d9da9f8e'/>
<id>urn:sha1:676d23690fb62b5d51ba5d659935e9f7d9da9f8e</id>
<content type='text'>
Several spots in the kernel perform a sequence like:

	skb_queue_tail(&amp;sk-&gt;s_receive_queue, skb);
	sk-&gt;sk_data_ready(sk, skb-&gt;len);

But at the moment we place the SKB onto the socket receive queue it
can be consumed and freed up.  So this skb-&gt;len access is potentially
to freed up memory.

Furthermore, the skb-&gt;len can be modified by the consumer so it is
possible that the value isn't accurate.

And finally, no actual implementation of this callback actually uses
the length argument.  And since nobody actually cared about it's
value, lots of call sites pass arbitrary values in such as '0' and
even '1'.

So just remove the length argument from the callback, that way there
is no confusion whatsoever and all of these use-after-free cases get
fixed as a side effect.

Based upon a patch by Eric Dumazet and his suggestion to audit this
issue tree-wide.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: add build-time checks for msg-&gt;msg_name size</title>
<updated>2014-01-19T07:04:16Z</updated>
<author>
<name>Steffen Hurrle</name>
<email>steffen@hurrle.net</email>
</author>
<published>2014-01-17T21:53:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=342dfc306fb32155314dad277f3c3686b83fb9f1'/>
<id>urn:sha1:342dfc306fb32155314dad277f3c3686b83fb9f1</id>
<content type='text'>
This is a follow-up patch to f3d3342602f8bc ("net: rework recvmsg
handler msg_name and msg_namelen logic").

DECLARE_SOCKADDR validates that the structure we use for writing the
name information to is not larger than the buffer which is reserved
for msg-&gt;msg_name (which is 128 bytes). Also use DECLARE_SOCKADDR
consistently in sendmsg code paths.

Signed-off-by: Steffen Hurrle &lt;steffen@hurrle.net&gt;
Suggested-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Acked-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: rework recvmsg handler msg_name and msg_namelen logic</title>
<updated>2013-11-21T02:52:30Z</updated>
<author>
<name>Hannes Frederic Sowa</name>
<email>hannes@stressinduktion.org</email>
</author>
<published>2013-11-21T02:14:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f3d3342602f8bcbf37d7c46641cb9bca7618eb1c'/>
<id>urn:sha1:f3d3342602f8bcbf37d7c46641cb9bca7618eb1c</id>
<content type='text'>
This patch now always passes msg-&gt;msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size &lt;= sizeof(struct sockaddr_storage)
to return msg_name to the user.

This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers and makes it harder for new code to accidentally leak
uninitialized memory.

Optimize for the case recvfrom is called with NULL as address. We don't
need to copy the address at all, so set it to NULL before invoking the
recvmsg handler. We can do so, because all the recvmsg handlers must
cope with the case a plain read() is called on them. read() also sets
msg_name to NULL.

Also document these changes in include/linux/net.h as suggested by David
Miller.

Changes since RFC:

Set msg-&gt;msg_name = NULL if user specified a NULL in msg_name but had a
non-null msg_namelen in verify_iovec/verify_compat_iovec. This doesn't
affect sendto as it would bail out earlier while trying to copy-in the
address. It also more naturally reflects the logic by the callers of
verify_iovec.

With this change in place I could remove "
if (!uaddr || msg_sys-&gt;msg_namelen == 0)
	msg-&gt;msg_name = NULL
".

This change does not alter the user visible error logic as we ignore
msg_namelen as long as msg_name is NULL.

Also remove two unnecessary curly brackets in ___sys_recvmsg and change
comments to netdev style.

Cc: David Miller &lt;davem@davemloft.net&gt;
Suggested-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>treewide: Fix typo in Kconfig</title>
<updated>2013-10-14T13:23:02Z</updated>
<author>
<name>Masanari Iida</name>
<email>standby24x7@gmail.com</email>
</author>
<published>2013-09-29T11:54:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8c88126bbbb1c1e6c499fb3c211dba93656f02b5'/>
<id>urn:sha1:8c88126bbbb1c1e6c499fb3c211dba93656f02b5</id>
<content type='text'>
Correct spelling typo in Kconfig.

Signed-off-by: Masanari Iida &lt;standby24x7@gmail.com&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2013-08-16T22:37:26Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2013-08-16T22:37:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2ff1cf12c9fe70e75e600404e6a4274b19d293ed'/>
<id>urn:sha1:2ff1cf12c9fe70e75e600404e6a4274b19d293ed</id>
<content type='text'>
</content>
</entry>
<entry>
<title>net/vmw_vsock/af_vsock.c: drop unneeded semicolon</title>
<updated>2013-08-05T18:07:44Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2013-08-05T14:47:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d9af2d67e490b48f0d36f448d34e7bab9425f142'/>
<id>urn:sha1:d9af2d67e490b48f0d36f448d34e7bab9425f142</id>
<content type='text'>
Drop the semicolon at the end of the list_for_each_entry loop header.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>VSOCK: Move af_vsock.h and vsock_addr.h to include/net</title>
<updated>2013-07-28T05:14:06Z</updated>
<author>
<name>Asias He</name>
<email>asias@redhat.com</email>
</author>
<published>2013-07-25T09:39:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=82a54d0ebbee03a8dcf4e1e4016a53fed4d6c933'/>
<id>urn:sha1:82a54d0ebbee03a8dcf4e1e4016a53fed4d6c933</id>
<content type='text'>
This is useful for other VSOCK transport implemented outside the
net/vmw_vsock/ directory to use these headers.

Signed-off-by: Asias He &lt;asias@redhat.com&gt;
Acked-by: Andy King &lt;acking@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>VSOCK: Fix VSOCK_HASH and VSOCK_CONN_HASH</title>
<updated>2013-06-24T06:51:48Z</updated>
<author>
<name>Asias He</name>
<email>asias@redhat.com</email>
</author>
<published>2013-06-20T09:20:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a49dd9dcb50195b35a5e59eb65b8e56584874630'/>
<id>urn:sha1:a49dd9dcb50195b35a5e59eb65b8e56584874630</id>
<content type='text'>
If we mod with VSOCK_HASH_SIZE -1, we get 0, 1, .... 249.  Actually, we
have vsock_bind_table[0 ... 250] and vsock_connected_table[0 .. 250].
In this case the last entry will never be used.

We should mod with VSOCK_HASH_SIZE instead.

Signed-off-by: Asias He &lt;asias@redhat.com&gt;
Acked-by: Andy King &lt;acking@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>VSOCK: Remove unnecessary label</title>
<updated>2013-06-24T06:51:48Z</updated>
<author>
<name>Asias He</name>
<email>asias@redhat.com</email>
</author>
<published>2013-06-20T09:20:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0fc932467688e1c81fc109a93f323cef4993dc24'/>
<id>urn:sha1:0fc932467688e1c81fc109a93f323cef4993dc24</id>
<content type='text'>
Signed-off-by: Asias He &lt;asias@redhat.com&gt;
Acked-by: Andy King &lt;acking@vmware.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
