Commit ef0f963d authored by Committed by Greg Kroah-Hartman
ip: discard IPv4 datagrams with overlapping segments.
commit 7969e5c40dfd04799d4341f1b7cd266b6e47f227 upstream. 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 <email@example.com> Signed-off-by: Peter Oskolkov <firstname.lastname@example.org> Signed-off-by: Eric Dumazet <email@example.com> Cc: Florian Westphal <firstname.lastname@example.org> Acked-by: Stephen Hemminger <email@example.com> Signed-off-by: David S. Miller <firstname.lastname@example.org> Signed-off-by: Mao Wenan <email@example.com> [bwh: Backported to 4.4: - s/__IP_INC_STATS/IP_INC_STATS_BH/ - Deleted code is slightly different] Signed-off-by: Ben Hutchings <firstname.lastname@example.org> Signed-off-by: Greg Kroah-Hartman <email@example.com>
Showing with 21 additions and 51 deletions