<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/ipv6, branch v4.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-04-06T20:12:49Z</updated>
<entry>
<title>ipv6: protect skb-&gt;sk accesses from recursive dereference inside the stack</title>
<updated>2015-04-06T20:12:49Z</updated>
<author>
<name>hannes@stressinduktion.org</name>
<email>hannes@stressinduktion.org</email>
</author>
<published>2015-04-01T15:07:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f60e5990d9c1424af9dbca60a23ba2a1c7c1ce90'/>
<id>urn:sha1:f60e5990d9c1424af9dbca60a23ba2a1c7c1ce90</id>
<content type='text'>
We should not consult skb-&gt;sk for output decisions in xmit recursion
levels &gt; 0 in the stack. Otherwise local socket settings could influence
the result of e.g. tunnel encapsulation process.

ipv6 does not conform with this in three places:

1) ip6_fragment: we do consult ipv6_npinfo for frag_size

2) sk_mc_loop in ipv6 uses skb-&gt;sk and checks if we should
   loop the packet back to the local socket

3) ip6_skb_dst_mtu could query the settings from the user socket and
   force a wrong MTU

Furthermore:
In sk_mc_loop we could potentially land in WARN_ON(1) if we use a
PF_PACKET socket ontop of an IPv6-backed vxlan device.

Reuse xmit_recursion as we are currently only interested in protecting
tunnel devices.

Cc: Jiri Pirko &lt;jiri@resnulli.us&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>ip6mr: call del_timer_sync() in ip6mr_free_table()</title>
<updated>2015-04-03T00:52:35Z</updated>
<author>
<name>WANG Cong</name>
<email>xiyou.wangcong@gmail.com</email>
</author>
<published>2015-03-31T18:01:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7ba0c47c34a1ea5bc7a24ca67309996cce0569b5'/>
<id>urn:sha1:7ba0c47c34a1ea5bc7a24ca67309996cce0569b5</id>
<content type='text'>
We need to wait for the flying timers, since we
are going to free the mrtable right after it.

Cc: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: move fib_rules_unregister() under rtnl lock</title>
<updated>2015-04-03T00:52:34Z</updated>
<author>
<name>WANG Cong</name>
<email>xiyou.wangcong@gmail.com</email>
</author>
<published>2015-03-31T18:01:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=419df12fb5fa558451319276838c1842f2b11f8f'/>
<id>urn:sha1:419df12fb5fa558451319276838c1842f2b11f8f</id>
<content type='text'>
We have to hold rtnl lock for fib_rules_unregister()
otherwise the following race could happen:

fib_rules_unregister():	fib_nl_delrule():
...				...
...				ops = lookup_rules_ops();
list_del_rcu(&amp;ops-&gt;list);
				list_for_each_entry(ops-&gt;rules) {
fib_rules_cleanup_ops(ops);	  ...
  list_del_rcu();		  list_del_rcu();
				}

Note, net-&gt;rules_mod_lock is actually not needed at all,
either upper layer netns code or rtnl lock guarantees
we are safe.

Cc: Alexander Duyck &lt;alexander.h.duyck@redhat.com&gt;
Cc: Thomas Graf &lt;tgraf@suug.ch&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: tcp6: fix double call of tcp_v6_fill_cb()</title>
<updated>2015-03-29T20:36:05Z</updated>
<author>
<name>Alexey Kodanev</name>
<email>alexey.kodanev@oracle.com</email>
</author>
<published>2015-03-27T09:24:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4ad19de8774e2a7b075b3e8ea48db85adcf33fa6'/>
<id>urn:sha1:4ad19de8774e2a7b075b3e8ea48db85adcf33fa6</id>
<content type='text'>
tcp_v6_fill_cb() will be called twice if socket's state changes from
TCP_TIME_WAIT to TCP_LISTEN. That can result in control buffer data
corruption because in the second tcp_v6_fill_cb() call it's not copying
IP6CB(skb) anymore, but 'seq', 'end_seq', etc., so we can get weird and
unpredictable results. Performance loss of up to 1200% has been observed
in LTP/vxlan03 test.

This can be fixed by copying inet6_skb_parm to the beginning of 'cb'
only if xfrm6_policy_check() and tcp_v6_fill_cb() are going to be
called again.

Fixes: 2dc49d1680b53 ("tcp6: don't move IP6CB before xfrm6_policy_check()")

Signed-off-by: Alexey Kodanev &lt;alexey.kodanev@oracle.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipmr,ip6mr: call ip6mr_free_table() on failure path</title>
<updated>2015-03-29T19:13:54Z</updated>
<author>
<name>WANG Cong</name>
<email>xiyou.wangcong@gmail.com</email>
</author>
<published>2015-03-25T21:45:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f243e5a7859a24d10975afb9a1708cac624ba6f1'/>
<id>urn:sha1:f243e5a7859a24d10975afb9a1708cac624ba6f1</id>
<content type='text'>
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: Don't reduce hop limit for an interface</title>
<updated>2015-03-25T15:41:08Z</updated>
<author>
<name>D.S. Ljungmark</name>
<email>ljungmark@modio.se</email>
</author>
<published>2015-03-25T08:28:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6fd99094de2b83d1d4c8457f2c83483b2828e75a'/>
<id>urn:sha1:6fd99094de2b83d1d4c8457f2c83483b2828e75a</id>
<content type='text'>
A local route may have a lower hop_limit set than global routes do.

RFC 3756, Section 4.2.7, "Parameter Spoofing"

&gt;   1.  The attacker includes a Current Hop Limit of one or another small
&gt;       number which the attacker knows will cause legitimate packets to
&gt;       be dropped before they reach their destination.

&gt;   As an example, one possible approach to mitigate this threat is to
&gt;   ignore very small hop limits.  The nodes could implement a
&gt;   configurable minimum hop limit, and ignore attempts to set it below
&gt;   said limit.

Signed-off-by: D.S. Ljungmark &lt;ljungmark@modio.se&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>tcp: prevent fetching dst twice in early demux code</title>
<updated>2015-03-24T02:38:24Z</updated>
<author>
<name>Michal Kubeček</name>
<email>mkubecek@suse.cz</email>
</author>
<published>2015-03-23T14:14:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d0c294c53a771ae7e84506dfbd8c18c30f078735'/>
<id>urn:sha1:d0c294c53a771ae7e84506dfbd8c18c30f078735</id>
<content type='text'>
On s390x, gcc 4.8 compiles this part of tcp_v6_early_demux()

        struct dst_entry *dst = sk-&gt;sk_rx_dst;

        if (dst)
                dst = dst_check(dst, inet6_sk(sk)-&gt;rx_dst_cookie);

to code reading sk-&gt;sk_rx_dst twice, once for the test and once for
the argument of ip6_dst_check() (dst_check() is inline). This allows
ip6_dst_check() to be called with null first argument, causing a crash.

Protect sk-&gt;sk_rx_dst access by READ_ONCE() both in IPv4 and IPv6
TCP early demux code.

Fixes: 41063e9dd119 ("ipv4: Early TCP socket demux.")
Fixes: c7109986db3c ("ipv6: Early TCP socket demux")
Signed-off-by: Michal Kubecek &lt;mkubecek@suse.cz&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&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/pablo/nf</title>
<updated>2015-03-22T20:57:07Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2015-03-22T20:57:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c0e41fa76c5f3775c9479f6babcb94d54da08a51'/>
<id>urn:sha1:c0e41fa76c5f3775c9479f6babcb94d54da08a51</id>
<content type='text'>
Pablo Neira Ayuso says:

====================
Netfilter fixes for net

The following patchset contains Netfilter fixes for your net tree,
they are:

1) Fix missing initialization of tuple structure in nfnetlink_cthelper
   to avoid mismatches when looking up to attach userspace helpers to
   flows, from Ian Wilson.

2) Fix potential crash in nft_hash when we hit -EAGAIN in
   nft_hash_walk(), from Herbert Xu.

3) We don't need to indicate the hook information to update the
   basechain default policy in nf_tables.

4) Restore tracing over nfnetlink_log due to recent rework to
   accomodate logging infrastructure into nf_tables.

5) Fix wrong IP6T_INV_PROTO check in xt_TPROXY.

6) Set IP6T_F_PROTO flag in nft_compat so we can use SYNPROXY6 and
   REJECT6 from xt over nftables.
====================

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: fix backtracking for throw routes</title>
<updated>2015-03-20T16:57:23Z</updated>
<author>
<name>Steven Barth</name>
<email>cyrus@openwrt.org</email>
</author>
<published>2015-03-19T15:16:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=73ba57bfae4a1914f6a6dac71e3168dd900e00af'/>
<id>urn:sha1:73ba57bfae4a1914f6a6dac71e3168dd900e00af</id>
<content type='text'>
for throw routes to trigger evaluation of other policy rules
EAGAIN needs to be propagated up to fib_rules_lookup
similar to how its done for IPv4

A simple testcase for verification is:

ip -6 rule add lookup 33333 priority 33333
ip -6 route add throw 2001:db8::1
ip -6 route add 2001:db8::1 via fe80::1 dev wlan0 table 33333
ip route get 2001:db8::1

Signed-off-by: Steven Barth &lt;cyrus@openwrt.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: call ipv6_proxy_select_ident instead of ipv6_select_ident in udp6_ufo_fragment</title>
<updated>2015-03-20T16:56:11Z</updated>
<author>
<name>Sabrina Dubroca</name>
<email>sd@queasysnail.net</email>
</author>
<published>2015-03-19T10:22:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8e199dfd82ee097b522b00344af6448715d8ee0c'/>
<id>urn:sha1:8e199dfd82ee097b522b00344af6448715d8ee0c</id>
<content type='text'>
Matt Grant reported frequent crashes in ipv6_select_ident when
udp6_ufo_fragment is called from openvswitch on a skb that doesn't
have a dst_entry set.

ipv6_proxy_select_ident generates the frag_id without using the dst
associated with the skb.  This approach was suggested by Vladislav
Yasevich.

Fixes: 0508c07f5e0c ("ipv6: Select fragment id during UFO segmentation if not set.")
Cc: Vladislav Yasevich &lt;vyasevic@redhat.com&gt;
Reported-by: Matt Grant &lt;matt@mattgrant.net.nz&gt;
Tested-by: Matt Grant &lt;matt@mattgrant.net.nz&gt;
Signed-off-by: Sabrina Dubroca &lt;sd@queasysnail.net&gt;
Acked-by: Vladislav Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
