<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/ipv6, branch v5.12</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=v5.12</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.12'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2021-04-13T21:31:52Z</updated>
<entry>
<title>net: ip6_tunnel: Unregister catch-all devices</title>
<updated>2021-04-13T21:31:52Z</updated>
<author>
<name>Hristo Venev</name>
<email>hristo@venev.name</email>
</author>
<published>2021-04-12T17:41:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=941ea91e87a6e879ed82dad4949f6234f2702bec'/>
<id>urn:sha1:941ea91e87a6e879ed82dad4949f6234f2702bec</id>
<content type='text'>
Similarly to the sit case, we need to remove the tunnels with no
addresses that have been moved to another network namespace.

Fixes: 0bd8762824e73 ("ip6tnl: add x-netns support")
Signed-off-by: Hristo Venev &lt;hristo@venev.name&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sit: Unregister catch-all devices</title>
<updated>2021-04-13T21:31:52Z</updated>
<author>
<name>Hristo Venev</name>
<email>hristo@venev.name</email>
</author>
<published>2021-04-12T17:41:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=610f8c0fc8d46e0933955ce13af3d64484a4630a'/>
<id>urn:sha1:610f8c0fc8d46e0933955ce13af3d64484a4630a</id>
<content type='text'>
A sit interface created without a local or a remote address is linked
into the `sit_net::tunnels_wc` list of its original namespace. When
deleting a network namespace, delete the devices that have been moved.

The following script triggers a null pointer dereference if devices
linked in a deleted `sit_net` remain:

    for i in `seq 1 30`; do
        ip netns add ns-test
        ip netns exec ns-test ip link add dev veth0 type veth peer veth1
        ip netns exec ns-test ip link add dev sit$i type sit dev veth0
        ip netns exec ns-test ip link set dev sit$i netns $$
        ip netns del ns-test
    done
    for i in `seq 1 30`; do
        ip link del dev sit$i
    done

Fixes: 5e6700b3bf98f ("sit: add support of x-netns")
Signed-off-by: Hristo Venev &lt;hristo@venev.name&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>2021-04-12T23:17:50Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2021-04-12T23:17:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ccb39c6285581992f0225c45e4de704028a8ec17'/>
<id>urn:sha1:ccb39c6285581992f0225c45e4de704028a8ec17</id>
<content type='text'>
Pablo Neira Ayuso says:

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

The following patchset contains Netfilter fixes for net:

1) Fix NAT IPv6 offload in the flowtable.

2) icmpv6 is printed as unknown in /proc/net/nf_conntrack.

3) Use div64_u64() in nft_limit, from Eric Dumazet.

4) Use pre_exit to unregister ebtables and arptables hooks,
   from Florian Westphal.

5) Fix out-of-bound memset in x_tables compat match/target,
   also from Florian.

6) Clone set elements expression to ensure proper initialization.
====================

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: x_tables: fix compat match/target pad out-of-bound write</title>
<updated>2021-04-12T22:18:57Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2021-04-07T19:38:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b29c457a6511435960115c0f548c4360d5f4801d'/>
<id>urn:sha1:b29c457a6511435960115c0f548c4360d5f4801d</id>
<content type='text'>
xt_compat_match/target_from_user doesn't check that zeroing the area
to start of next rule won't write past end of allocated ruleset blob.

Remove this code and zero the entire blob beforehand.

Reported-by: syzbot+cfc0247ac173f597aaaa@syzkaller.appspotmail.com
Reported-by: Andy Nguyen &lt;theflow@google.com&gt;
Fixes: 9fa492cdc160c ("[NETFILTER]: x_tables: simplify compat API")
Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>net: ipv6: check for validity before dereferencing cfg-&gt;fc_nlinfo.nlh</title>
<updated>2021-04-08T23:41:46Z</updated>
<author>
<name>Muhammad Usama Anjum</name>
<email>musamaanjum@gmail.com</email>
</author>
<published>2021-04-08T22:01:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=864db232dc7036aa2de19749c3d5be0143b24f8f'/>
<id>urn:sha1:864db232dc7036aa2de19749c3d5be0143b24f8f</id>
<content type='text'>
nlh is being checked for validtity two times when it is dereferenced in
this function. Check for validity again when updating the flags through
nlh pointer to make the dereferencing safe.

CC: &lt;stable@vger.kernel.org&gt;
Addresses-Coverity: ("NULL pointer dereference")
Signed-off-by: Muhammad Usama Anjum &lt;musamaanjum@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: report errors for iftoken via netlink extack</title>
<updated>2021-04-08T20:52:36Z</updated>
<author>
<name>Stephen Hemminger</name>
<email>stephen@networkplumber.org</email>
</author>
<published>2021-04-07T15:59:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3583a4e8d77d44697a21437227dd53fc6e7b2cb5'/>
<id>urn:sha1:3583a4e8d77d44697a21437227dd53fc6e7b2cb5</id>
<content type='text'>
Setting iftoken can fail for several different reasons but there
and there was no report to user as to the cause. Add netlink
extended errors to the processing of the request.

This requires adding additional argument through rtnl_af_ops
set_link_af callback.

Reported-by: Hongren Zheng &lt;li@zenithal.me&gt;
Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Reviewed-by: David Ahern &lt;dsahern@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net-ipv6: bugfix - raw &amp; sctp - switch to ipv6_can_nonlocal_bind()</title>
<updated>2021-04-05T19:56:52Z</updated>
<author>
<name>Maciej Żenczykowski</name>
<email>maze@google.com</email>
</author>
<published>2021-04-05T07:06:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=630e4576f83accf90366686f39808d665d8dbecc'/>
<id>urn:sha1:630e4576f83accf90366686f39808d665d8dbecc</id>
<content type='text'>
Found by virtue of ipv6 raw sockets not honouring the per-socket
IP{,V6}_FREEBIND setting.

Based on hits found via:
  git grep '[.]ip_nonlocal_bind'
We fix both raw ipv6 sockets to honour IP{,V6}_FREEBIND and IP{,V6}_TRANSPARENT,
and we fix sctp sockets to honour IP{,V6}_TRANSPARENT (they already honoured
FREEBIND), and not just the ipv6 'ip_nonlocal_bind' sysctl.

The helper is defined as:
  static inline bool ipv6_can_nonlocal_bind(struct net *net, struct inet_sock *inet) {
    return net-&gt;ipv6.sysctl.ip_nonlocal_bind || inet-&gt;freebind || inet-&gt;transparent;
  }
so this change only widens the accepted opt-outs and is thus a clean bugfix.

I'm not entirely sure what 'fixes' tag to add, since this is AFAICT an ancient bug,
but IMHO this should be applied to stable kernels as far back as possible.
As such I'm adding a 'fixes' tag with the commit that originally added the helper,
which happened in 4.19.  Backporting to older LTS kernels (at least 4.9 and 4.14)
would presumably require open-coding it or backporting the helper as well.

Other possibly relevant commits:
  v4.18-rc6-1502-g83ba4645152d net: add helpers checking if socket can be bound to nonlocal address
  v4.18-rc6-1431-gd0c1f01138c4 net/ipv6: allow any source address for sendmsg pktinfo with ip_nonlocal_bind
  v4.14-rc5-271-gb71d21c274ef sctp: full support for ipv6 ip_nonlocal_bind &amp; IP_FREEBIND
  v4.7-rc7-1883-g9b9742022888 sctp: support ipv6 nonlocal bind
  v4.1-12247-g35a256fee52c ipv6: Nonlocal bind

Cc: Lorenzo Colitti &lt;lorenzo@google.com&gt;
Fixes: 83ba4645152d ("net: add helpers checking if socket can be bound to nonlocal address")
Signed-off-by: Maciej Żenczykowski &lt;maze@google.com&gt;
Reviewed-By: Lorenzo Colitti &lt;lorenzo@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec</title>
<updated>2021-03-31T21:37:51Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2021-03-31T21:37:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c9170f132178cdafefcff7d16434ff3c1b13a988'/>
<id>urn:sha1:c9170f132178cdafefcff7d16434ff3c1b13a988</id>
<content type='text'>
Steffen Klassert says:

====================
pull request (net): ipsec 2021-03-31

1) Fix ipv4 pmtu checks for xfrm anf vti interfaces.
   From Eyal Birger.

2) There are situations where the socket passed to
   xfrm_output_resume() is not the same as the one
   attached to the skb. Use the socket passed to
   xfrm_output_resume() to avoid lookup failures
   when xfrm is used with VRFs.
   From Evan Nimmo.

3) Make the xfrm_state_hash_generation sequence counter per
   network namespace because but its write serialization
   lock is also per network namespace. Write protection
   is insufficient otherwise.
   From Ahmed S. Darwish.

4) Fixup sctp featue flags when used with esp offload.
   From Xin Long.

5) xfrm BEET mode doesn't support fragments for inner packets.
   This is a limitation of the protocol, so no fix possible.
   Warn at least to notify the user about that situation.
   From Xin Long.

6) Fix NULL pointer dereference on policy lookup when
   namespaces are uses in combination with esp offload.

7) Fix incorrect transformation on esp offload when
   packets get segmented at layer 3.

8) Fix some user triggered usages of WARN_ONCE in
   the xfrm compat layer.
   From Dmitry Safonov.

Please pull or let me know if there are problems.
====================

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>xfrm: Provide private skb extensions for segmented and hw offloaded ESP packets</title>
<updated>2021-03-29T07:14:12Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2021-03-26T08:44:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c7dbf4c08868d9db89b8bfe8f8245ca61b01ed2f'/>
<id>urn:sha1:c7dbf4c08868d9db89b8bfe8f8245ca61b01ed2f</id>
<content type='text'>
Commit 94579ac3f6d0 ("xfrm: Fix double ESP trailer insertion in IPsec
crypto offload.") added a XFRM_XMIT flag to avoid duplicate ESP trailer
insertion on HW offload. This flag is set on the secpath that is shared
amongst segments. This lead to a situation where some segments are
not transformed correctly when segmentation happens at layer 3.

Fix this by using private skb extensions for segmented and hw offloaded
ESP packets.

Fixes: 94579ac3f6d0 ("xfrm: Fix double ESP trailer insertion in IPsec crypto offload.")
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>esp: delete NETIF_F_SCTP_CRC bit from features for esp offload</title>
<updated>2021-03-22T06:43:31Z</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2021-03-19T07:35:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=154deab6a3ba47792936edf77f2f13a1cbc4351d'/>
<id>urn:sha1:154deab6a3ba47792936edf77f2f13a1cbc4351d</id>
<content type='text'>
Now in esp4/6_gso_segment(), before calling inner proto .gso_segment,
NETIF_F_CSUM_MASK bits are deleted, as HW won't be able to do the
csum for inner proto due to the packet encrypted already.

So the UDP/TCP packet has to do the checksum on its own .gso_segment.
But SCTP is using CRC checksum, and for that NETIF_F_SCTP_CRC should
be deleted to make SCTP do the csum in own .gso_segment as well.

In Xiumei's testing with SCTP over IPsec/veth, the packets are kept
dropping due to the wrong CRC checksum.

Reported-by: Xiumei Mu &lt;xmu@redhat.com&gt;
Fixes: 7862b4058b9f ("esp: Add gso handlers for esp4 and esp6")
Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
</feed>
