<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/ipv4, branch v4.7</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.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-07-15T21:18:29Z</updated>
<entry>
<title>tcp: enable per-socket rate limiting of all 'challenge acks'</title>
<updated>2016-07-15T21:18:29Z</updated>
<author>
<name>Jason Baron</name>
<email>jbaron@akamai.com</email>
</author>
<published>2016-07-14T15:38:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=083ae308280d13d187512b9babe3454342a7987e'/>
<id>urn:sha1:083ae308280d13d187512b9babe3454342a7987e</id>
<content type='text'>
The per-socket rate limit for 'challenge acks' was introduced in the
context of limiting ack loops:

commit f2b2c582e824 ("tcp: mitigate ACK loops for connections as tcp_sock")

And I think it can be extended to rate limit all 'challenge acks' on a
per-socket basis.

Since we have the global tcp_challenge_ack_limit, this patch allows for
tcp_challenge_ack_limit to be set to a large value and effectively rely on
the per-socket limit, or set tcp_challenge_ack_limit to a lower value and
still prevents a single connections from consuming the entire challenge ack
quota.

It further moves in the direction of eliminating the global limit at some
point, as Eric Dumazet has suggested. This a follow-up to:
Subject: tcp: make challenge acks less predictable

Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Neal Cardwell &lt;ncardwell@google.com&gt;
Cc: Yuchung Cheng &lt;ycheng@google.com&gt;
Cc: Yue Cao &lt;ycao009@ucr.edu&gt;
Signed-off-by: Jason Baron &lt;jbaron@akamai.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: reject RTNH_F_DEAD and RTNH_F_LINKDOWN from user space</title>
<updated>2016-07-11T20:41:09Z</updated>
<author>
<name>Julian Anastasov</name>
<email>ja@ssi.bg</email>
</author>
<published>2016-07-10T18:11:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=80610229ef7b26615dbb6cb6e873709a60bacc9f'/>
<id>urn:sha1:80610229ef7b26615dbb6cb6e873709a60bacc9f</id>
<content type='text'>
Vegard Nossum is reporting for a crash in fib_dump_info
when nh_dev = NULL and fib_nhs == 1:

Pid: 50, comm: netlink.exe Not tainted 4.7.0-rc5+
RIP: 0033:[&lt;00000000602b3d18&gt;]
RSP: 0000000062623890  EFLAGS: 00010202
RAX: 0000000000000000 RBX: 000000006261b800 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000024 RDI: 000000006245ba00
RBP: 00000000626238f0 R08: 000000000000029c R09: 0000000000000000
R10: 0000000062468038 R11: 000000006245ba00 R12: 000000006245ba00
R13: 00000000625f96c0 R14: 00000000601e16f0 R15: 0000000000000000
Kernel panic - not syncing: Kernel mode fault at addr 0x2e0, ip 0x602b3d18
CPU: 0 PID: 50 Comm: netlink.exe Not tainted 4.7.0-rc5+ #581
Stack:
 626238f0 960226a02 00000400 000000fe
 62623910 600afca7 62623970 62623a48
 62468038 00000018 00000000 00000000
Call Trace:
 [&lt;602b3e93&gt;] rtmsg_fib+0xd3/0x190
 [&lt;602b6680&gt;] fib_table_insert+0x260/0x500
 [&lt;602b0e5d&gt;] inet_rtm_newroute+0x4d/0x60
 [&lt;60250def&gt;] rtnetlink_rcv_msg+0x8f/0x270
 [&lt;60267079&gt;] netlink_rcv_skb+0xc9/0xe0
 [&lt;60250d4b&gt;] rtnetlink_rcv+0x3b/0x50
 [&lt;60265400&gt;] netlink_unicast+0x1a0/0x2c0
 [&lt;60265e47&gt;] netlink_sendmsg+0x3f7/0x470
 [&lt;6021dc9a&gt;] sock_sendmsg+0x3a/0x90
 [&lt;6021e0d0&gt;] ___sys_sendmsg+0x300/0x360
 [&lt;6021fa64&gt;] __sys_sendmsg+0x54/0xa0
 [&lt;6021fac0&gt;] SyS_sendmsg+0x10/0x20
 [&lt;6001ea68&gt;] handle_syscall+0x88/0x90
 [&lt;600295fd&gt;] userspace+0x3fd/0x500
 [&lt;6001ac55&gt;] fork_handler+0x85/0x90

$ addr2line -e vmlinux -i 0x602b3d18
include/linux/inetdevice.h:222
net/ipv4/fib_semantics.c:1264

Problem happens when RTNH_F_LINKDOWN is provided from user space
when creating routes that do not use the flag, catched with
netlink fuzzer.

Currently, the kernel allows user space to set both flags
to nh_flags and fib_flags but this is not intentional, the
assumption was that they are not set. Fix this by rejecting
both flags with EINVAL.

Reported-by: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
Fixes: 0eeb075fad73 ("net: ipv4 sysctl option to ignore routes when nexthop link is down")
Signed-off-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Cc: Andy Gospodarek &lt;gospo@cumulusnetworks.com&gt;
Cc: Dinesh Dutt &lt;ddutt@cumulusnetworks.com&gt;
Cc: Scott Feldman &lt;sfeldma@gmail.com&gt;
Reviewed-by: Andy Gospodarek &lt;gospo@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tcp: make challenge acks less predictable</title>
<updated>2016-07-11T20:33:35Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-07-10T08:04:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=75ff39ccc1bd5d3c455b6822ab09e533c551f758'/>
<id>urn:sha1:75ff39ccc1bd5d3c455b6822ab09e533c551f758</id>
<content type='text'>
Yue Cao claims that current host rate limiting of challenge ACKS
(RFC 5961) could leak enough information to allow a patient attacker
to hijack TCP sessions. He will soon provide details in an academic
paper.

This patch increases the default limit from 100 to 1000, and adds
some randomization so that the attacker can no longer hijack
sessions without spending a considerable amount of probes.

Based on initial analysis and patch from Linus.

Note that we also have per socket rate limiting, so it is tempting
to remove the host limit in the future.

v2: randomize the count of challenge acks per second, not the period.

Fixes: 282f23c6ee34 ("tcp: implement RFC 5961 3.2")
Reported-by: Yue Cao &lt;ycao009@ucr.edu&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Suggested-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Yuchung Cheng &lt;ycheng@google.com&gt;
Cc: Neal Cardwell &lt;ncardwell@google.com&gt;
Acked-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Acked-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>udp: prevent bugcheck if filter truncates packet too much</title>
<updated>2016-07-11T19:43:15Z</updated>
<author>
<name>Michal Kubeček</name>
<email>mkubecek@suse.cz</email>
</author>
<published>2016-07-08T15:52:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a612769774a30e4fc143c4cb6395c12573415660'/>
<id>urn:sha1:a612769774a30e4fc143c4cb6395c12573415660</id>
<content type='text'>
If socket filter truncates an udp packet below the length of UDP header
in udpv6_queue_rcv_skb() or udp_queue_rcv_skb(), it will trigger a
BUG_ON in skb_pull_rcsum(). This BUG_ON (and therefore a system crash if
kernel is configured that way) can be easily enforced by an unprivileged
user which was reported as CVE-2016-6162. For a reproducer, see
http://seclists.org/oss-sec/2016/q3/8

Fixes: e6afc8ace6dd ("udp: remove headers from UDP packets before queueing")
Reported-by: Marco Grassi &lt;marco.gra@gmail.com&gt;
Signed-off-by: Michal Kubecek &lt;mkubecek@suse.cz&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: Fix ip_skb_dst_mtu to use the sk passed by ip_finish_output</title>
<updated>2016-06-30T13:02:48Z</updated>
<author>
<name>Shmulik Ladkani</name>
<email>shmulik.ladkani@gmail.com</email>
</author>
<published>2016-06-29T18:47:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fedbb6b4ff341c1e2120f4ffbf367fd78ac3e8f3'/>
<id>urn:sha1:fedbb6b4ff341c1e2120f4ffbf367fd78ac3e8f3</id>
<content type='text'>
ip_skb_dst_mtu uses skb-&gt;sk, assuming it is an AF_INET socket (e.g. it
calls ip_sk_use_pmtu which casts sk as an inet_sk).

However, in the case of UDP tunneling, the skb-&gt;sk is not necessarily an
inet socket (could be AF_PACKET socket, or AF_UNSPEC if arriving from
tun/tap).

OTOH, the sk passed as an argument throughout IP stack's output path is
the one which is of PMTU interest:
 - In case of local sockets, sk is same as skb-&gt;sk;
 - In case of a udp tunnel, sk is the tunneling socket.

Fix, by passing ip_finish_output's sk to ip_skb_dst_mtu.
This augments 7026b1ddb6 'netfilter: Pass socket pointer down through okfn().'

Signed-off-by: Shmulik Ladkani &lt;shmulik.ladkani@gmail.com&gt;
Reviewed-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: do not send too big packets at retransmit time</title>
<updated>2016-06-29T09:25:11Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-06-27T15:38:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a3d2e9f8eb1487f4191ff08ce2d3d63702c65a90'/>
<id>urn:sha1:a3d2e9f8eb1487f4191ff08ce2d3d63702c65a90</id>
<content type='text'>
Arjun reported a bug in TCP stack and bisected it to a recent commit.

In case where we process SACK, we can coalesce multiple skbs
into fat ones (tcp_shift_skb_data()), to lower write queue
overhead, because we do not expect to retransmit these packets.

However, SACK reneging can happen, forcing the sender to retransmit
all these packets. If skb-&gt;len is above 64KB, we then send buggy
IP packets that could hang TSO engine on cxgb4.

Neal suggested to use tcp_tso_autosize() instead of tp-&gt;gso_segs
so that we cook packets of optimal size vs TCP/pacing.

Thanks to Arjun for reporting the bug and running the tests !

Fixes: 10d3be569243 ("tcp-tso: do not split TSO packets at retransmit time")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Arjun V &lt;arjun@chelsio.com&gt;
Tested-by: Arjun V &lt;arjun@chelsio.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>ipmr/ip6mr: Initialize the last assert time of mfc entries.</title>
<updated>2016-06-28T08:14:09Z</updated>
<author>
<name>Tom Goff</name>
<email>thomas.goff@ll.mit.edu</email>
</author>
<published>2016-06-23T20:11:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=70a0dec45174c976c64b4c8c1d0898581f759948'/>
<id>urn:sha1:70a0dec45174c976c64b4c8c1d0898581f759948</id>
<content type='text'>
This fixes wrong-interface signaling on 32-bit platforms for entries
created when jiffies &gt; 2^31 + MFC_ASSERT_THRESH.

Signed-off-by: Tom Goff &lt;thomas.goff@ll.mit.edu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>esp: Fix ESN generation under UDP encapsulation</title>
<updated>2016-06-23T15:52:00Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2016-06-18T05:03:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=962fcef33b03395051367181a0549d29d109d9a4'/>
<id>urn:sha1:962fcef33b03395051367181a0549d29d109d9a4</id>
<content type='text'>
Blair Steven noticed that ESN in conjunction with UDP encapsulation
is broken because we set the temporary ESP header to the wrong spot.

This patch fixes this by first of all using the right spot, i.e.,
4 bytes off the real ESP header, and then saving this information
so that after encryption we can restore it properly.

Fixes: 7021b2e1cddd ("esp4: Switch to new AEAD interface")
Reported-by: Blair Steven &lt;Blair.Steven@alliedtelesis.co.nz&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Acked-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>gre: fix error handler</title>
<updated>2016-06-16T05:15:21Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-06-15T13:24:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e582615ad33dbd39623084a02e95567b116e1eea'/>
<id>urn:sha1:e582615ad33dbd39623084a02e95567b116e1eea</id>
<content type='text'>
1) gre_parse_header() can be called from gre_err()

   At this point transport header points to ICMP header, not the inner
header.

2) We can not really change transport header as ipgre_err() will later
assume transport header still points to ICMP header (using icmp_hdr())

3) pskb_may_pull() logic in gre_parse_header() really works
  if we are interested at zone pointed by skb-&gt;data

4) As Jiri explained in commit b7f8fe251e46 ("gre: do not pull header in
ICMP error processing") we should not pull headers in error handler.

So this fix :

A) changes gre_parse_header() to use skb-&gt;data instead of
skb_transport_header()

B) Adds a nhs parameter to gre_parse_header() so that we can skip the
not pulled IP header from error path.
  This offset is 0 for normal receive path.

C) remove obsolete IPV6 includes

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Tom Herbert &lt;tom@herbertland.com&gt;
Cc: Maciej Żenczykowski &lt;maze@google.com&gt;
Cc: Jiri Benc &lt;jbenc@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ovs/gre: fix rtnl notifications on iface deletion</title>
<updated>2016-06-15T05:21:44Z</updated>
<author>
<name>Nicolas Dichtel</name>
<email>nicolas.dichtel@6wind.com</email>
</author>
<published>2016-06-13T08:31:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=da6f1da819d4b9c081a477dec74dc468a0b44290'/>
<id>urn:sha1:da6f1da819d4b9c081a477dec74dc468a0b44290</id>
<content type='text'>
The function gretap_fb_dev_create() (only used by ovs) never calls
rtnl_configure_link(). The consequence is that dev-&gt;rtnl_link_state is
never set to RTNL_LINK_INITIALIZED.
During the deletion phase, the function rollback_registered_many() sends
a RTM_DELLINK only if dev-&gt;rtnl_link_state is set to RTNL_LINK_INITIALIZED.

Fixes: b2acd1dc3949 ("openvswitch: Use regular GRE net_device instead of vport")
CC: Thomas Graf &lt;tgraf@suug.ch&gt;
CC: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
