]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: weaken the v4mapped source check
authorJakub Kicinski <kuba@kernel.org>
Wed, 17 Mar 2021 16:55:15 +0000 (09:55 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Mar 2021 18:19:23 +0000 (11:19 -0700)
commitbafc0c53e210df5e8fdfd8153ad790f35f14a9d3
tree53cd4721d6c7da526af03fd11c15d17d0271636c
parent0f170a66fffe734f3f387dbc0e3c304baedc73e0
ipv6: weaken the v4mapped source check

This reverts commit 5c798a5509407913203c1475b7f45d14e2e230b2.

Commit 5c798a550940 ("ipv6: drop incoming packets having a v4mapped
source address") introduced an input check against v4mapped addresses.
Use of such addresses on the wire is indeed questionable and not
allowed on public Internet. As the commit pointed out

  https://tools.ietf.org/html/draft-itojun-v6ops-v4mapped-harmful-02

lists potential issues.

Unfortunately there are applications which use v4mapped addresses,
and breaking them is a clear regression. For example v4mapped
addresses (or any semi-valid addresses, really) may be used
for uni-direction event streams or packet export.

Since the issue which sparked the addition of the check was with
TCP and request_socks in particular push the check down to TCPv6
and DCCP. This restores the ability to receive UDPv6 packets with
v4mapped address as the source.

Keep using the IPSTATS_MIB_INHDRERRORS statistic to minimize the
user-visible changes.

Fixes: 5c798a550940 ("ipv6: drop incoming packets having a v4mapped source address")
Reported-by: Sunyi Shao <sunyishao@fb.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/ipv6.c
net/ipv6/ip6_input.c
net/ipv6/tcp_ipv6.c
net/mptcp/subflow.c