<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/atm, branch v3.4.89</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/atm?h=v3.4.89</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/atm?h=v3.4.89'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-12-08T15:29:41Z</updated>
<entry>
<title>net: rework recvmsg handler msg_name and msg_namelen logic</title>
<updated>2013-12-08T15:29:41Z</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=18719a4c7a90af3de4bb071511dd4a6dcf61a2e0'/>
<id>urn:sha1:18719a4c7a90af3de4bb071511dd4a6dcf61a2e0</id>
<content type='text'>
[ Upstream commit f3d3342602f8bcbf37d7c46641cb9bca7618eb1c ]

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>atm: update msg_namelen in vcc_recvmsg()</title>
<updated>2013-05-01T16:41:04Z</updated>
<author>
<name>Mathias Krause</name>
<email>minipli@googlemail.com</email>
</author>
<published>2013-04-07T01:51:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0e242b8561d006aa66c12ab997cc3d729cf2c9ca'/>
<id>urn:sha1:0e242b8561d006aa66c12ab997cc3d729cf2c9ca</id>
<content type='text'>
[ Upstream commit 9b3e617f3df53822345a8573b6d358f6b9e5ed87 ]

The current code does not fill the msg_name member in case it is set.
It also does not set 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.

Fix that by simply setting msg_namelen to 0 as obviously nobody cared
about vcc_recvmsg() not filling the msg_name in case it was set.

Signed-off-by: Mathias Krause &lt;minipli@googlemail.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>atm: fix info leak via getsockname()</title>
<updated>2012-10-02T17:29:36Z</updated>
<author>
<name>Mathias Krause</name>
<email>minipli@googlemail.com</email>
</author>
<published>2012-08-15T11:31:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=458ed5622e976848aacdea07d4bfcb84a350c460'/>
<id>urn:sha1:458ed5622e976848aacdea07d4bfcb84a350c460</id>
<content type='text'>
[ Upstream commit 3c0c5cfdcd4d69ffc4b9c0907cec99039f30a50a ]

The ATM code fails to initialize the two padding bytes of struct
sockaddr_atmpvc inserted for alignment. Add an explicit memset(0)
before filling the structure to avoid the info leak.

Signed-off-by: Mathias Krause &lt;minipli@googlemail.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>atm: fix info leak in getsockopt(SO_ATMPVC)</title>
<updated>2012-10-02T17:29:35Z</updated>
<author>
<name>Mathias Krause</name>
<email>minipli@googlemail.com</email>
</author>
<published>2012-08-15T11:31:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5b26dbdd5f22871c21fc2ea4afedfe4ecad62d72'/>
<id>urn:sha1:5b26dbdd5f22871c21fc2ea4afedfe4ecad62d72</id>
<content type='text'>
[ Upstream commit e862f1a9b7df4e8196ebec45ac62295138aa3fc2 ]

The ATM code fails to initialize the two padding bytes of struct
sockaddr_atmpvc inserted for alignment. Add an explicit memset(0)
before filling the structure to avoid the info leak.

Signed-off-by: Mathias Krause &lt;minipli@googlemail.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>Remove all #inclusions of asm/system.h</title>
<updated>2012-03-28T17:30:03Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-03-28T17:30:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9ffc93f203c18a70623f21950f1dd473c9ec48cd'/>
<id>urn:sha1:9ffc93f203c18a70623f21950f1dd473c9ec48cd</id>
<content type='text'>
Remove all #inclusions of asm/system.h preparatory to splitting and killing
it.  Performed with the following command:

perl -p -i -e 's!^#\s*include\s*&lt;asm/system[.]h&gt;.*\n!!' `grep -Irl '^#\s*include\s*&lt;asm/system[.]h&gt;' *`

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>ppp: Replace uses of &lt;linux/if_ppp.h&gt; with &lt;linux/ppp-ioctl.h&gt;</title>
<updated>2012-03-05T01:41:38Z</updated>
<author>
<name>Paul Mackerras</name>
<email>paulus@samba.org</email>
</author>
<published>2012-03-04T12:56:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4b32da2bcf1de2b7a196a0e48389d231b4472c36'/>
<id>urn:sha1:4b32da2bcf1de2b7a196a0e48389d231b4472c36</id>
<content type='text'>
Since all that include/linux/if_ppp.h does is #include &lt;linux/ppp-ioctl.h&gt;,
this replaces the occurrences of #include &lt;linux/if_ppp.h&gt; with
#include &lt;linux/ppp-ioctl.h&gt;.

It also corrects an error in Documentation/networking/l2tp.txt, where
it referenced include/linux/if_ppp.h as the source of some definitions
that are actually now defined in include/linux/if_pppol2tp.h.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2012-02-27T02:55:51Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-02-27T02:55:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ff4783ce78c08d2990126ce1874250ae8e72bbd2'/>
<id>urn:sha1:ff4783ce78c08d2990126ce1874250ae8e72bbd2</id>
<content type='text'>
Conflicts:
	drivers/net/ethernet/sfc/rx.c

Overlapping changes in drivers/net/ethernet/sfc/rx.c, one to change
the rx_buf-&gt;is_page boolean into a set of u16 flags, and another to
adjust how -&gt;ip_summed is initialized.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>atm: clip: remove clip_tbl</title>
<updated>2012-02-22T07:23:25Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-02-21T10:46:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=597cdbc2239e6019bbb2dd73b266f436166f0427'/>
<id>urn:sha1:597cdbc2239e6019bbb2dd73b266f436166f0427</id>
<content type='text'>
Commit 32092ecf0644 (atm: clip: Use device neigh support on top of
"arp_tbl".) introduced a bug since clip_tbl is zeroed : Crash occurs in
__neigh_for_each_release()

idle_timer_check() must use instead arp_tbl and neigh_check_cb() should
ignore non clip neighbours.

Idea from David Miller.

Reported-by: Meelis Roos &lt;mroos@linux.ee&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Tested-by: Meelis Roos &lt;mroos@linux.ee&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>atm: clip: Convert over to dst_neigh_lookup().</title>
<updated>2012-02-01T22:23:11Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-02-01T22:23:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7161c76f0def54f5dc7fd9a5534bb3e3e2b2aa60'/>
<id>urn:sha1:7161c76f0def54f5dc7fd9a5534bb3e3e2b2aa60</id>
<content type='text'>
CLIP only support ipv4, and this is evidenced by the fact that it
is a device specific extension of arp_tbl, so this conversion is
pretty straightforward.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Rename dst_get_neighbour{, _raw} to dst_get_neighbour_noref{, _raw}.</title>
<updated>2011-12-05T20:20:19Z</updated>
<author>
<name>David Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-12-02T16:52:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2721745501a26d0dc3b88c0d2f3aa11471891388'/>
<id>urn:sha1:2721745501a26d0dc3b88c0d2f3aa11471891388</id>
<content type='text'>
To reflect the fact that a refrence is not obtained to the
resulting neighbour entry.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
</entry>
</feed>
