Internet-Draft | HBH Options Processing | April 2023 |
Hinden & Fairhurst | Expires 1 November 2023 | [Page] |
This document specifies procedures for how IPv6 Hop-by-Hop options are processed at routers and hosts. It modifies the procedures specified in the IPv6 Protocol Specification (RFC8200) to make processing of IPv6 Hop-by-Hop options practical with the goal of making IPv6 Hop-by-Hop options useful to deploy and use in the Internet. When published, this document updates RFC8200 and RFC7045.¶
This Internet-Draft is submitted in full conformance with the 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 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 1 November 2023.¶
Copyright (c) 2023 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 carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
This document specifies procedures for how IPv6 Hop-by-Hop options are processed at routers and IPv6 hosts. It modifies the procedures specified in the IPv6 Protocol Specification [RFC8200] to make processing of IPv6 Hop-by-Hop options practical with the goal of making IPv6 Hop-by-Hop options useful to deploy and use in the Internet.¶
The focus for this document is to set a lower bound for the minimum number of hop-by-hop options that ought to be processed. This document does not discuss an upper bound. That topic is discussed in [I-D.ietf-6man-eh-limits].¶
When published, this document updates [RFC8200] .¶
The current list of defined Hop-by-Hop options can be found at [IANA-HBH].¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
This document uses the following loosely defined terms:¶
NOTE: [RFC6192] is an example of how designs can separate control plane (Slow Path) and forwarding plane (Fast Path) functions. The separation between hardware and software processing described in [RFC6398] does not apply to all router architectures. However, a router that performs all or most processing in software might still incur more processing cost when providing special processing (aka Slow Path).¶
In the first versions of the IPv6 specification [RFC1883] and [RFC2460], Hop-by-Hop options In the first versions of the IPv6 specification [RFC1883] and [RFC2460], Hop-by-Hop options were required to be processed by all nodes: routers and hosts. This proved to not be practical in current high speed routers, as observed in Section 2.2 of RFC7045: "it is to be expected that high-performance routers will either ignore it or assign packets containing it to a slow processing path". The reason behind this includes:¶
[RFC6564] specified a uniform format for new IPv6 Extension Headers. It updated [RFC2460] and this update was incorporated into Section 4.8 of [RFC8200].¶
When the IPv6 Specification was updated and published in July 2017 as [RFC8200], the procedures relating to hop-by-hop options were as follows:¶
The changes meant that an implementation complied with the IPv6 specification even if it did not process hop-by-hop options, and that it was expected that routers would add configuration information to control which hop-by-hop options they would process.¶
The text regarding processing Hop-by Hop Options in [RFC8200] was not intended to change the processing of Hop-by-Hop options. It only documented how they were being used in the Internet at the time RFC8200 was published. This was a constraint on publishing the IPv6 specification as an IETF Standard.¶
The main issues remain:¶
There has been research that discussed the general problem with dropping packets containing IPv6 extension headers, including the Hop-by-Hop Options header. For example [Hendriks] states that "dropping all packets with Extension Headers, is a bad practice", and that "The share of traffic containing more than one EH however, is very small. For the design of hardware able to handle the dynamic nature of Extension Headers we therefore recommend to support at least one EH".¶
The topic discussed in this section is further discussed in [I-D.ietf-v6ops-hbh].¶
"Transmission and Processing of IPv6 Extension Headers" [RFC7045] clarified how intermediate nodes should process extension headers. This document is generally consistent with [RFC7045], and was considered when [RFC2460] was updated and was itself replaced by [RFC8200]. This document updates [RFC8200] as described in the next section and consequently clarifies the description in Section 2.2 of [RFC7045], using the language of BCP 14 [RFC2119] [RFC8174].¶
This document defines a set of procedures for the Hop-by-Hop Option header that are intended to make the processing of hop-by-hop options practical in modern transit routers. The authors expectations are that some hop-by-hop options will be processed across the Internet while others will only be processed in a limited domain (e.g., where there is a specific service made available in that network segment that relies on one or more hop-by-hop options).¶
This section describes several changes to [RFC8200].¶
The Hop-by-Hop Option Header as defined in Section 4.3 of [RFC8200] is identified by a Next Header value of 0 in the IPv6 header. Section 4.1 of [RFC8200] requires a Hop-by-Hop Options header to appear immediately after the IPv6 header. [RFC8200] also requires that a Hop-by-Hop Options header can only appear once in a packet.¶
The Hop-by-Hop Options Header as defined in [RFC8200] can contain one or more Hop-by-Hop options. This document updates [RFC8200] to specify that a router MUST process the first Option in the Hop-by-Hop Header at full forwarding rate (e.g. on the router's Fast Path) and MAY process additional Hop-by-Hop Options if configured to do so. The motivation for this change is to simplify the processing of Hop-by-Hop options as a part of normal forwarding.¶
Nodes creating packets with a Hop-by-Hop option header SHOULD by default only include a single Hop-by-Hop Option in the packet and based on local configuration MAY include more Hop-by-Hop Options.¶
Hop-by-Hop Option headers can be designed to expect processing by the Destination host. Hosts SHOULD process the Hop-by-Hop Option header in received packets. Further details on requirements for host processing are described in [I-D.ietf-6man-eh-limits]. If a Destination host does not process the Hop-by-Hop Option header, it MUST process the remainder of the packet normally.¶
Routers SHOULD process the Hop-by-Hop Option header. If the router does not process the Hop-by-Hop Option header, it MUST forward the packet normally.¶
Routers MUST process all Hop-by-Hop options at full forwarding rates. The one exception to this is the Router Alert Option [RFC2711]. See Section 5.3 for discussion of the Router Alert Option.¶
If the router is unable to process an option at the full forwarding rate, it MUST behave in the way specified for an unrecognized Option Type when the action bits were set to "00". That is, it must skip over this option and continue processing the header (as described in the next paragraph).¶
If there are more than one Hop-by-Hop options in the Hop-by-Hop Options header, the router MAY skip the rest of the options without having to examine these options using the "Hdr Ext Len" field in the Hop-by-Hop Options header. This field specifies the length of the Option Header in 8-octet units. The additional options do not need to be processed or verified.¶
Section 4.2 of [RFC8200] defines the Option Type identifiers as internally encoded such that their highest-order 2 bits specify the action that must be taken if the processing IPv6 node does not recognize the Option Type. The text is:¶
00 - skip over this option and continue processing the header. 01 - discard the packet. 10 - discard the packet and, regardless of whether or not the packet's Destination Address was a multicast address, send an ICMPv6 Parameter Problem, Code 2, message to the packet's Source Address, pointing to the unrecognized Option Type. 11 - discard the packet and, only if the packet's Destination Address was not a multicast address, send an ICMPv6 Parameter Problem, Code 2, message to the packet's Source Address, pointing to the unrecognized Option Type.¶
This document modifies this behaviour for the "10" and "11" values that the node MAY send an ICMP Parameter Problem, Code 2, message to the packet's Source Address, pointing to the unrecognized Option Type. The modified text for "10" and 11" values is:¶
10 - discard the packet and, regardless of whether or not the packet's Destination Address was a multicast address, MAY send an ICMP Parameter Problem, Code 2, message to the packet's Source Address, pointing to the unrecognized Option Type. 11 - discard the packet and, only if the packet's Destination Address was not a multicast address, MAY send an ICMP Parameter Problem, Code 2, message to the packet's Source Address, pointing to the unrecognized Option Type.¶
The motivation for this change is to loosen the requirement to send ICMPv6 Parameter Problem messages by simplifying what the router needs to do when it performs forwarding of an Option Type it does not recognize.¶
When an ICMP Parameter Problem, Code 2, message is delivered to the source, the source can become aware that at least one node on the path has failed to recognize the option.¶
The Router Alert option [RFC2711] purpose is to tell the node that the packet needs additional processing on the Slow Path.¶
The Router Alert option includes a two-octet Value field that describes the protocol that is carried in the packet. The current values can be found in the IANA Router Alert Value registry [IANA-RA].¶
DISCUSSION¶
As specified in [RFC2711] the top two bits of Option Type for the Router Alert option are always set to "00" indicating the node should skip over this option and continue processing the header in this case. A Fast Path implementation SHOULD verify that a Router Alert contains a protocol, as indicated by the Value field in the Router Alert option, that is configured as a protocol of interest to that router. A verified packet SHOULD be sent on the Slow Path for processing [RFC6398]. Otherwise, the router implementation SHOULD forward within the Fast Path (subject to all normal policies and forwarding rules).¶
Implementations of the IP Router Alert Option SHOULD offer the configuration option to simply ignore the presence of "IP Router Alert" in IPv4 and IPv6 packets" [RFC6398].¶
A node that is configured to process a Router Alert option using the Slow Path MUST protect itself from infrastructure attack that could result from processing on the Slow Path. This might include some combination of access control list to only permit from trusted nodes, rate limiting of processing, or other methods [RFC6398].¶
Section 4 of [RFC8200] allows a router to control its processing of IPv6 Hop-by-Hop options by local configuration. The text is:¶
A possible approach to implementing this is to maintain a lookup table based on Option Type of the IPv6 options that are supported in the Fast Path. This would allow for a router to quickly determine if an option is supported and can be processed. If the option is not supported, then the router processes it as described in Section 5.2 of this document.¶
This requires the router to examine the first two bits of the option even if it does not support the specific option. A router MUST drop the packet if the top two bits of the Option Type field of the first HBH option is non-zero as specified in Section 5.2.¶
The actions of the lookup table SHOULD be configurable by the operator of the router.¶
This section updates Section 4.8 of [RFC8200].¶
Any new IPv6 Hop-by-Hop option designed in the future should be designed to be processed at full forwarding rate (e.g., on a router's Fast Path, or at least without slowing processing of other packets). New options SHOULD NOT be defined that are not expected to be executed at full forwarding rate. New Hop-by-Hop options should have the following characteristics:¶
Any new Hop-by-Hop option that is standardized that does not meet these criteria needs to explain in detail in its specification why this can not be accomplished and that there is a reasonable expectation that it can be proceed at full forwarding rate. This is consistent with [RFC6564].¶
There are no actions required for IANA defined in this document.¶
Security issues with IPv6 Hop-by-Hop options are well known and have been documented in several places, including [RFC6398], [RFC6192], [RFC7045] and [RFC9098]. The main issue, as noted in Section 4, is that any mechanism that can be used to force packets into the router's Slow Path can be exploited as a denial of service attack on a transit router by saturating the resources needed for router management protocols (e.g., routing protocols, network management protocols, etc.) that may cause the router to fail or perform sub-optimally. Due to this it’s common for transit routers to drop packets with a Hop-by-Hop options header.¶
While Hop-by-Hop options are not required to be processed in the Slow Path, the Router Alert option is designed to do just that.¶
Some IPv6 nodes implement features that access more of the protocol information than a typical IPv6 router (e.g. [RFC9098]). Examples are nodes that provide virus-scanning, DDOS mitigation, Firewall/access control, traffic engineering, or traffic normalization. These nodes could be configured to drop packets when they are unable to access and process all extension headers, or are unable to locate and process the higher-layer packet information. This document provides guidance on the requirements concerning Hop-by-Hop Options.¶
Finally, the document notes that Internet protocol processing needs to be robust to malformed/malicious protocol fields. This requirement is not specific to Hop-by-Hop Options. It is important that implementations fail gracefully when a malformed or malicious Hop-by-Hop Option is encountered.¶
This document changes the way Hop-by-Hop options are processed in several ways that significantly reduce the attack surface. These changes include:¶
The authors intent is that these changes significantly reduce the security issues relating to IPv6 Hop-by-Hop options and will enable them to be used safely in the Internet.¶
Helpful comments were received from Brian Carpenter, Ron Bonica, Ole Troan, Mark Heard, Tom Herbert, Cheng Li, Eric Vyncke, Greg Mirksy, Xiao Min, Fernando Gont, Darren Dukes, Peng Shuping, Dave Thaler, Ana Custura, Tim Winters, Fernando Gont, Jingrong Xie, and other members of the 6MAN working group.¶
draft-ietf-6man-hbh-processing-08, 2023-April-30:¶
draft-ietf-6man-hbh-processing-07, 2023-April-6:¶
draft-ietf-6man-hbh-processing-06, 2023-March-11:¶
draft-ietf-6man-hbh-processing-05, 2023-February-23:¶
draft-ietf-6man-hbh-processing-04, 2022-October-21:¶
draft-ietf-6man-hbh-processing-03, 2022-October-12:¶
draft-ietf-6man-hbh-processing-02, 2022-August-23:¶
draft-ietf-6man-hbh-processing-01, 2022-June-15:¶
draft-ietf-6man-hbh-processing-00, 2022-January-29:¶
draft-hinden-6man-hbh-processing-01, 2021-June-2:¶
draft-hinden-6man-hbh-processing-00, 2020-Nov-29:¶