<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/net/socket.c, branch v4.1.41</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.1.41</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.1.41'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-07-11T03:07:03Z</updated>
<entry>
<title>net: Fix use after free in the recvmmsg exit path</title>
<updated>2016-07-11T03:07:03Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2016-03-14T12:56:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8ca7bf099ae0e6ff096b3910895b5285a112aeb5'/>
<id>urn:sha1:8ca7bf099ae0e6ff096b3910895b5285a112aeb5</id>
<content type='text'>
[ Upstream commit 34b88a68f26a75e4fded796f1a49c40f82234b7d ]

The syzkaller fuzzer hit the following use-after-free:

  Call Trace:
   [&lt;ffffffff8175ea0e&gt;] __asan_report_load8_noabort+0x3e/0x40 mm/kasan/report.c:295
   [&lt;ffffffff851cc31a&gt;] __sys_recvmmsg+0x6fa/0x7f0 net/socket.c:2261
   [&lt;     inline     &gt;] SYSC_recvmmsg net/socket.c:2281
   [&lt;ffffffff851cc57f&gt;] SyS_recvmmsg+0x16f/0x180 net/socket.c:2270
   [&lt;ffffffff86332bb6&gt;] entry_SYSCALL_64_fastpath+0x16/0x7a
  arch/x86/entry/entry_64.S:185

And, as Dmitry rightly assessed, that is because we can drop the
reference and then touch it when the underlying recvmsg calls return
some packets and then hit an error, which will make recvmmsg to set
sock-&gt;sk-&gt;sk_err, oops, fix it.

Reported-and-Tested-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Cc: Alexander Potapenko &lt;glider@google.com&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Kostya Serebryany &lt;kcc@google.com&gt;
Cc: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Fixes: a2e2725541fa ("net: Introduce recvmmsg socket syscall")
http://lkml.kernel.org/r/20160122211644.GC2470@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>net: fix uninitialized variable issue</title>
<updated>2016-01-23T04:54:15Z</updated>
<author>
<name>tadeusz.struk@intel.com</name>
<email>tadeusz.struk@intel.com</email>
</author>
<published>2015-12-15T18:46:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1c72e110be7f6860ccb4e226beb34e2c4537f6bb'/>
<id>urn:sha1:1c72e110be7f6860ccb4e226beb34e2c4537f6bb</id>
<content type='text'>
[ Upstream commit 130ed5d105dde141e7fe60d5440aa53e0a84f13b ]

msg_iocb needs to be initialized on the recv/recvfrom path.
Otherwise afalg will wrongly interpret it as an async call.

Cc: stable@vger.kernel.org
Reported-by: Harald Freudenberger &lt;freude@linux.vnet.ibm.com&gt;
Signed-off-by: Tadeusz Struk &lt;tadeusz.struk@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>VFS: net/: d_inode() annotations</title>
<updated>2015-04-15T19:06:56Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2015-03-17T22:26:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c5ef60352893b139147b7c033354e8e028e7f52a'/>
<id>urn:sha1:c5ef60352893b139147b7c033354e8e028e7f52a</id>
<content type='text'>
socket inodes and sunrpc filesystems - inodes owned by that code

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>make new_sync_{read,write}() static</title>
<updated>2015-04-12T02:29:40Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-04-03T19:41:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5d5d568975307877e9195f5305f4240e506a2807'/>
<id>urn:sha1:5d5d568975307877e9195f5305f4240e506a2807</id>
<content type='text'>
All places outside of core VFS that checked -&gt;read and -&gt;write for being NULL or
called the methods directly are gone now, so NULL {read,write} with non-NULL
{read,write}_iter will do the right thing in all cases.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>new helper: msg_data_left()</title>
<updated>2015-04-11T19:53:35Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2014-12-16T02:39:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=01e97e6517053d7c0b9af5248e944a9209909cf5'/>
<id>urn:sha1:01e97e6517053d7c0b9af5248e944a9209909cf5</id>
<content type='text'>
convert open-coded instances

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>get rid of the size argument of sock_sendmsg()</title>
<updated>2015-04-11T19:27:37Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2014-12-11T05:02:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d8725c86aebaf3516e220760aaf5fefc73825188'/>
<id>urn:sha1:d8725c86aebaf3516e220760aaf5fefc73825188</id>
<content type='text'>
it's equal to iov_iter_count(&amp;msg-&gt;msg_iter) in all cases

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>switch kernel_sendmsg() and kernel_recvmsg() to iov_iter_kvec()</title>
<updated>2015-04-09T04:02:34Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-03-21T23:56:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6aa248145ab0b1809de2411cf129ec1fc315a46f'/>
<id>urn:sha1:6aa248145ab0b1809de2411cf129ec1fc315a46f</id>
<content type='text'>
For kernel_sendmsg() that eliminates the need to play with setfs();
for kernel_recvmsg() it does *not* - a couple of callers are using
it with non-NULL -&gt;msg_control, which would be treated as userland
address on recvmsg side of things.

In all cases we are really setting a kvec-backed iov_iter, though.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>net: switch importing msghdr from userland to {compat_,}import_iovec()</title>
<updated>2015-04-09T04:02:26Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-03-21T23:29:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=da18428498fb24438a23d982259461fe22bc1f46'/>
<id>urn:sha1:da18428498fb24438a23d982259461fe22bc1f46</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>net: switch sendto() and recvfrom() to import_single_range()</title>
<updated>2015-04-09T04:02:21Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-03-21T23:12:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=602bd0e90e14c0b50246b361290dbbbe551ada98'/>
<id>urn:sha1:602bd0e90e14c0b50246b361290dbbbe551ada98</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'iocb' into for-davem</title>
<updated>2015-04-09T04:01:38Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-04-09T04:00:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=237dae889051ed4ebf438b08ca6c0e7c54b97774'/>
<id>urn:sha1:237dae889051ed4ebf438b08ca6c0e7c54b97774</id>
<content type='text'>
trivial conflict in net/socket.c and non-trivial one in crypto -
that one had evaded aio_complete() removal.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
