ip: discard IPv4 datagrams with overlapping segments.
authorPeter Oskolkov <posk@google.com>
Wed, 10 Oct 2018 19:30:07 +0000 (12:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 07:13:25 +0000 (09:13 +0200)
commit82f36cbc74595f06900f478d4eaf7217a4f06e13
treea229037fe668049d4fe772addf7c5c75d4c39938
parentd838486621c38f084b867743a0abd0968c6cb196
ip: discard IPv4 datagrams with overlapping segments.

This behavior is required in IPv6, and there is little need
to tolerate overlapping fragments in IPv4. This change
simplifies the code and eliminates potential DDoS attack vectors.

Tested: ran ip_defrag selftest (not yet available uptream).

Suggested-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Peter Oskolkov <posk@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Florian Westphal <fw@strlen.de>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 7969e5c40dfd04799d4341f1b7cd266b6e47f227)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/uapi/linux/snmp.h
net/ipv4/ip_fragment.c
net/ipv4/proc.c