<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/ipv4/af_inet.c, branch linux-2.6.32.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.32.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.32.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-01-29T21:12:42Z</updated>
<entry>
<title>net: add validation for the socket syscall protocol argument</title>
<updated>2016-01-29T21:12:42Z</updated>
<author>
<name>Hannes Frederic Sowa</name>
</author>
<published>2015-12-14T21:03:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be9b6c294668e0686e8ac69f617c6c1963a91472'/>
<id>urn:sha1:be9b6c294668e0686e8ac69f617c6c1963a91472</id>
<content type='text'>
commit 79462ad02e861803b3840cc782248c7359451cd9 upstream.

é­æ°¸å reported that one could simply crash the kernel as root by
using a simple program:

	int socket_fd;
	struct sockaddr_in addr;
	addr.sin_port = 0;
	addr.sin_addr.s_addr = INADDR_ANY;
	addr.sin_family = 10;

	socket_fd = socket(10,3,0x40000000);
	connect(socket_fd , &amp;addr,16);

AF_INET, AF_INET6 sockets actually only support 8-bit protocol
identifiers. inet_sock's skc_protocol field thus is sized accordingly,
thus larger protocol identifiers simply cut off the higher bits and
store a zero in the protocol fields.

This could lead to e.g. NULL function pointer because as a result of
the cut off inet_num is zero and we call down to inet_autobind, which
is NULL for raw sockets.

kernel: Call Trace:
kernel:  [&lt;ffffffff816db90e&gt;] ? inet_autobind+0x2e/0x70
kernel:  [&lt;ffffffff816db9a4&gt;] inet_dgram_connect+0x54/0x80
kernel:  [&lt;ffffffff81645069&gt;] SYSC_connect+0xd9/0x110
kernel:  [&lt;ffffffff810ac51b&gt;] ? ptrace_notify+0x5b/0x80
kernel:  [&lt;ffffffff810236d8&gt;] ? syscall_trace_enter_phase2+0x108/0x200
kernel:  [&lt;ffffffff81645e0e&gt;] SyS_connect+0xe/0x10
kernel:  [&lt;ffffffff81779515&gt;] tracesys_phase2+0x84/0x89

I found no particular commit which introduced this problem.

CVE: CVE-2015-8543
Cc: Cong Wang &lt;cwang@twopensource.com&gt;
Reported-by: é­æ°¸å &lt;guoyonggang@360.cn&gt;
Signed-off-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
[bwh: Backported to 2.6.32: open-code U8_MAX; adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>inet: add RCU protection to inet-&gt;opt</title>
<updated>2013-06-10T09:43:31Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2011-04-21T09:45:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8710128e201bc0d628d9644454585925a6e59fd'/>
<id>urn:sha1:b8710128e201bc0d628d9644454585925a6e59fd</id>
<content type='text'>
commit f6d8bd051c391c1c0458a30b2a7abcd939329259 upstream.

We lack proper synchronization to manipulate inet-&gt;opt ip_options

Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc-&gt;opt (struct ip_options),
without any protection against another thread manipulating inet-&gt;opt.

Another thread can change inet-&gt;opt pointer and free old one under us.

Use RCU to protect inet-&gt;opt (changed to inet-&gt;inet_opt).

Instead of handling atomic refcounts, just copy ip_options when
necessary, to avoid cache line dirtying.

We cant insert an rcu_head in struct ip_options since its included in
skb-&gt;cb[], so this patch is large because I had to introduce a new
ip_options_rcu structure.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
[dannf/bwh: backported to Debian's 2.6.32]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>net/ipv4: Check for mistakenly passed in non-IPv4 address</title>
<updated>2011-07-13T03:29:27Z</updated>
<author>
<name>Marcus Meissner</name>
</author>
<published>2011-06-02T04:05:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4e754b40ebbd638984e33eb8509acb63b9c7f253'/>
<id>urn:sha1:4e754b40ebbd638984e33eb8509acb63b9c7f253</id>
<content type='text'>
[ Upstream commit d0733d2e29b652b2e7b1438ececa732e4eed98eb ]

Check against mistakenly passing in IPv6 addresses (which would result
in an INADDR_ANY bind) or similar incompatible sockaddrs.

Signed-off-by: Marcus Meissner &lt;meissner@suse.de&gt;
Cc: Reinhard Max &lt;max@suse.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>net: Use sk_mark for routing lookup in more places</title>
<updated>2009-10-01T22:16:49Z</updated>
<author>
<name>Atis Elsts</name>
</author>
<published>2009-10-01T22:16:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=914a9ab386a288d0f22252fc268ecbc048cdcbd5'/>
<id>urn:sha1:914a9ab386a288d0f22252fc268ecbc048cdcbd5</id>
<content type='text'>
This patch against v2.6.31 adds support for route lookup using sk_mark in some 
more places. The benefits from this patch are the following.
First, SO_MARK option now has effect on UDP sockets too.
Second, ip_queue_xmit() and inet_sk_rebuild_header() could fail to do routing 
lookup correctly if TCP sockets with SO_MARK were used.

Signed-off-by: Atis Elsts &lt;atis@mikrotik.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
</content>
</entry>
<entry>
<title>net: constify struct net_protocol</title>
<updated>2009-09-15T00:03:01Z</updated>
<author>
<name>Alexey Dobriyan</name>
</author>
<published>2009-09-14T12:21:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=32613090a96dba2ca2cc524c8d4749d3126fdde5'/>
<id>urn:sha1:32613090a96dba2ca2cc524c8d4749d3126fdde5</id>
<content type='text'>
Remove long removed "inet_protocol_base" declaration.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: af_inet.c cleanups</title>
<updated>2009-08-29T06:45:21Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2009-08-29T06:45:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d1427f87002735aa54c370558e0c2bacc61f31e'/>
<id>urn:sha1:3d1427f87002735aa54c370558e0c2bacc61f31e</id>
<content type='text'>
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>udpv4: Handle large incoming UDP/IPv4 packets and support software UFO.</title>
<updated>2009-07-12T21:29:21Z</updated>
<author>
<name>Sridhar Samudrala</name>
</author>
<published>2009-07-09T08:09:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d7ca4cc01fd154f2da30ae6dae160fa5800af758'/>
<id>urn:sha1:d7ca4cc01fd154f2da30ae6dae160fa5800af758</id>
<content type='text'>
- validate and forward GSO UDP/IPv4 packets from untrusted sources.
- do software UFO if the outgoing device doesn't support UFO.

Signed-off-by: Sridhar Samudrala &lt;sri@us.ibm.com&gt;
Acked-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: remove ip_mc_drop_socket() declaration from af_inet.c.</title>
<updated>2009-06-04T04:43:26Z</updated>
<author>
<name>Rami Rosen</name>
</author>
<published>2009-06-04T04:43:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2307f866f542f3397d24f78d0efd74f4ab214a96'/>
<id>urn:sha1:2307f866f542f3397d24f78d0efd74f4ab214a96</id>
<content type='text'>
ip_mc_drop_socket() method is declared in linux/igmp.h, which
is included anyhow in af_inet.c. So there is no need for this declaration.
This patch removes it from af_inet.c.

Signed-off-by: Rami Rosen &lt;ramirose@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: New multicast-all socket option</title>
<updated>2009-06-02T07:45:24Z</updated>
<author>
<name>Nivedita Singhvi</name>
</author>
<published>2009-05-28T07:00:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f771bef98004d9d141b085d987a77d06669d4f4f'/>
<id>urn:sha1:f771bef98004d9d141b085d987a77d06669d4f4f</id>
<content type='text'>
After some discussion offline with Christoph Lameter and David Stevens
regarding multicast behaviour in Linux, I'm submitting a slightly
modified patch from the one Christoph submitted earlier.

This patch provides a new socket option IP_MULTICAST_ALL.

In this case, default behaviour is _unchanged_ from the current
Linux standard. The socket option is set by default to provide
original behaviour. Sockets wishing to receive data only from
multicast groups they join explicitly will need to clear this
socket option.

Signed-off-by: Nivedita Singhvi &lt;niv@us.ibm.com&gt;
Signed-off-by: Christoph Lameter&lt;cl@linux.com&gt;
Acked-by: David Stevens &lt;dlstevens@us.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: Use 32-bit loads for ID and length in GRO</title>
<updated>2009-05-27T10:26:02Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2009-05-26T18:50:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1075f3f65d0e0f49351b7d4310e9f94483972a51'/>
<id>urn:sha1:1075f3f65d0e0f49351b7d4310e9f94483972a51</id>
<content type='text'>
This patch optimises the IPv4 GRO code by using 32-bit loads
(instead of 16-bit ones) on the ID and length checks in the receive
function.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
