ipv6: drop non loopback packets claiming to originate from ::1
authorFlorian Westphal <fw@strlen.de>
Fri, 14 Apr 2017 18:22:43 +0000 (20:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Apr 2017 19:09:23 +0000 (15:09 -0400)
commit0aa8c13eb512823bc4d60397d666a6b6260bb965
treecb0a1a2dd8d48965f34613646c4d5b3a52c59e03
parent71947f0f91ad9c995e11c671d24bd4da5d11c0cb
ipv6: drop non loopback packets claiming to originate from ::1

We lack a saddr check for ::1. This causes security issues e.g. with acls
permitting connections from ::1 because of assumption that these originate
from local machine.

Assuming a source address of ::1 is local seems reasonable.
RFC4291 doesn't allow such a source address either, so drop such packets.

Reported-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_input.c