--- 1/draft-ietf-intarea-frag-fragile-03.txt 2018-11-27 11:13:10.893925040 -0800 +++ 2/draft-ietf-intarea-frag-fragile-04.txt 2018-11-27 11:13:10.945926292 -0800 @@ -1,27 +1,27 @@ Internet Area WG R. Bonica Internet-Draft Juniper Networks Intended status: Best Current Practice F. Baker -Expires: May 25, 2019 Unaffiliated +Expires: May 31, 2019 Unaffiliated G. Huston APNIC R. Hinden Check Point Software O. Troan Cisco F. Gont SI6 Networks - November 21, 2018 + November 27, 2018 IP Fragmentation Considered Fragile - draft-ietf-intarea-frag-fragile-03 + draft-ietf-intarea-frag-fragile-04 Abstract This document describes IP fragmentation and explains how it reduces the reliability of Internet communication. This document also proposes alternatives to IP fragmentation and provides recommendations for developers and network operators. Status of This Memo @@ -32,21 +32,21 @@ Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." - This Internet-Draft will expire on May 25, 2019. + This Internet-Draft will expire on May 31, 2019. Copyright Notice Copyright (c) 2018 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents @@ -62,46 +62,48 @@ 2. IP Fragmentation . . . . . . . . . . . . . . . . . . . . . . 3 2.1. Links, Paths, MTU and PMTU . . . . . . . . . . . . . . . 3 2.2. Fragmentation Procedures . . . . . . . . . . . . . . . . 5 2.3. Upper-Layer Reliance on IP Fragmentation . . . . . . . . 6 3. Requirements Language . . . . . . . . . . . . . . . . . . . . 7 4. Reduced Reliability . . . . . . . . . . . . . . . . . . . . . 7 4.1. Policy-Based Routing . . . . . . . . . . . . . . . . . . 7 4.2. Network Address Translation (NAT) . . . . . . . . . . . . 8 4.3. Stateless Firewalls . . . . . . . . . . . . . . . . . . . 8 4.4. Stateless Load Balancers . . . . . . . . . . . . . . . . 9 - 4.5. Security Vulnerabilities . . . . . . . . . . . . . . . . 9 - 4.6. Blackholing Due to ICMP Loss . . . . . . . . . . . . . . 11 - 4.6.1. Transient Loss . . . . . . . . . . . . . . . . . . . 11 - 4.6.2. Incorrect Implementation of Security Policy . . . . . 12 - 4.6.3. Persistent Loss Caused By Anycast . . . . . . . . . . 12 - 4.7. Blackholing Due To Filtering . . . . . . . . . . . . . . 13 - 5. Alternatives to IP Fragmentation . . . . . . . . . . . . . . 13 - 5.1. Transport Layer Solutions . . . . . . . . . . . . . . . . 13 + 4.5. IPv4 Reassembly Errors at High Data Rates . . . . . . . . 10 + 4.6. Security Vulnerabilities . . . . . . . . . . . . . . . . 10 + 4.7. Blackholing Due to ICMP Loss . . . . . . . . . . . . . . 11 + 4.7.1. Transient Loss . . . . . . . . . . . . . . . . . . . 12 + 4.7.2. Incorrect Implementation of Security Policy . . . . . 12 + 4.7.3. Persistent Loss Caused By Anycast . . . . . . . . . . 13 + 4.8. Blackholing Due To Filtering . . . . . . . . . . . . . . 13 + 5. Alternatives to IP Fragmentation . . . . . . . . . . . . . . 14 + 5.1. Transport Layer Solutions . . . . . . . . . . . . . . . . 14 5.2. Application Layer Solutions . . . . . . . . . . . . . . . 15 6. Applications That Rely on IPv6 Fragmentation . . . . . . . . 16 6.1. DNS . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 6.2. OSPF . . . . . . . . . . . . . . . . . . . . . . . . . . 17 6.3. Packet-in-Packet Encapsulations . . . . . . . . . . . . . 17 - 7. Recommendations . . . . . . . . . . . . . . . . . . . . . . . 17 - 7.1. For Application Developers . . . . . . . . . . . . . . . 17 + 6.4. Licklider Transmission Protocol (LTP) . . . . . . . . . . 17 + 7. Recommendations . . . . . . . . . . . . . . . . . . . . . . . 18 + 7.1. For Application Developers . . . . . . . . . . . . . . . 18 7.2. For System Developers . . . . . . . . . . . . . . . . . . 18 7.3. For Middle Box Developers . . . . . . . . . . . . . . . . 18 7.4. For Network Operators . . . . . . . . . . . . . . . . . . 18 - 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 - 9. Security Considerations . . . . . . . . . . . . . . . . . . . 18 + 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19 + 9. Security Considerations . . . . . . . . . . . . . . . . . . . 19 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 19 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 19 11.1. Normative References . . . . . . . . . . . . . . . . . . 19 11.2. Informative References . . . . . . . . . . . . . . . . . 20 Appendix A. Contributors' Address . . . . . . . . . . . . . . . 23 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 23 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 24 1. Introduction Operational experience [Kent] [Huston] [RFC7872] reveals that IP fragmentation reduces the reliability of Internet communication. This document describes IP fragmentation and explains how it reduces the reliability of Internet communication. This document also proposes alternatives to IP fragmentation and provides recommendations for developers and network operators. @@ -363,21 +366,21 @@ o The Destination IP Address and Destination Port on each inbound packet. A+P [RFC6346] and Carrier Grade NAT (CGN) [RFC6888] are two common NAT strategies. In both approaches the NAT device must virtually reassemble fragmented packets in order to translate and forward each fragment. Virtual reassembly in the network is problematic, because it is computationally expensive and because it is prone to attacks - (Section 4.5). + (Section 4.6). 4.3. Stateless Firewalls IP fragmentation causes problems for stateless firewalls whose rules include TCP and UDP ports. Because port information is not available in the trailing fragments the firewall is limited to the following options: o Accept all trailing fragments, possibly admitting certain classes of attack. @@ -415,21 +418,35 @@ o IP Destination Address. o IPv4 Protocol or IPv6 Next Header. Therefore, non-fragmented packets belonging to a flow can be assigned to one link while fragmented packets belonging to the same flow can be divided between that link and another. This can cause suboptimal load balancing. -4.5. Security Vulnerabilities +4.5. IPv4 Reassembly Errors at High Data Rates + + IPv4 fragmentation is not sufficiently robust for use under some + conditions in today's Internet. At high data rates, the 16-bit IP + identification field is not large enough to prevent frequent + incorrectly assembled IP fragments, and the TCP and UDP checksums are + insufficient to prevent the resulting corrupted datagrams from being + delivered to higher protocol layers. [RFC4963] describes some easily + reproduced experiments demonstrating the problem, and discusses some + of the operational implications of these observations. + + These reassembly issues are not easily reproducible in IPv6 because + the IPv6 identification field is 32 bits long. + +4.6. Security Vulnerabilities Security researchers have documented several attacks that exploit IP fragmentation. The following are examples: o Overlapping fragment attacks [RFC1858][RFC3128][RFC5722] o Resource exhaustion attacks (such as the Rose Attack) o Attacks based on predictable fragment identification values [RFC7739] @@ -470,63 +487,63 @@ for an attacker to forge malicious IP fragments that would cause the reassembly procedure for legitimate packets to fail. NIDS aims at identifying malicious activity by analyzing network traffic. Ambiguity in the possible result of the fragment reassembly process may allow an attacker to evade these systems. Many of these systems try to mitigate some of these evasion techniques (e.g. By computing all possible outcomes of the fragment reassembly process, at the expense of increased processing requirements). -4.6. Blackholing Due to ICMP Loss +4.7. Blackholing Due to ICMP Loss As mentioned in Section 2.3, upper-layer protocols can be configured to rely on PMTUD. Because PMTUD relies upon the network to deliver ICMP PTB messages, those protocols also rely on the networks to deliver ICMP PTB messages. According to [RFC4890], ICMP PTB messages must not be filtered. However, ICMP PTB delivery is not reliable. It is subject to both transient and persistent loss. Transient loss of ICMP PTB messages can cause transient black holes. When the conditions contributing to transient loss abate, the network regains its ability to deliver ICMP PTB messages and connectivity - between the source and destination nodes is restored. Section 4.6.1 + between the source and destination nodes is restored. Section 4.7.1 of this document describes conditions that lead to transient loss of ICMP PTB messages. Persistent loss of ICMP PTB messages can cause persistent black - holes. Section 4.6.2 and Section 4.6.3 of this document describe + holes. Section 4.7.2 and Section 4.7.3 of this document describe conditions that lead to persistent loss of ICMP PTB messages. The problem described in this section is specific to PMTUD. It does not occur when the upper-layer protocol obtains its PMTU estimate from PLPMTUD or from any other source. -4.6.1. Transient Loss +4.7.1. Transient Loss The following factors can contribute to transient loss of ICMP PTB messages: o Network congestion. o Packet corruption. o Transient routing loops. o ICMP rate limiting. The effect of rate limiting may be severe, as RFC 4443 recommends strict rate limiting of IPv6 traffic. -4.6.2. Incorrect Implementation of Security Policy +4.7.2. Incorrect Implementation of Security Policy Incorrect implementation of security policy can cause persistent loss of ICMP PTB messages. Assume that a Customer Premise Equipment (CPE) router implements the following zone-based security policy: o Allow any traffic to flow from the inside zone to the outside zone. @@ -542,42 +559,42 @@ allows the ICMP PTB to flow from the outside zone to the inside zone. If not, the implementation discards the ICMP PTB message. When a incorrect implementation of the above-mentioned security policy receives an ICMP PTB message, it discards the packet because its source address is not associated with an existing flow. The security policy described above is implemented incorrectly on many consumer CPE routers. -4.6.3. Persistent Loss Caused By Anycast +4.7.3. Persistent Loss Caused By Anycast Anycast can cause persistent loss of ICMP PTB messages. Consider the example below: A DNS client sends a request to an anycast address. The network routes that DNS request to the nearest instance of that anycast address (i.e., a DNS Server). The DNS server generates a response and sends it back to the DNS client. While the response does not exceed the DNS server's PMTU estimate, it does exceed the actual PMTU. A downstream router drops the packet and sends an ICMP PTB message the packet's source (i.e., the anycast address). The network routes the ICMP PTB message to the anycast instance closest to the downstream router. That anycast instance may not be the DNS server that originated the DNS response. It may be another DNS server with the same anycast address. The DNS server that originated the response may never receive the ICMP PTB message and may never updates it PMTU estimate. -4.7. Blackholing Due To Filtering +4.8. Blackholing Due To Filtering In RFC 7872, researchers sampled Internet paths to determine whether they would convey packets that contain IPv6 extension headers. Sampled paths terminated at popular Internet sites (e.g., popular web, mail and DNS servers). The study revealed that at least 28% of the sampled paths did not convey packets containing the IPv6 Fragment extension header. In most cases, fragments were dropped in the destination autonomous system. In other cases, the fragments were dropped in transit @@ -591,21 +608,21 @@ Possible causes follow: o Hardware inability to process fragmented packets. o Failure to change vendor defaults. o Unintentional misconfiguration. o Intentional configuration (e.g., network operators consciously chooses to drop IPv6 fragments in order to address the issues - raised in Section 4.1 through Section 4.6, above.) + raised in Section 4.1 through Section 4.7, above.) 5. Alternatives to IP Fragmentation 5.1. Transport Layer Solutions The Transport Control Protocol (TCP) [RFC0793]) can be operated in a mode that does not require IP fragmentation. Applications submit a stream of data to TCP. TCP divides that stream of data into segments, with no segment exceeding the TCP Maximum @@ -764,20 +781,32 @@ mentioned encapsulations. The fragmentation strategy described for GRE in [RFC7588] has been deployed for all of the above-mentioned encapsulations. This strategy does not rely on IP fragmentation except in one corner case. (see Section 3.3.2.2 of RFC 7588 and Section 7.1 of RFC 2473). Section 3.3 of [RFC7676] further describes this corner case. See [I-D.ietf-intarea-tunnels] for further discussion. +6.4. Licklider Transmission Protocol (LTP) + + Some UDP applications rely on IP fragmentation to achieve acceptable + levels of performance. These applications use UDP datagram sizes + that are larger than the path MTU so that more data can be conveyed + between the application and the kernel in a single system call. + + For example, the Licklider Transmission Protocol (LTP) [RFC5326] + which is in current use on the International Space Station (ISS) uses + UDP datagram sizes larger than the path MTU to achieve acceptable + levels of performance even though this invokes IP fragmentation. + 7. Recommendations 7.1. For Application Developers Protocol developers SHOULD NOT develop new protocols that rely on IP fragmentation. However, they MAY develop new protocols that rely on IP fragmentation when no viable alternative exists. Legacy protocols that depend upon IP fragmentation SHOULD be updated to break that dependency. However, in some cases, there may be no @@ -809,21 +838,21 @@ boxes may perform sub-optimally, process IP fragments in a manner that is not compliant with RFC 791 or RFC 8200, or even discard IP fragments completely. Such behaviors are NOT RECOMMENDED. If a middleboxes implements non-standard behavior with respect to IP fragmentation, then that behavior MUST be clearly documented. 7.4. For Network Operators As per RFC 4890, network operators MUST NOT filter ICMPv6 PTB messages unless they are known to be forged or otherwise - illegitimate. As stated in Section 4.6, filtering ICMPv6 PTB packets + illegitimate. As stated in Section 4.7, filtering ICMPv6 PTB packets causes PMTUD to fail. Operators MUST ensure proper PMTUD operation in their network, including making sure the network generates PTB packets when dropping packets too large compared to outgoing interface MTU. Many upper-layer protocols rely on PMTUD. As per RFC 8200, network operators MUST NOT deploy IPv6 links whose MTU is less than 1280 bytes. Network operators SHOULD NOT filter IP fragments if they originated at a domain name server or are destined for a domain name server. @@ -987,20 +1016,30 @@ [RFC4890] Davies, E. and J. Mohacsi, "Recommendations for Filtering ICMPv6 Messages in Firewalls", RFC 4890, DOI 10.17487/RFC4890, May 2007, . [RFC4960] Stewart, R., Ed., "Stream Control Transmission Protocol", RFC 4960, DOI 10.17487/RFC4960, September 2007, . + [RFC4963] Heffner, J., Mathis, M., and B. Chandler, "IPv4 Reassembly + Errors at High Data Rates", RFC 4963, + DOI 10.17487/RFC4963, July 2007, + . + + [RFC5326] Ramadas, M., Burleigh, S., and S. Farrell, "Licklider + Transmission Protocol - Specification", RFC 5326, + DOI 10.17487/RFC5326, September 2008, + . + [RFC5340] Coltun, R., Ferguson, D., Moy, J., and A. Lindem, "OSPF for IPv6", RFC 5340, DOI 10.17487/RFC5340, July 2008, . [RFC5722] Krishnan, S., "Handling of Overlapping IPv6 Fragments", RFC 5722, DOI 10.17487/RFC5722, December 2009, . [RFC5927] Gont, F., "ICMP Attacks against TCP", RFC 5927, DOI 10.17487/RFC5927, July 2010,