<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/ipv4, branch v3.18</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=v3.18</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-11-26T20:45:04Z</updated>
<entry>
<title>net-timestamp: make tcp_recvmsg call ipv6_recv_error for AF_INET6 socks</title>
<updated>2014-11-26T20:45:04Z</updated>
<author>
<name>Willem de Bruijn</name>
<email>willemb@google.com</email>
</author>
<published>2014-11-26T19:53:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f4713a3dfad045d46afcb9c2a7d0bba288920ed4'/>
<id>urn:sha1:f4713a3dfad045d46afcb9c2a7d0bba288920ed4</id>
<content type='text'>
TCP timestamping introduced MSG_ERRQUEUE handling for TCP sockets.
If the socket is of family AF_INET6, call ipv6_recv_error instead
of ip_recv_error.

This change is more complex than a single branch due to the loadable
ipv6 module. It reuses a pre-existing indirect function call from
ping. The ping code is safe to call, because it is part of the core
ipv6 module and always present when AF_INET6 sockets are active.

Fixes: 4ed2d765 (net-timestamp: TCP timestamping)
Signed-off-by: Willem de Bruijn &lt;willemb@google.com&gt;

----

It may also be worthwhile to add WARN_ON_ONCE(sk-&gt;family == AF_INET6)
to ip_recv_error.
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tcp: fix possible NULL dereference in tcp_vX_send_reset()</title>
<updated>2014-11-25T19:29:18Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2014-11-25T15:40:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c3658e8d0f10147fc86018be7f11668246c156d3'/>
<id>urn:sha1:c3658e8d0f10147fc86018be7f11668246c156d3</id>
<content type='text'>
After commit ca777eff51f7 ("tcp: remove dst refcount false sharing for
prequeue mode") we have to relax check against skb dst in
tcp_v[46]_send_reset() if prequeue dropped the dst.

If a socket is provided, a full lookup was done to find this socket,
so the dst test can be skipped.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88191
Reported-by: Jaša Bartelj &lt;jasa.bartelj@gmail.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Fixes: ca777eff51f7 ("tcp: remove dst refcount false sharing for prequeue mode")
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/ping: handle protocol mismatching scenario</title>
<updated>2014-11-24T21:48:20Z</updated>
<author>
<name>Jane Zhou</name>
<email>a17711@motorola.com</email>
</author>
<published>2014-11-24T19:44:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=91a0b603469069cdcce4d572b7525ffc9fd352a6'/>
<id>urn:sha1:91a0b603469069cdcce4d572b7525ffc9fd352a6</id>
<content type='text'>
ping_lookup() may return a wrong sock if sk_buff's and sock's protocols
dont' match. For example, sk_buff's protocol is ETH_P_IPV6, but sock's
sk_family is AF_INET, in that case, if sk-&gt;sk_bound_dev_if is zero, a wrong
sock will be returned.
the fix is to "continue" the searching, if no matching, return NULL.

Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Alexey Kuznetsov &lt;kuznet@ms2.inr.ac.ru&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: Hideaki YOSHIFUJI &lt;yoshfuji@linux-ipv6.org&gt;
Cc: Patrick McHardy &lt;kaber@trash.net&gt;
Cc: netdev@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Jane Zhou &lt;a17711@motorola.com&gt;
Signed-off-by: Yiwei Zhao &lt;gbjc64@motorola.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ip_tunnel: the lack of vti_link_ops' dellink() cause kernel panic</title>
<updated>2014-11-24T02:11:17Z</updated>
<author>
<name>lucien</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2014-11-23T07:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=20ea60ca9952bd19d4b0d74719daba305aef5178'/>
<id>urn:sha1:20ea60ca9952bd19d4b0d74719daba305aef5178</id>
<content type='text'>
Now the vti_link_ops do not point the .dellink, for fb tunnel device
(ip_vti0), the net_device will be removed as the default .dellink is
unregister_netdevice_queue,but the tunnel still in the tunnel list,
then if we add a new vti tunnel, in ip_tunnel_find():

        hlist_for_each_entry_rcu(t, head, hash_node) {
                if (local == t-&gt;parms.iph.saddr &amp;&amp;
                    remote == t-&gt;parms.iph.daddr &amp;&amp;
                    link == t-&gt;parms.link &amp;&amp;
==&gt;                 type == t-&gt;dev-&gt;type &amp;&amp;
                    ip_tunnel_key_match(&amp;t-&gt;parms, flags, key))
                        break;
        }

the panic will happen, cause dev of ip_tunnel *t is null:
[ 3835.072977] IP: [&lt;ffffffffa04103fd&gt;] ip_tunnel_find+0x9d/0xc0 [ip_tunnel]
[ 3835.073008] PGD b2c21067 PUD b7277067 PMD 0
[ 3835.073008] Oops: 0000 [#1] SMP
.....
[ 3835.073008] Stack:
[ 3835.073008]  ffff8800b72d77f0 ffffffffa0411924 ffff8800bb956000 ffff8800b72d78e0
[ 3835.073008]  ffff8800b72d78a0 0000000000000000 ffffffffa040d100 ffff8800b72d7858
[ 3835.073008]  ffffffffa040b2e3 0000000000000000 0000000000000000 0000000000000000
[ 3835.073008] Call Trace:
[ 3835.073008]  [&lt;ffffffffa0411924&gt;] ip_tunnel_newlink+0x64/0x160 [ip_tunnel]
[ 3835.073008]  [&lt;ffffffffa040b2e3&gt;] vti_newlink+0x43/0x70 [ip_vti]
[ 3835.073008]  [&lt;ffffffff8150d4da&gt;] rtnl_newlink+0x4fa/0x5f0
[ 3835.073008]  [&lt;ffffffff812f68bb&gt;] ? nla_strlcpy+0x5b/0x70
[ 3835.073008]  [&lt;ffffffff81508fb0&gt;] ? rtnl_link_ops_get+0x40/0x60
[ 3835.073008]  [&lt;ffffffff8150d11f&gt;] ? rtnl_newlink+0x13f/0x5f0
[ 3835.073008]  [&lt;ffffffff81509cf4&gt;] rtnetlink_rcv_msg+0xa4/0x270
[ 3835.073008]  [&lt;ffffffff8126adf5&gt;] ? sock_has_perm+0x75/0x90
[ 3835.073008]  [&lt;ffffffff81509c50&gt;] ? rtnetlink_rcv+0x30/0x30
[ 3835.073008]  [&lt;ffffffff81529e39&gt;] netlink_rcv_skb+0xa9/0xc0
[ 3835.073008]  [&lt;ffffffff81509c48&gt;] rtnetlink_rcv+0x28/0x30
....

modprobe ip_vti
ip link del ip_vti0 type vti
ip link add ip_vti0 type vti
rmmod ip_vti

do that one or more times, kernel will panic.

fix it by assigning ip_tunnel_dellink to vti_link_ops' dellink, in
which we skip the unregister of fb tunnel device. do the same on ip6_vti.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: Cong Wang &lt;cwang@twopensource.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tcp: Restore RFC5961-compliant behavior for SYN packets</title>
<updated>2014-11-21T20:33:50Z</updated>
<author>
<name>Calvin Owens</name>
<email>calvinowens@fb.com</email>
</author>
<published>2014-11-20T23:09:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0c228e833c88e3aa029250f5db77d5968c5ce5b5'/>
<id>urn:sha1:0c228e833c88e3aa029250f5db77d5968c5ce5b5</id>
<content type='text'>
Commit c3ae62af8e755 ("tcp: should drop incoming frames without ACK
flag set") was created to mitigate a security vulnerability in which a
local attacker is able to inject data into locally-opened sockets by
using TCP protocol statistics in procfs to quickly find the correct
sequence number.

This broke the RFC5961 requirement to send a challenge ACK in response
to spurious RST packets, which was subsequently fixed by commit
7b514a886ba50 ("tcp: accept RST without ACK flag").

Unfortunately, the RFC5961 requirement that spurious SYN packets be
handled in a similar manner remains broken.

RFC5961 section 4 states that:

   ... the handling of the SYN in the synchronized state SHOULD be
   performed as follows:

   1) If the SYN bit is set, irrespective of the sequence number, TCP
      MUST send an ACK (also referred to as challenge ACK) to the remote
      peer:

      &lt;SEQ=SND.NXT&gt;&lt;ACK=RCV.NXT&gt;&lt;CTL=ACK&gt;

      After sending the acknowledgment, TCP MUST drop the unacceptable
      segment and stop processing further.

   By sending an ACK, the remote peer is challenged to confirm the loss
   of the previous connection and the request to start a new connection.
   A legitimate peer, after restart, would not have a TCB in the
   synchronized state.  Thus, when the ACK arrives, the peer should send
   a RST segment back with the sequence number derived from the ACK
   field that caused the RST.

   This RST will confirm that the remote peer has indeed closed the
   previous connection.  Upon receipt of a valid RST, the local TCP
   endpoint MUST terminate its connection.  The local TCP endpoint
   should then rely on SYN retransmission from the remote end to
   re-establish the connection.

This patch lets SYN packets through the discard added in c3ae62af8e755,
so that spurious SYN packets are properly dealt with as per the RFC.

The challenge ACK is sent unconditionally and is rate-limited, so the
original vulnerability is not reintroduced by this patch.

Signed-off-by: Calvin Owens &lt;calvinowens@fb.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Acked-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: mld: fix add_grhead skb_over_panic for devs with large MTUs</title>
<updated>2014-11-16T21:55:06Z</updated>
<author>
<name>Daniel Borkmann</name>
<email>dborkman@redhat.com</email>
</author>
<published>2014-11-05T19:27:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=feb91a02ccb09661507f170b2a444aec94f307f9'/>
<id>urn:sha1:feb91a02ccb09661507f170b2a444aec94f307f9</id>
<content type='text'>
It has been reported that generating an MLD listener report on
devices with large MTUs (e.g. 9000) and a high number of IPv6
addresses can trigger a skb_over_panic():

skbuff: skb_over_panic: text:ffffffff80612a5d len:3776 put:20
head:ffff88046d751000 data:ffff88046d751010 tail:0xed0 end:0xec0
dev:port1
 ------------[ cut here ]------------
kernel BUG at net/core/skbuff.c:100!
invalid opcode: 0000 [#1] SMP
Modules linked in: ixgbe(O)
CPU: 3 PID: 0 Comm: swapper/3 Tainted: G O 3.14.23+ #4
[...]
Call Trace:
 &lt;IRQ&gt;
 [&lt;ffffffff80578226&gt;] ? skb_put+0x3a/0x3b
 [&lt;ffffffff80612a5d&gt;] ? add_grhead+0x45/0x8e
 [&lt;ffffffff80612e3a&gt;] ? add_grec+0x394/0x3d4
 [&lt;ffffffff80613222&gt;] ? mld_ifc_timer_expire+0x195/0x20d
 [&lt;ffffffff8061308d&gt;] ? mld_dad_timer_expire+0x45/0x45
 [&lt;ffffffff80255b5d&gt;] ? call_timer_fn.isra.29+0x12/0x68
 [&lt;ffffffff80255d16&gt;] ? run_timer_softirq+0x163/0x182
 [&lt;ffffffff80250e6f&gt;] ? __do_softirq+0xe0/0x21d
 [&lt;ffffffff8025112b&gt;] ? irq_exit+0x4e/0xd3
 [&lt;ffffffff802214bb&gt;] ? smp_apic_timer_interrupt+0x3b/0x46
 [&lt;ffffffff8063f10a&gt;] ? apic_timer_interrupt+0x6a/0x70

mld_newpack() skb allocations are usually requested with dev-&gt;mtu
in size, since commit 72e09ad107e7 ("ipv6: avoid high order allocations")
we have changed the limit in order to be less likely to fail.

However, in MLD/IGMP code, we have some rather ugly AVAILABLE(skb)
macros, which determine if we may end up doing an skb_put() for
adding another record. To avoid possible fragmentation, we check
the skb's tailroom as skb-&gt;dev-&gt;mtu - skb-&gt;len, which is a wrong
assumption as the actual max allocation size can be much smaller.

The IGMP case doesn't have this issue as commit 57e1ab6eaddc
("igmp: refine skb allocations") stores the allocation size in
the cb[].

Set a reserved_tailroom to make it fit into the MTU and use
skb_availroom() helper instead. This also allows to get rid of
igmp_skb_size().

Reported-by: Wei Liu &lt;lw1a2.jing@gmail.com&gt;
Fixes: 72e09ad107e7 ("ipv6: avoid high order allocations")
Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Cc: David L Stevens &lt;david.stevens@oracle.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&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>Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf</title>
<updated>2014-11-16T19:23:56Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2014-11-16T19:23:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f1227c5c1b6efc588a9db769e2e89c125f3d6191'/>
<id>urn:sha1:f1227c5c1b6efc588a9db769e2e89c125f3d6191</id>
<content type='text'>
Pablo Neira Ayuso says:

====================
Netfilter/IPVS fixes for net

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

1) Fix missing initialization of the range structure (allocated in the
   stack) in nft_masq_{ipv4, ipv6}_eval, from Daniel Borkmann.

2) Make sure the data we receive from userspace contains the req_version
   structure, otherwise return an error incomplete on truncated input.
   From Dan Carpenter.

3) Fix handling og skb-&gt;sk which may cause incorrect handling
   of connections from a local process. Via Simon Horman, patch from
   Calvin Owens.

4) Fix wrong netns in nft_compat when setting target and match params
   structure.

5) Relax chain type validation in nft_compat that was recently included,
   this broke the matches that need to be run from the route chain type.
   Now iptables-test.py automated regression tests report success again
   and we avoid the only possible problematic case, which is the use of
   nat targets out of nat chain type.

6) Use match-&gt;table to validate the tablename, instead of the match-&gt;name.
   Again patch for nft_compat.

7) Restore the synchronous release of objects from the commit and abort
   path in nf_tables. This is causing two major problems: splats when using
   nft_compat, given that matches and targets may sleep and call_rcu is
   invoked from softirq context. Moreover Patrick reported possible event
   notification reordering when rules refer to anonymous sets.

8) Fix race condition in between packets that are being confirmed by
   conntrack and the ctnetlink flush operation. This happens since the
   removal of the central spinlock. Thanks to Jesper D. Brouer to looking
   into this.
====================

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: Fix incorrect error code when adding an unreachable route</title>
<updated>2014-11-16T19:11:45Z</updated>
<author>
<name>Panu Matilainen</name>
<email>pmatilai@redhat.com</email>
</author>
<published>2014-11-14T11:14:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=49dd18ba4615eaa72f15c9087dea1c2ab4744cf5'/>
<id>urn:sha1:49dd18ba4615eaa72f15c9087dea1c2ab4744cf5</id>
<content type='text'>
Trying to add an unreachable route incorrectly returns -ESRCH if
if custom FIB rules are present:

[root@localhost ~]# ip route add 74.125.31.199 dev eth0 via 1.2.3.4
RTNETLINK answers: Network is unreachable
[root@localhost ~]# ip rule add to 55.66.77.88 table 200
[root@localhost ~]# ip route add 74.125.31.199 dev eth0 via 1.2.3.4
RTNETLINK answers: No such process
[root@localhost ~]#

Commit 83886b6b636173b206f475929e58fac75c6f2446 ("[NET]: Change "not found"
return value for rule lookup") changed fib_rules_lookup()
to use -ESRCH as a "not found" code internally, but for user space it
should be translated into -ENETUNREACH. Handle the translation centrally in
ipv4-specific fib_lookup(), leaving the DECnet case alone.

On a related note, commit b7a71b51ee37d919e4098cd961d59a883fd272d8
("ipv4: removed redundant conditional") removed a similar translation from
ip_route_input_slow() prematurely AIUI.

Fixes: b7a71b51ee37 ("ipv4: removed redundant conditional")
Signed-off-by: Panu Matilainen &lt;pmatilai@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: fix IPV6_PKTINFO with v4 mapped</title>
<updated>2014-11-11T20:32:45Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2014-11-11T01:54:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5337b5b75cd9bd3624a6820e3c2a084d2480061c'/>
<id>urn:sha1:5337b5b75cd9bd3624a6820e3c2a084d2480061c</id>
<content type='text'>
Use IS_ENABLED(CONFIG_IPV6), to enable this code if IPv6 is
a module.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Fixes: c8e6ad0829a7 ("ipv6: honor IPV6_PKTINFO with v4 mapped addresses on sendmsg")
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>udptunnel: Add SKB_GSO_UDP_TUNNEL during gro_complete.</title>
<updated>2014-11-10T20:09:45Z</updated>
<author>
<name>Jesse Gross</name>
<email>jesse@nicira.com</email>
</author>
<published>2014-11-10T19:45:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cfdf1e1ba5bf55e095cf4bcaa9585c4759f239e8'/>
<id>urn:sha1:cfdf1e1ba5bf55e095cf4bcaa9585c4759f239e8</id>
<content type='text'>
When doing GRO processing for UDP tunnels, we never add
SKB_GSO_UDP_TUNNEL to gso_type - only the type of the inner protocol
is added (such as SKB_GSO_TCPV4). The result is that if the packet is
later resegmented we will do GSO but not treat it as a tunnel. This
results in UDP fragmentation of the outer header instead of (i.e.) TCP
segmentation of the inner header as was originally on the wire.

Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
