draft-ietf-6man-oversized-header-chain-02.txt   draft-ietf-6man-oversized-header-chain-03.txt 
IPv6 maintenance Working Group (6man) F. Gont IPv6 maintenance Working Group (6man) F. Gont
Internet-Draft SI6 Networks / UTN-FRH Internet-Draft SI6 Networks / UTN-FRH
Updates: 2460 (if approved) V. Manral Updates: 2460 (if approved) V. Manral
Intended status: Standards Track Hewlett-Packard Corp. Intended status: Standards Track Hewlett-Packard Corp.
Expires: May 9, 2013 November 5, 2012 Expires: January 16, 2014 R. Bonica
Juniper Networks
July 15, 2013
Security and Interoperability Implications of Oversized IPv6 Header Implications of Oversized IPv6 Header Chains
Chains draft-ietf-6man-oversized-header-chain-03
draft-ietf-6man-oversized-header-chain-02
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 which can in turn extend
each of the headers. In those scenarios in which the IPv6 header each of the headers. In those scenarios in which the IPv6 header
chain or options are unusually long and packets are fragmented, or chain or options are unusually long and packets are fragmented, or
scenarios in which the fragment size is very small, the first scenarios in which the fragment size is very small, the first
fragment of a packet may fail to include the entire IPv6 header fragment of a packet may fail to include the entire IPv6 header
chain. This document discusses the interoperability and security chain. This document discusses the interoperability and security
skipping to change at page 1, line 41 skipping to change at page 1, line 42
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on May 9, 2013. This Internet-Draft will expire on January 16, 2014.
Copyright Notice Copyright Notice
Copyright (c) 2012 IETF Trust and the persons identified as the Copyright (c) 2013 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 . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Requirements Language . . . . . . . . . . . . . . . . . . . . 4
3. Interoperability Implications of Oversized IPv6 Header 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5
Chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 4. Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4. Forwarding Implications of Oversized IPv6 Header Chains . . . 6 5. Updates to RFC 2460 . . . . . . . . . . . . . . . . . . . . . 7
5. Security Implications of Oversized IPv6 Header Chains . . . . 7 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8
6. Updating RFC 2460 . . . . . . . . . . . . . . . . . . . . . . 8 7. Security Considerations . . . . . . . . . . . . . . . . . . . 9
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 10
8. Security Considerations . . . . . . . . . . . . . . . . . . . 10 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 11
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 11 9.1. Normative References . . . . . . . . . . . . . . . . . . . 11
10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 12 9.2. Informative References . . . . . . . . . . . . . . . . . . 11
10.1. Normative References . . . . . . . . . . . . . . . . . . 12 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 12
10.2. Informative References . . . . . . . . . . . . . . . . . 12
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 13
1. Introduction 1. Introduction
With IPv6, IPv6 options are carried inside one or more IPv6 Extension With IPv6, optional internet-layer information is carried in one or
Headers [RFC2460]. A sequence of more than one IPv6 Extension more IPv6 Extension Headers [RFC2460]. Extension headers are placed
Headers in a row is commonly called an "IPv6 Header Chain". In those between the IPv6 header and the upper-layer header in a packet. The
term "header chain" refers collectively to the IPv6 header, extension
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 first fragment of a packet may fail to include the very small, the header chain may span multiple fragments.
entire IPv6 header chain.
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
e.g. IPv6 jumbo payloads but instead merely requires that all e.g. IPv6 jumbo payloads but instead merely requires that all
*headers*, starting from IPv6 base header and continuing up to the *headers*, starting from IPv6 base header and continuing up to the
upper layer header (e.g. TCP or the like) be present in the first upper layer header (e.g. TCP or the like) be present in the first
fragment. fragment.
2. Terminology 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 RFC 2119 [RFC2119].
IPv6 Extension Headers: 3. Terminology
Any Extension Headers as described in Section 4 of [RFC2460], and
specified in [RFC2460] or any subsequent documents.
Entire IPv6 header chain:
All protocol headers starting from the fixed IPv6 header up to
(and including) the upper layer protocol header (TCP, UDP, etc. --
assuming there is one of those), including any intermediate IPv6
extension headers.
Note: If there is an upper layer header, only the header (and
not its payload) are considered part of the "entire IPv6 header
chain". For example, if the upper layer protocol is TCP, only
the TCP header (and not its possible data bytes) should be
considered part of the "entire IPv6 header chain".
3. Interoperability Implications of Oversized IPv6 Header Chains
Some transition technologies, such as NAT64 [RFC6146], might need to
have access to the entire IPv6 header chain in order to associate an
incoming IPv6 packet with an ongoing "session".
For instance, Section 3.4 of [RFC6146] states that "The NAT64 MAY
require that the UDP, TCP, or ICMP header be completely contained
within the fragment that contains fragment offset equal to zero".
Failure to include the entire IPv6 header chain in the first-fragment Extension Header:
might cause the translation function to fail, with the corresponding
packets being dropped.
4. Forwarding Implications of Oversized IPv6 Header Chains Extension Headers are defined in Section 4 of [RFC2460].
Currently, six extension header types are defined. [RFC2460]
defines the hop-by-hop, routing, fragment and destination options
extension header types. [RFC4302] defines the authentication
header type and [RFC4303] defines the encapsulating security
payload (ESP) header type.
A lot of the switches and Routers in the internet do hardware based First Fragment:
forwarding. To be able to achieve a level of throughput, there is a
fixed maximum number of clock cycles dedicated to each packet.
However with the use of unlimited options and header interleaving,
larger packets with a lot of interleaving might have to be forwarded
to the software. This is one reason why the maximum size of valid
packets with interleaved headers needs to be limited.
5. Security Implications of Oversized IPv6 Header Chains An IPv6 fragment with fragment offset equal to 0.
Most firewalls enforce their filtering policy based on the following IPv6 Header Chain:
parameters:
o Source IP address The initial portion of an IPv6 datagram containing headers,
starting from the fixed IPv6 header up to (and including) the
upper layer protocol header (TCP, UDP, etc. -- assuming there is
one of those), including any intermediate IPv6 extension headers.
For a header to qualify as a member of the header chain, it must
be referenced by the "Next Header" field of the previous member of
the header chain.
o Destination IP address Upper-layer Header:
o Protocol type (e.g. ICMPv6, TCP, UDP, SCTP) The first member of the header chain that is neither an IPv6
header nor an IPv6 extension header. For the purposes of this
document, ICMPv6 is considered to be an upper-layer protocol, even
though ICMPv6 operates at the same layer as IPv6. Also for the
purposes of this document, the first 32 bits of the ICMPv6 message
(i.e., the type, code fields and checksum fields) are considered
to be the ICMPv6 header.
o Transport-layer Source Port number NOTES:
The upper-layer payload is not part of the upper-layer header
and therefore, is not part of the IPv6 header chain. For
example, if the upper-layer protocol is TCP, the TCP payload is
not part of the TCP header or the IPv6 header chain.
o Transport-layer Destination Port number When a packet contains an ESP header [RFC4303], such header is
considered to be the last header in the IPv6 header chain. For
the sake of clarity, we note that only the Security Parameters
Index (SPI) and the Sequence Number fields (i.e., the first 64
bits of the ESP packet) are part of the ESP header (i.e., the
Payload Data and trailer are NOT part of the ESP header).
Some firewalls reassemble fragmented packets before applying a 4. Motivation
filtering policy, and thus always have the aforementioned information
available when deciding whether to allow or block a packet. However,
other stateless firewalls (generally prevalent on small/ home office
equipment) do not reassemble fragmented traffic, and hence have to
enforce their filtering policy based on the information contained in
the received fragment, as opposed to the information contained in the
reassembled datagram.
When presented with fragmented traffic, many of such firewalls Many forwarding devices implement stateless firewalls. A stateless
typically enforce their policy only on the first fragment of a firewall enforces a forwarding policy on packet-by-packet basis. In
packet, based on the assumption that if the first fragment is order to enforce its forwarding policy, the stateless firewall may
dropped, reassembly of the corresponding datagram will fail, and thus need to glean information from both the IPv6 and upper-layer headers.
such datagram will be effectively blocked. However, if the first
fragment fails to include the entire IPv6 header chain, they might
have no alternative other than "blindly" allowing or blocking the
corresponding fragment. If they blindly allow the packet, then the
firewall can be easily circumvented by intentionally sending
fragmented packets that fail to include the entire IPv6 header chain
in the first fragment. On the other hand, first-fragments that fail
to include the entire IPv6 header chain have never been formally
deprecated and thus, in theory, might be legitimately generated.
6. Updating RFC 2460 For example, assume that a stateless firewall discards all traffic
received from an interface unless it destined for a particular TCP
port on a particular IPv6 address. When this firewall is presented
with a fragmented packet, and the entire header chain is contained
within the first fragment, the firewall discards the first fragment
and allows subsequent fragments to pass. Because the first fragment
was discarded, the packet cannot be reassembled at the destination.
Insomuch as the packet cannot be reassembled, the forwarding policy
is enforced.
If an IPv6 packet is fragmented, the first fragment of that IPv6 However, when the firewall is presented with a fragmented packet and
packet (i.e., the fragment having a Fragment Offset of 0) MUST the header chain spans multiple fragments, the first fragment does
contain the entire IPv6 header chain. not contain enough information for the firewall to enforce its
forwarding policy. Lacking sufficient information, the stateless
firewall either forwards or discards that fragment. Regardless of
the action that it takes, it may fail to enforce its forwarding
policy.
A host that receives an IPv6 first-fragment that does not contain the 5. Updates to RFC 2460
entire IPv6 header chain SHOULD drop that packet, and also MAY send
an ICMPv6 error message to the (claimed) source address (subject to
the sending rules for ICMPv6 errors specified in [RFC4443]).
An intermediate system (e.g. router, firewall) that receives an IPv6 When a host fragments a IPv6 datagram, it MUST include the entire
first-fragment that does not contain the entire IPv6 header chain MAY header chain in the first fragment.
drop that packet, and MAY send an ICMPv6 error message to the
(claimed) source address (subject to the sending rules for ICMPv6
error messages specified in [RFC4443]). Intermediate systems having
this capability SHOULD support configuration (e.g. enable/disable) of
whether such packets are dropped or not by the intermediate system.
If a host or intermediate system drops an IPv6 first-fragment because A host that receives a first-fragment that does not satisfy the
it does not contain the entire IPv6 Header Chain, and sends an ICMPv6 above-stated requirements SHOULD discard that packet, and also MAY
error message due to that packet drop, then the ICMPv6 error message send an ICMPv6 error message to the source address of the offending
MUST be Type 4 ("Parameter Problem") and MUST use Code 3 ("First- packet (subject to the rules for ICMPv6 errors specified in
fragment has incomplete IPv6 Header Chain"). [RFC4443]).
Implementations SHOULD support configuration of whether an ICMPv6 Likewise, an intermediate system (e.g. router, firewall) that
error/diagnostic message is sent when such packet drops occur. receives an IPv6 first-fragment that does not satisfy the above-
Implementations might consider providing not only an enable/disable stated requirements MAY discard that packet, and MAY send an ICMPv6
configuration, but also other settings (e.g. rate-limit the sending error message to the source address of the offending packet (subject
of this kind of ICMPv6 error message). to the rules for ICMPv6 error messages specified in [RFC4443]).
Intermediate systems having this capability SHOULD support
configuration (e.g. enable/disable) of whether such packets are
dropped or not by the intermediate system.
Sending this ICMPv6 error message when such packets are dropped can If a host or intermediate system discards an first-fragment because
be very helpful in diagnosing operational IPv6 network problems, for it does not satisfy the above-stated requirements, and sends an
example if recursive tunnels or certain link technologies have ICMPv6 error message due to the discard, then the ICMPv6 error
reduced the end-to-end MTU from larger more common values. However, message MUST be Type 4 ("Parameter Problem") and MUST use Code TBD
such ICMPv6 messages also might be operationally problematic, for ("First-fragment has incomplete IPv6 Header Chain").
example if an adversary forges the source address on IPv6 first-
fragment packets that do NOT contain the entire IPv6 Header Chain.
So configurability about sending these ICMPv6 error messages is very
important to network operators for this situation.
7. IANA Considerations 6. IANA Considerations
IANA is requested that the "Reason Code" registry for ICMPv6 "Type 4 IANA is requested to add a the following entry to the "Reason Code"
- Parameter Problem" messages be updated as follows: registry for ICMPv6 "Type 4 - Parameter Problem" messages:
CODE NAME/DESCRIPTION CODE NAME/DESCRIPTION
3 IPv6 first-fragment has incomplete IPv6 header chain TBD IPv6 first-fragment has incomplete IPv6 header chain
8. Security Considerations 7. Security Considerations
This document describes the interoperability and security This document describes how improperly-fragmented packets can prevent
implications of IPv6 packets or first-fragments that fail to include traditional stateless packet filtering.
the entire IPv6 header chain. The security implications include the
possibility of an attacker evading network security controls such as
firewalls and Network Intrusion Detection Systems (NIDS) [CPNI-IPv6].
This document updates RFC 2460 such that those packets are forbidden, This document updates RFC 2460 such that those packets are forbidden,
thus preventing the aforementioned issues. thus enabling stateless packet filtering for IPv6.
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 3) first-fragment has incomplete IPv6 header chain" (Type 4, Code TBD)
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/target's IPv6 address as the
IPv6 Source Address of the illegal packet [RFC2827] [RFC3704]. IPv6 Source Address of the illegal packet [RFC2827] [RFC3704].
9. Acknowledgements 8. Acknowledgements
The authors of this document would like to thank Ran Atkinson for The authors of this document would like to thank Ran Atkinson for
contributing text and ideas that were incorporated into this contributing text 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, Dominik Elsbroek, Bill Jouris, Suresh Krishnan, Dave Fred Baker, Brian Carpenter, Dominik Elsbroek, Bill Jouris, Suresh
Thaler, and Eric Vyncke, for providing valuable comments on earlier Krishnan, Dave Thaler, and Eric Vyncke, for providing valuable
versions of this document. comments on earlier versions of this document.
10. References 9. References
10.1. Normative References 9.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[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.
[RFC4302] Kent, S., "IP Authentication Header", RFC 4302,
December 2005.
[RFC4303] Kent, S., "IP Encapsulating Security Payload (ESP)",
RFC 4303, December 2005.
[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.
10.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.
[RFC6146] Bagnulo, M., Matthews, P., and I. van Beijnum, "Stateful
NAT64: Network Address and Protocol Translation from IPv6
Clients to IPv4 Servers", RFC 6146, April 2011.
[CPNI-IPv6]
Gont, F., "Security Assessment of the Internet Protocol
version 6 (IPv6)", UK Centre for the Protection of
National Infrastructure, (available on request).
Authors' Addresses Authors' Addresses
Fernando Gont Fernando Gont
SI6 Networks / UTN-FRH SI6 Networks / UTN-FRH
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
skipping to change at line 318 skipping to change at page 12, line 26
Vishwas Manral Vishwas Manral
Hewlett-Packard Corp. Hewlett-Packard Corp.
191111 Pruneridge Ave. 191111 Pruneridge Ave.
Cupertino, CA 95014 Cupertino, CA 95014
US US
Phone: 408-447-1497 Phone: 408-447-1497
Email: vishwas.manral@hp.com Email: vishwas.manral@hp.com
URI: URI:
Ronald P. Bonica
Juniper Networks
2251 Corporate Park Drive
Herndon, VA 20171
US
Phone: 571 250 5819
Email: rbonica@juniper.net
 End of changes. 43 change blocks. 
152 lines changed or deleted 126 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/