draft-ietf-6man-oversized-header-chain-09.txt   rfc7112.txt 
IPv6 maintenance Working Group (6man) F. Gont Internet Engineering Task Force (IETF) F. Gont
Internet-Draft SI6 Networks / UTN-FRH Request for Comments: 7112 Huawei Technologies
Updates: 2460 (if approved) V. Manral Updates: 2460 V. Manral
Intended status: Standards Track Hewlett-Packard Corp. Category: Standards Track Ionos Networks
Expires: May 30, 2014 R. Bonica ISSN: 2070-1721 R. Bonica
Juniper Networks Juniper Networks
November 26, 2013 January 2014
Implications of Oversized IPv6 Header Chains Implications of Oversized IPv6 Header Chains
draft-ietf-6man-oversized-header-chain-09
Abstract Abstract
The IPv6 specification allows IPv6 header chains of an arbitrary The IPv6 specification allows IPv6 Header Chains of an arbitrary
size. The specification also allows options which can in turn extend size. The specification also allows options that can, in turn,
each of the headers. In those scenarios in which the IPv6 header extend each of the headers. In those scenarios in which the IPv6
chain or options are unusually long and packets are fragmented, or Header Chain or options are unusually long and packets are
scenarios in which the fragment size is very small, the first fragmented, or scenarios in which the fragment size is very small,
fragment of a packet may fail to include the entire IPv6 header the First Fragment of a packet may fail to include the entire IPv6
chain. This document discusses the interoperability and security Header Chain. This document discusses the interoperability and
problems of such traffic, and updates RFC 2460 such that the first security problems of such traffic, and updates RFC 2460 such that the
fragment of a packet is required to contain the entire IPv6 header First Fragment of a packet is required to contain the entire IPv6
chain. Header Chain.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This is an Internet Standards Track document.
provisions of BCP 78 and BCP 79.
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 http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months This document is a product of the Internet Engineering Task Force
and may be updated, replaced, or obsoleted by other documents at any (IETF). It represents the consensus of the IETF community. It has
time. It is inappropriate to use Internet-Drafts as reference received public review and has been approved for publication by the
material or to cite them other than as "work in progress." Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 5741.
This Internet-Draft will expire on May 30, 2014. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc7112.
Copyright Notice Copyright Notice
Copyright (c) 2013 IETF Trust and the persons identified as the Copyright (c) 2014 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction ....................................................2
2. Requirements Language . . . . . . . . . . . . . . . . . . . . 3 2. Requirements Language ...........................................3
3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Terminology .....................................................3
4. Motivation . . . . . . . . . . . . . . . . . . . . . . . . . 4 4. Motivation ......................................................4
5. Updates to RFC 2460 . . . . . . . . . . . . . . . . . . . . . 4 5. Updates to RFC 2460 .............................................5
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 6. IANA Considerations .............................................5
7. Security Considerations . . . . . . . . . . . . . . . . . . . 5 7. Security Considerations .........................................6
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6 8. Acknowledgements ................................................6
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 9. References ......................................................7
9.1. Normative References . . . . . . . . . . . . . . . . . . 6 9.1. Normative References .......................................7
9.2. Informative References . . . . . . . . . . . . . . . . . 7 9.2. Informative References .....................................7
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7
1. Introduction 1. Introduction
With IPv6, optional internet-layer information is carried in one or With IPv6, optional internet-layer information is carried in one or
more IPv6 Extension Headers [RFC2460]. Extension headers are placed more IPv6 Extension Headers [RFC2460]. Extension Headers are placed
between the IPv6 header and the upper-layer header in a packet. The between the IPv6 header and the Upper-Layer Header in a packet. The
term "header chain" refers collectively to the IPv6 header, extension term "Header Chain" refers collectively to the IPv6 header, Extension
headers and upper-layer header occurring in a packet. In those Headers, and Upper-Layer Header occurring in a packet. In those
scenarios in which the IPv6 header chain is unusually long and scenarios in which the IPv6 Header Chain is unusually long and
packets are fragmented, or scenarios in which the fragment size is packets are fragmented, or scenarios in which the fragment size is
very small, the header chain may span multiple fragments. very small, the Header Chain may span multiple fragments.
While IPv4 had a fixed maximum length for the set of all IPv4 options While IPv4 had a fixed maximum length for the set of all IPv4 options
present in a single IPv4 packet, IPv6 does not have any equivalent present in a single IPv4 packet, IPv6 does not have any equivalent
maximum limit at present. This document updates the set of IPv6 maximum limit at present. This document updates the set of IPv6
specifications to create an overall limit on the size of the specifications to create an overall limit on the size of the
combination of IPv6 options and IPv6 Extension Headers that is combination of IPv6 options and IPv6 Extension Headers that is
allowed in a single IPv6 packet. Namely, it updates RFC 2460 such allowed in a single IPv6 packet. Namely, it updates RFC 2460 such
that the first fragment of a fragmented datagram is required to that the First Fragment of a fragmented datagram is required to
contain the entire IPv6 header chain. contain the entire IPv6 Header Chain.
It should be noted that this requirement does not preclude the use of It should be noted that this requirement does not preclude the use of
large payloads but instead merely requires that all headers, starting large payloads but, instead, merely requires that all headers,
from the IPv6 base header and continuing up to the upper layer header starting from the IPv6 base header and continuing up to the Upper-
(e.g., TCP or the like) be present in the first fragment. Layer Header (e.g., TCP or the like) be present in the First
Fragment.
2. Requirements Language 2. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in [RFC2119].
3. Terminology 3. Terminology
For the purposes of this document, the terms Extension Header, Header For the purposes of this document, the terms Extension Header, IPv6
Chain, First Fragment, and Upper-layer Header are used as follows: Header Chain, First Fragment, and Upper-Layer Header are used as
follows:
Extension Header: Extension Header:
Extension Headers are defined in Section 4 of [RFC2460]. As a Extension Headers are defined in Section 4 of [RFC2460]. As a
result of [I-D.ietf-6man-ext-transmit], [IANA-PROTO] provides a result of [RFC7045], [IANA-PROTO] provides a list of assigned
list of assigned Internet Protocol Numbers and designates which of Internet Protocol Numbers and designates which of those protocol
those protocol numbers also represent extension headers. numbers also represent Extension Headers.
First Fragment: First Fragment:
An IPv6 fragment with fragment offset equal to 0. An IPv6 fragment with Fragment Offset equal to 0.
IPv6 Header Chain: IPv6 Header Chain:
The header chain contains an initial IPv6 header, zero or more The IPv6 Header Chain contains an initial IPv6 header, zero or
IPv6 extension headers, and optionally, a single upper-layer more IPv6 Extension Headers, and optionally, a single Upper-Layer
header. If an upper-layer header is present, it terminates the Header. If an Upper-Layer Header is present, it terminates the
header chain; otherwise the "No Next Header" value (Next Header = header chain; otherwise, the "No Next Header" value (Next Header =
59) terminates it. 59) terminates it.
The first member of the header chain is always an IPv6 header. The first member of the IPv6 Header Chain is always an IPv6
For a subsequent header to qualify as a member of the header header. For a subsequent header to qualify as a member of the
chain, it must be referenced by the "Next Header" field of the header chain, it must be referenced by the "Next Header" field of
previous member of the header chain. However, if a second IPv6 the previous member of the header chain. However, if a second
header appears in the header chain, as is the case when IPv6 is IPv6 header appears in the header chain, as is the case when IPv6
tunneled over IPv6, the second IPv6 header is considered to be an is tunneled over IPv6, the second IPv6 header is considered to be
upper-layer header and terminates the header chain. Likewise, if an Upper-Layer Header and terminates the header chain. Likewise,
an Encapsulating Security Payload (ESP) header appears in the if an Encapsulating Security Payload (ESP) header appears in the
header chain it is considered to be an upper-layer header and it header chain, it is considered to be an Upper-Layer Header, and it
terminates the header chain. terminates the header chain.
Upper-layer Header: Upper-Layer Header:
In the general case, the upper-layer header is the first member of In the general case, the Upper-Layer Header is the first member of
the header chain that is neither an IPv6 header nor an IPv6 the header chain that is neither an IPv6 header nor an IPv6
extension header. However, if either an ESP header, or a second Extension Header. However, if either an ESP header, or a second
IPv6 header occur in the header chain, they are considered to be IPv6 header occur in the header chain, they are considered to be
upper layer headers and they terminate the header chain. Upper-Layer Headers, and they terminate the header chain.
Neither the upper-layer payload, nor any protocol data following Neither the upper-layer payload, nor any protocol data following
the upper-layer payload, is considered to be part of the header the upper-layer payload, is considered to be part of the IPv6
chain. In a simple example, if the upper-layer header is a TCP Header Chain. In a simple example, if the Upper-Layer Header is a
header, the TCP payload is not part of the header chain. In a TCP header, the TCP payload is not part of the IPv6 Header Chain.
more complex example, if the upper-layer header is an ESP header, In a more complex example, if the Upper-Layer Header is an ESP
neither the payload data, nor any of the fields that follow the header, neither the payload data, nor any of the fields that
payload data in the ESP header are part of the header chain. follow the payload data in the ESP header are part of the IPv6
Header Chain.
4. Motivation 4. Motivation
Many forwarding devices implement stateless firewalls. A stateless Many forwarding devices implement stateless firewalls. A stateless
firewall enforces a forwarding policy on packet-by-packet basis. In firewall enforces a forwarding policy on a packet-by-packet basis.
order to enforce its forwarding policy, the stateless firewall may In order to enforce its forwarding policy, the stateless firewall may
need to glean information from both the IPv6 and upper-layer headers. need to glean information from both the IPv6 and upper-layer headers.
For example, assume that a stateless firewall discards all traffic For example, assume that a stateless firewall discards all traffic
received from an interface unless it destined for a particular TCP received from an interface unless it is destined for a particular TCP
port on a particular IPv6 address. When this firewall is presented port on a particular IPv6 address. When this firewall is presented
with a fragmented packet that is destined for a different TCP port, with a fragmented packet that is destined for a different TCP port,
and the entire header chain is contained within the first fragment, and the entire header chain is contained within the First Fragment,
the firewall discards the first fragment and allows subsequent the firewall discards the First Fragment and allows subsequent
fragments to pass. Because the first fragment was discarded, the fragments to pass. Because the First Fragment was discarded, the
packet cannot be reassembled at the destination. Insomuch as the packet cannot be reassembled at the destination. Insomuch as the
packet cannot be reassembled, the forwarding policy is enforced. packet cannot be reassembled, the forwarding policy is enforced.
However, when the firewall is presented with a fragmented packet and However, when the firewall is presented with a fragmented packet and
the header chain spans multiple fragments, the first fragment does the header chain spans multiple fragments, the First Fragment does
not contain enough information for the firewall to enforce its not contain enough information for the firewall to enforce its
forwarding policy. Lacking sufficient information, the stateless forwarding policy. Lacking sufficient information, the stateless
firewall either forwards or discards that fragment. Regardless of firewall either forwards or discards that fragment. Regardless of
the action that it takes, it may fail to enforce its forwarding the action that it takes, it may fail to enforce its forwarding
policy. policy.
5. Updates to RFC 2460 5. Updates to RFC 2460
When a host fragments an IPv6 datagram, it MUST include the entire When a host fragments an IPv6 datagram, it MUST include the entire
header chain in the first fragment. IPv6 Header Chain in the First Fragment.
A host that receives a first-fragment that does not satisfy the A host that receives a First Fragment that does not satisfy the
above- stated requirement SHOULD discard the packet and SHOULD send above-stated requirement SHOULD discard the packet and SHOULD send an
an ICMPv6 error message to the source address of the offending packet ICMPv6 error message to the source address of the offending packet
(subject to the rules for ICMPv6 errors specified in [RFC4443]). (subject to the rules for ICMPv6 errors specified in [RFC4443]).
However, for backwards compatibility, implementations MAY include a However, for backwards compatibility, implementations MAY include a
configuration option that allows such fragments to be accepted. configuration option that allows such fragments to be accepted.
Likewise, an intermediate system (e.g., router or firewall) that Likewise, an intermediate system (e.g., router or firewall) that
receives an IPv6 first-fragment that does not satisfy the above- receives an IPv6 First Fragment that does not satisfy the above-
stated requirement MAY discard that packet, and MAY send an ICMPv6 stated requirement MAY discard that packet, and it MAY send an ICMPv6
error message to the source address of the offending packet (subject error message to the source address of the offending packet (subject
to the rules for ICMPv6 error messages specified in [RFC4443]). to the rules for ICMPv6 error messages specified in [RFC4443]).
Intermediate systems having this capability SHOULD support Intermediate systems having this capability SHOULD support
configuration (e.g., enable/disable) of whether such packets are configuration (e.g., enable/disable) of whether or not such packets
dropped or not by the intermediate system. are dropped by the intermediate system.
If a host or intermediate system discards a first-fragment because it If a host or intermediate system discards a First Fragment because it
does not satisfy the above-stated requirement, and sends an ICMPv6 does not satisfy the above-stated requirement and sends an ICMPv6
error message due to the discard, then the ICMPv6 error message MUST error message due to the discard, then the ICMPv6 error message MUST
be Type 4 ("Parameter Problem") and MUST use Code TBD ("First- be Type 4 ("Parameter Problem") and MUST use Code 3 ("First Fragment
fragment has incomplete IPv6 Header Chain"). The Pointer field has incomplete IPv6 Header Chain"). The Pointer field contained by
contained by the ICMPv6 Parameter Problem message MUST be set to the ICMPv6 Parameter Problem message MUST be set to zero. The format
zero. The format for the ICMPv6 error message is the same regardless for the ICMPv6 error message is the same regardless of whether a host
of whether a host or intermediate system originates it. or intermediate system originates it.
As a result of the above mentioned requirement, a packet's header As a result of the above-mentioned requirement, a packet's header
chain length cannot exceed the Path MTU associated with its chain length cannot exceed the Path MTU associated with its
destination. Hosts discover the Path MTU using procedures such as destination. Hosts discover the Path MTU using procedures such as
those defined in [RFC1981] and [RFC4821]. Hosts that do not discover those defined in [RFC1981] and [RFC4821]. Hosts that do not discover
the Path MTU MUST limit the header chain length to 1280 bytes. the Path MTU MUST limit the IPv6 Header Chain length to 1280 bytes.
Limiting the header chain length to 1280 bytes ensures that the Limiting the IPv6 Header Chain length to 1280 bytes ensures that the
header chain length does not exceed the IPv6 minimum MTU [RFC2460]. header chain length does not exceed the IPv6 minimum MTU [RFC2460].
6. IANA Considerations 6. IANA Considerations
IANA is requested to add a the following entry to the "Reason Code" IANA has added the following "Type 4 - Parameter Problem" message to
registry for ICMPv6 "Type 4 - Parameter Problem" messages: the "Internet Control Message Protocol version 6 (ICMPv6) Parameters"
registry:
CODE NAME/DESCRIPTION CODE NAME/DESCRIPTION
TBD IPv6 first-fragment has incomplete IPv6 header chain 3 IPv6 First Fragment has incomplete IPv6 Header Chain
7. Security Considerations 7. Security Considerations
No new security exposures or issues are raised by this document. No new security exposures or issues are raised by this document.
This document describes how undesirably-fragmented packets can be This document describes how undesirably fragmented packets can be
leveraged to evade stateless packet filtering. Having made that leveraged to evade stateless packet filtering. Having made that
observation, this document updates RFC 2460 [RFC2460] so that so observation, this document updates [RFC2460] so that undesirably
undesirably-fragmented packets are forbidden. Therefore, a security fragmented packets are forbidden. Therefore, a security
vulnerability is removed. vulnerability is removed.
This specification allows nodes that drop the aforementioned packets This specification allows nodes that drop the aforementioned packets
to signal such packet drops with ICMPv6 "Parameter Problem, IPv6 to signal such packet drops with ICMPv6 "Parameter Problem, IPv6
first-fragment has incomplete IPv6 header chain" (Type 4, Code TBD) First Fragment has incomplete IPv6 header chain" (Type 4, Code 3)
error messages. error messages.
As with all ICMPv6 error/diagnostic messages, deploying Source As with all ICMPv6 error/diagnostic messages, deploying Source
Address Forgery Prevention filters helps reduce the chances of an Address Forgery Prevention filters helps reduce the chances of an
attacker successfully performing a reflection attack by sending attacker successfully performing a reflection attack by sending
forged illegal packets with the victim/target's IPv6 address as the forged illegal packets with the victim's/target's IPv6 address as the
IPv6 Source Address of the illegal packet [RFC2827] [RFC3704]. IPv6 source address of the illegal packet [RFC2827] [RFC3704].
A firewall that performs stateless deep packet inspection (i.e., A firewall that performs stateless deep packet inspection (i.e.,
examines application payload content) might still be unable to examines application payload content) might still be unable to
correctly process fragmented packets, even if the IPv6 header chain correctly process fragmented packets, even if the IPv6 Header Chain
is not fragmented. is not fragmented.
8. Acknowledgements 8. Acknowledgements
The authors of this document would like to thank Ran Atkinson for The authors would like to thank Ran Atkinson for contributing text
contributing text and ideas that were incorporated into this and ideas that were incorporated into this document.
document.
The authors would like to thank (in alphabetical order) Ran Atkinson, The authors would like to thank (in alphabetical order) Ran Atkinson,
Fred Baker, Stewart Bryant, Brian Carpenter, Benoit Claise, Dominik Fred Baker, Stewart Bryant, Brian Carpenter, Benoit Claise, Dominik
Elsbroek, Wes George, Mike Heard, Bill Jouris, Suresh Krishnan, Dave Elsbroek, Wes George, Mike Heard, Bill Jouris, Suresh Krishnan, Dave
Thaler, Ole Troan, Eric Vyncke, and Peter Yee, for providing valuable Thaler, Ole Troan, Eric Vyncke, and Peter Yee, for providing valuable
comments on earlier versions of this document. comments on earlier versions of this document.
9. References 9. References
9.1. Normative References 9.1. Normative References
skipping to change at page 6, line 50 skipping to change at page 7, line 25
[RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6
(IPv6) Specification", RFC 2460, December 1998. (IPv6) Specification", RFC 2460, December 1998.
[RFC4443] Conta, A., Deering, S., and M. Gupta, "Internet Control [RFC4443] Conta, A., Deering, S., and M. Gupta, "Internet Control
Message Protocol (ICMPv6) for the Internet Protocol Message Protocol (ICMPv6) for the Internet Protocol
Version 6 (IPv6) Specification", RFC 4443, March 2006. Version 6 (IPv6) Specification", RFC 4443, March 2006.
[RFC4821] Mathis, M. and J. Heffner, "Packetization Layer Path MTU [RFC4821] Mathis, M. and J. Heffner, "Packetization Layer Path MTU
Discovery", RFC 4821, March 2007. Discovery", RFC 4821, March 2007.
[I-D.ietf-6man-ext-transmit] [RFC7045] Carpenter, B. and S. Jiang, "Transmission and Processing
Carpenter, B. and S. Jiang, "Transmission and Processing of IPv6 Extension Headers", RFC 7045, December 2013.
of IPv6 Extension Headers", draft-ietf-6man-ext-
transmit-05 (work in progress), October 2013.
9.2. Informative References 9.2. Informative References
[RFC2827] Ferguson, P. and D. Senie, "Network Ingress Filtering: [RFC2827] Ferguson, P. and D. Senie, "Network Ingress Filtering:
Defeating Denial of Service Attacks which employ IP Source Defeating Denial of Service Attacks which employ IP Source
Address Spoofing", BCP 38, RFC 2827, May 2000. Address Spoofing", BCP 38, RFC 2827, May 2000.
[RFC3704] Baker, F. and P. Savola, "Ingress Filtering for Multihomed [RFC3704] Baker, F. and P. Savola, "Ingress Filtering for Multihomed
Networks", BCP 84, RFC 3704, March 2004. Networks", BCP 84, RFC 3704, March 2004.
[IANA-PROTO] [IANA-PROTO]
Internet Assigned Numbers Authority, "Protocol Numbers", Internet Assigned Numbers Authority, "Protocol Numbers",
February 2013, <http://www.iana.org/assignments/protocol- <http://www.iana.org/assignments/protocol-numbers>.
numbers/protocol-numbers.txt>.
Authors' Addresses Authors' Addresses
Fernando Gont Fernando Gont
SI6 Networks / UTN-FRH Huawei Technologies
Evaristo Carriego 2644 Evaristo Carriego 2644
Haedo, Provincia de Buenos Aires 1706 Haedo, Provincia de Buenos Aires 1706
Argentina Argentina
Phone: +54 11 4650 8472 Phone: +54 11 4650 8472
Email: fgont@si6networks.com EMail: fgont@si6networks.com
URI: http://www.si6networks.com
Vishwas Manral Vishwas Manral
Hewlett-Packard Corp. Ionos Networks
191111 Pruneridge Ave. Sunnyvale, CA 94089
Cupertino, CA 95014
US US
Phone: 408-447-1497 Phone: 408-447-1497
Email: vishwas.manral@hp.com EMail: vishwas@ionosnetworks.com
Ronald P. Bonica Ronald P. Bonica
Juniper Networks Juniper Networks
2251 Corporate Park Drive 2251 Corporate Park Drive
Herndon, VA 20171 Herndon, VA 20171
US US
Phone: 571 250 5819 Phone: 571 250 5819
Email: rbonica@juniper.net EMail: rbonica@juniper.net
 End of changes. 52 change blocks. 
136 lines changed or deleted 129 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/