idnits 2.17.1 draft-ietf-6man-oversized-header-chain-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC2460, updated by this document, for RFC5378 checks: 1997-07-30) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (November 5, 2012) is 4189 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 2460 (Obsoleted by RFC 8200) Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 IPv6 maintenance Working Group (6man) F. Gont 3 Internet-Draft SI6 Networks / UTN-FRH 4 Updates: 2460 (if approved) V. Manral 5 Intended status: Standards Track Hewlett-Packard Corp. 6 Expires: May 9, 2013 November 5, 2012 8 Security and Interoperability Implications of Oversized IPv6 Header 9 Chains 10 draft-ietf-6man-oversized-header-chain-02 12 Abstract 14 The IPv6 specification allows IPv6 header chains of an arbitrary 15 size. The specification also allows options which can in turn extend 16 each of the headers. In those scenarios in which the IPv6 header 17 chain or options are unusually long and packets are fragmented, or 18 scenarios in which the fragment size is very small, the first 19 fragment of a packet may fail to include the entire IPv6 header 20 chain. This document discusses the interoperability and security 21 problems of such traffic, and updates RFC 2460 such that the first 22 fragment of a packet is required to contain the entire IPv6 header 23 chain. 25 Status of this Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at http://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on May 9, 2013. 42 Copyright Notice 44 Copyright (c) 2012 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (http://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 60 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 61 3. Interoperability Implications of Oversized IPv6 Header 62 Chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 63 4. Forwarding Implications of Oversized IPv6 Header Chains . . . 6 64 5. Security Implications of Oversized IPv6 Header Chains . . . . 7 65 6. Updating RFC 2460 . . . . . . . . . . . . . . . . . . . . . . 8 66 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 67 8. Security Considerations . . . . . . . . . . . . . . . . . . . 10 68 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 11 69 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 12 70 10.1. Normative References . . . . . . . . . . . . . . . . . . 12 71 10.2. Informative References . . . . . . . . . . . . . . . . . 12 72 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 13 74 1. Introduction 76 With IPv6, IPv6 options are carried inside one or more IPv6 Extension 77 Headers [RFC2460]. A sequence of more than one IPv6 Extension 78 Headers in a row is commonly called an "IPv6 Header Chain". In those 79 scenarios in which the IPv6 header chain is unusually long and 80 packets are fragmented, or scenarios in which the fragment size is 81 very small, the first fragment of a packet may fail to include the 82 entire IPv6 header chain. 84 While IPv4 had a fixed maximum length for the set of all IPv4 options 85 present in a single IPv4 packet, IPv6 does not have any equivalent 86 maximum limit at present. This document updates the set of IPv6 87 specifications to create an overall limit on the size of the 88 combination of IPv6 options and IPv6 Extension Headers that is 89 allowed in a single IPv6 packet. Namely, it updates RFC 2460 such 90 that the first fragment of a fragmented datagram is required to 91 contain the entire IPv6 header chain. 93 It should be noted that this requirement does not preclude the use of 94 e.g. IPv6 jumbo payloads but instead merely requires that all 95 *headers*, starting from IPv6 base header and continuing up to the 96 upper layer header (e.g. TCP or the like) be present in the first 97 fragment. 99 2. Terminology 101 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 102 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 103 document are to be interpreted as described in RFC 2119 [RFC2119]. 105 IPv6 Extension Headers: 106 Any Extension Headers as described in Section 4 of [RFC2460], and 107 specified in [RFC2460] or any subsequent documents. 109 Entire IPv6 header chain: 110 All protocol headers starting from the fixed IPv6 header up to 111 (and including) the upper layer protocol header (TCP, UDP, etc. -- 112 assuming there is one of those), including any intermediate IPv6 113 extension headers. 115 Note: If there is an upper layer header, only the header (and 116 not its payload) are considered part of the "entire IPv6 header 117 chain". For example, if the upper layer protocol is TCP, only 118 the TCP header (and not its possible data bytes) should be 119 considered part of the "entire IPv6 header chain". 121 3. Interoperability Implications of Oversized IPv6 Header Chains 123 Some transition technologies, such as NAT64 [RFC6146], might need to 124 have access to the entire IPv6 header chain in order to associate an 125 incoming IPv6 packet with an ongoing "session". 127 For instance, Section 3.4 of [RFC6146] states that "The NAT64 MAY 128 require that the UDP, TCP, or ICMP header be completely contained 129 within the fragment that contains fragment offset equal to zero". 131 Failure to include the entire IPv6 header chain in the first-fragment 132 might cause the translation function to fail, with the corresponding 133 packets being dropped. 135 4. Forwarding Implications of Oversized IPv6 Header Chains 137 A lot of the switches and Routers in the internet do hardware based 138 forwarding. To be able to achieve a level of throughput, there is a 139 fixed maximum number of clock cycles dedicated to each packet. 140 However with the use of unlimited options and header interleaving, 141 larger packets with a lot of interleaving might have to be forwarded 142 to the software. This is one reason why the maximum size of valid 143 packets with interleaved headers needs to be limited. 145 5. Security Implications of Oversized IPv6 Header Chains 147 Most firewalls enforce their filtering policy based on the following 148 parameters: 150 o Source IP address 152 o Destination IP address 154 o Protocol type (e.g. ICMPv6, TCP, UDP, SCTP) 156 o Transport-layer Source Port number 158 o Transport-layer Destination Port number 160 Some firewalls reassemble fragmented packets before applying a 161 filtering policy, and thus always have the aforementioned information 162 available when deciding whether to allow or block a packet. However, 163 other stateless firewalls (generally prevalent on small/ home office 164 equipment) do not reassemble fragmented traffic, and hence have to 165 enforce their filtering policy based on the information contained in 166 the received fragment, as opposed to the information contained in the 167 reassembled datagram. 169 When presented with fragmented traffic, many of such firewalls 170 typically enforce their policy only on the first fragment of a 171 packet, based on the assumption that if the first fragment is 172 dropped, reassembly of the corresponding datagram will fail, and thus 173 such datagram will be effectively blocked. However, if the first 174 fragment fails to include the entire IPv6 header chain, they might 175 have no alternative other than "blindly" allowing or blocking the 176 corresponding fragment. If they blindly allow the packet, then the 177 firewall can be easily circumvented by intentionally sending 178 fragmented packets that fail to include the entire IPv6 header chain 179 in the first fragment. On the other hand, first-fragments that fail 180 to include the entire IPv6 header chain have never been formally 181 deprecated and thus, in theory, might be legitimately generated. 183 6. Updating RFC 2460 185 If an IPv6 packet is fragmented, the first fragment of that IPv6 186 packet (i.e., the fragment having a Fragment Offset of 0) MUST 187 contain the entire IPv6 header chain. 189 A host that receives an IPv6 first-fragment that does not contain the 190 entire IPv6 header chain SHOULD drop that packet, and also MAY send 191 an ICMPv6 error message to the (claimed) source address (subject to 192 the sending rules for ICMPv6 errors specified in [RFC4443]). 194 An intermediate system (e.g. router, firewall) that receives an IPv6 195 first-fragment that does not contain the entire IPv6 header chain MAY 196 drop that packet, and MAY send an ICMPv6 error message to the 197 (claimed) source address (subject to the sending rules for ICMPv6 198 error messages specified in [RFC4443]). Intermediate systems having 199 this capability SHOULD support configuration (e.g. enable/disable) of 200 whether such packets are dropped or not by the intermediate system. 202 If a host or intermediate system drops an IPv6 first-fragment because 203 it does not contain the entire IPv6 Header Chain, and sends an ICMPv6 204 error message due to that packet drop, then the ICMPv6 error message 205 MUST be Type 4 ("Parameter Problem") and MUST use Code 3 ("First- 206 fragment has incomplete IPv6 Header Chain"). 208 Implementations SHOULD support configuration of whether an ICMPv6 209 error/diagnostic message is sent when such packet drops occur. 210 Implementations might consider providing not only an enable/disable 211 configuration, but also other settings (e.g. rate-limit the sending 212 of this kind of ICMPv6 error message). 214 Sending this ICMPv6 error message when such packets are dropped can 215 be very helpful in diagnosing operational IPv6 network problems, for 216 example if recursive tunnels or certain link technologies have 217 reduced the end-to-end MTU from larger more common values. However, 218 such ICMPv6 messages also might be operationally problematic, for 219 example if an adversary forges the source address on IPv6 first- 220 fragment packets that do NOT contain the entire IPv6 Header Chain. 221 So configurability about sending these ICMPv6 error messages is very 222 important to network operators for this situation. 224 7. IANA Considerations 226 IANA is requested that the "Reason Code" registry for ICMPv6 "Type 4 227 - Parameter Problem" messages be updated as follows: 229 CODE NAME/DESCRIPTION 230 3 IPv6 first-fragment has incomplete IPv6 header chain 232 8. Security Considerations 234 This document describes the interoperability and security 235 implications of IPv6 packets or first-fragments that fail to include 236 the entire IPv6 header chain. The security implications include the 237 possibility of an attacker evading network security controls such as 238 firewalls and Network Intrusion Detection Systems (NIDS) [CPNI-IPv6]. 240 This document updates RFC 2460 such that those packets are forbidden, 241 thus preventing the aforementioned issues. 243 This specification allows nodes that drop the aforementioned packets 244 to signal such packet drops with ICMPv6 "Parameter Problem, IPv6 245 first-fragment has incomplete IPv6 header chain" (Type 4, Code 3) 246 error messages. 248 As with all ICMPv6 error/diagnostic messages, deploying Source 249 Address Forgery Prevention filters helps reduce the chances of an 250 attacker successfully performing a reflection attack by sending 251 forged illegal packets with the victim/target's IPv6 address as the 252 IPv6 Source Address of the illegal packet [RFC2827] [RFC3704]. 254 9. Acknowledgements 256 The authors of this document would like to thank Ran Atkinson for 257 contributing text and ideas that were incorporated into this 258 document. 260 The authors would like to thank (in alphabetical order) Ran Atkinson, 261 Fred Baker, Dominik Elsbroek, Bill Jouris, Suresh Krishnan, Dave 262 Thaler, and Eric Vyncke, for providing valuable comments on earlier 263 versions of this document. 265 10. References 267 10.1. Normative References 269 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 270 Requirement Levels", BCP 14, RFC 2119, March 1997. 272 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 273 (IPv6) Specification", RFC 2460, December 1998. 275 [RFC4443] Conta, A., Deering, S., and M. Gupta, "Internet Control 276 Message Protocol (ICMPv6) for the Internet Protocol 277 Version 6 (IPv6) Specification", RFC 4443, March 2006. 279 10.2. Informative References 281 [RFC2827] Ferguson, P. and D. Senie, "Network Ingress Filtering: 282 Defeating Denial of Service Attacks which employ IP Source 283 Address Spoofing", BCP 38, RFC 2827, May 2000. 285 [RFC3704] Baker, F. and P. Savola, "Ingress Filtering for Multihomed 286 Networks", BCP 84, RFC 3704, March 2004. 288 [RFC6146] Bagnulo, M., Matthews, P., and I. van Beijnum, "Stateful 289 NAT64: Network Address and Protocol Translation from IPv6 290 Clients to IPv4 Servers", RFC 6146, April 2011. 292 [CPNI-IPv6] 293 Gont, F., "Security Assessment of the Internet Protocol 294 version 6 (IPv6)", UK Centre for the Protection of 295 National Infrastructure, (available on request). 297 Authors' Addresses 299 Fernando Gont 300 SI6 Networks / UTN-FRH 301 Evaristo Carriego 2644 302 Haedo, Provincia de Buenos Aires 1706 303 Argentina 305 Phone: +54 11 4650 8472 306 Email: fgont@si6networks.com 307 URI: http://www.si6networks.com 309 Vishwas Manral 310 Hewlett-Packard Corp. 311 191111 Pruneridge Ave. 312 Cupertino, CA 95014 313 US 315 Phone: 408-447-1497 316 Email: vishwas.manral@hp.com 317 URI: