<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/ipv6/af_inet6.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>ipv6: make fragment identifications less predictable</title>
<updated>2013-06-10T09:43:37Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2011-08-09T06:44:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c023a0b45bb91bce7bf3300518592f07fcd35244'/>
<id>urn:sha1:c023a0b45bb91bce7bf3300518592f07fcd35244</id>
<content type='text'>
[ Backport of upstream commit 87c48fa3b4630905f98268dde838ee43626a060c ]

Fernando Gont reported current IPv6 fragment identification generation
was not secure, because using a very predictable system-wide generator,
allowing various attacks.

IPv4 uses inetpeer cache to address this problem and to get good
performance. We'll use this mechanism when IPv6 inetpeer is stable
enough in linux-3.1

For the time being, we use jhash on destination address to provide less
predictable identifications. Also remove a spinlock and use cmpxchg() to
get better SMP performance.

Reported-by: Fernando Gont &lt;fernando@gont.com.ar&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
[bwh: Backport further to 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: constify struct inet6_protocol</title>
<updated>2009-09-15T00:03:05Z</updated>
<author>
<name>Alexey Dobriyan</name>
</author>
<published>2009-09-14T12:22:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=41135cc836a1abeb12ca1416bdb29e87ad021153'/>
<id>urn:sha1:41135cc836a1abeb12ca1416bdb29e87ad021153</id>
<content type='text'>
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>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2009-09-02T07:32:56Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2009-09-02T07:32:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6cdee2f96a97f6da26bd3759c3f8823332fbb438'/>
<id>urn:sha1:6cdee2f96a97f6da26bd3759c3f8823332fbb438</id>
<content type='text'>
Conflicts:
	drivers/net/yellowfin.c
</content>
</entry>
<entry>
<title>ipv6: Fix commit 63d9950b08184e6531adceb65f64b429909cc101 (ipv6: Make v4-mapped bindings consistent with IPv4)</title>
<updated>2009-08-24T02:06:28Z</updated>
<author>
<name>Bruno Prémont</name>
</author>
<published>2009-08-24T02:06:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ca6982b858e1d08010c1d29d8e8255b2ac2ad70a'/>
<id>urn:sha1:ca6982b858e1d08010c1d29d8e8255b2ac2ad70a</id>
<content type='text'>
Commit 63d9950b08184e6531adceb65f64b429909cc101
  (ipv6: Make v4-mapped bindings consistent with IPv4)
changes behavior of inet6_bind() for v4-mapped addresses so it should
behave the same way as inet_bind().

During this change setting of err to -EADDRNOTAVAIL got lost:

af_inet.c:469 inet_bind()
	err = -EADDRNOTAVAIL;
	if (!sysctl_ip_nonlocal_bind &amp;&amp;
	    !(inet-&gt;freebind || inet-&gt;transparent) &amp;&amp;
	    addr-&gt;sin_addr.s_addr != htonl(INADDR_ANY) &amp;&amp;
	    chk_addr_ret != RTN_LOCAL &amp;&amp;
	    chk_addr_ret != RTN_MULTICAST &amp;&amp;
	    chk_addr_ret != RTN_BROADCAST)
		goto out;


af_inet6.c:463 inet6_bind()
	if (addr_type == IPV6_ADDR_MAPPED) {
		int chk_addr_ret;

		/* Binding to v4-mapped address on a v6-only socket                         
		 * makes no sense                                                           
		 */
		if (np-&gt;ipv6only) {
			err = -EINVAL;
			goto out; 
		}

		/* Reproduce AF_INET checks to make the bindings consitant */               
		v4addr = addr-&gt;sin6_addr.s6_addr32[3];                                      
		chk_addr_ret = inet_addr_type(net, v4addr);                                 
		if (!sysctl_ip_nonlocal_bind &amp;&amp;                                             
		    !(inet-&gt;freebind || inet-&gt;transparent) &amp;&amp;                               
		    v4addr != htonl(INADDR_ANY) &amp;&amp;
		    chk_addr_ret != RTN_LOCAL &amp;&amp;                                            
		    chk_addr_ret != RTN_MULTICAST &amp;&amp;                                        
		    chk_addr_ret != RTN_BROADCAST)
			goto out;
	} else {


Signed-off-by Bruno Prémont &lt;bonbons@linux-vserver.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>udpv6: Handle large incoming UDP/IPv6 packets and support software UFO</title>
<updated>2009-07-12T21:29:29Z</updated>
<author>
<name>Sridhar Samudrala</name>
</author>
<published>2009-07-09T08:10:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ba73542585a4a3c8a708f502e62e6e63dd74b66c'/>
<id>urn:sha1:ba73542585a4a3c8a708f502e62e6e63dd74b66c</id>
<content type='text'>
- validate and forward GSO UDP/IPv6 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>ipv6: Use rcu_barrier() on module unload.</title>
<updated>2009-06-26T20:51:31Z</updated>
<author>
<name>Jesper Dangaard Brouer</name>
</author>
<published>2009-06-26T10:46:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1f2ccd00f224a4e2d6d26f590f3e6851f3deef99'/>
<id>urn:sha1:1f2ccd00f224a4e2d6d26f590f3e6851f3deef99</id>
<content type='text'>
The ipv6 module uses rcu_call() thus it should use rcu_barrier() on
module unload.

Acked-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: Jesper Dangaard Brouer &lt;hawk@comx.dk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>IPv6: Add 'autoconf' and 'disable_ipv6' module parameters</title>
<updated>2009-06-01T10:07:33Z</updated>
<author>
<name>Brian Haley</name>
</author>
<published>2009-06-01T10:07:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=56d417b12e57dfe11c9b7ba4bea3882c62a55815'/>
<id>urn:sha1:56d417b12e57dfe11c9b7ba4bea3882c62a55815</id>
<content type='text'>
Add 'autoconf' and 'disable_ipv6' parameters to the IPv6 module.

The first controls if IPv6 addresses are autoconfigured from
prefixes received in Router Advertisements.  The IPv6 loopback
(::1) and link-local addresses are still configured.

The second controls if IPv6 addresses are desired at all.  No
IPv6 addresses will be added to any interfaces.

Signed-off-by: Brian Haley &lt;brian.haley@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>gro: Avoid unnecessary comparison after skb_gro_header</title>
<updated>2009-05-27T10:26:01Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2009-05-26T18:50:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a5b1cf288d4200506ab62fbb86cc81ace948a306'/>
<id>urn:sha1:a5b1cf288d4200506ab62fbb86cc81ace948a306</id>
<content type='text'>
For the overwhelming majority of cases, skb_gro_header's return
value cannot be NULL.  Yet we must check it because of its current
form.  This patch splits it up into multiple functions in order
to avoid this.

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>
<entry>
<title>ipv6: Make v4-mapped bindings consistent with IPv4</title>
<updated>2009-03-25T02:49:10Z</updated>
<author>
<name>Vlad Yasevich</name>
</author>
<published>2009-03-24T16:24:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=63d9950b08184e6531adceb65f64b429909cc101'/>
<id>urn:sha1:63d9950b08184e6531adceb65f64b429909cc101</id>
<content type='text'>
Binding to a v4-mapped address on an AF_INET6 socket should
produce the same result as binding to an IPv4 address on
AF_INET socket.  The two are interchangable as v4-mapped
address is really a portability aid.

Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
