RFC 9098: Operational Implications of IPv6 Packets with Extension Headers
- F. Gont,
- N. Hilliard,
- G. Doering,
- W. Kumari,
- G. Huston,
- W. Liu
Abstract
This document summarizes the operational implications of IPv6 extension headers specified in the IPv6 protocol specification (RFC 8200) and attempts to analyze reasons why packets with IPv6 extension headers are often dropped in the public Internet.¶
Status of This Memo
This document is not an Internet Standards Track specification; it is published for informational purposes.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Not all documents approved by the IESG are candidates for any level of Internet Standard; see Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2021 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://
1. Introduction
IPv6 extension headers (EHs) allow for the extension of the IPv6 protocol and provide support for core functionality such as IPv6 fragmentation. However, common implementation limitations suggest that EHs present a challenge for IPv6 packet routing equipment and middleboxes, and evidence exists that IPv6 packets with EHs are intentionally dropped in the public Internet in some circumstances.¶
This document has the following goals:¶
Section 4 of this document provides background information about the IPv6 packet structure and associated implications. Section 5 summarizes previous work that has been carried out in the area of IPv6 extension headers. Section 6 discusses packet
2. Terminology
This document uses the term "intermediate system" to describe both routers and middleboxes when there is no need to distinguish between the two and where the important issue is that the device being discussed forwards packets.¶
3. Disclaimer
This document analyzes the operational challenges represented by packets that employ IPv6 extension headers and documents some of the operational reasons why these packets are often dropped in the public Internet. This document is not a recommendation to drop such packets, but rather an analysis of why they are currently dropped.¶
4. Background Information
It is useful to compare the basic structure of IPv6 packets against that of IPv4 packets and analyze the implications of the two different packet structures.¶
IPv4 packets have a variable-length header size that allows for the use of IPv4 "options" -- optional information that may be of use to nodes processing IPv4 packets. The IPv4 header length is specified in the "Internet Header Length" (IHL) field of the mandatory IPv4 header and must be in the range of 20 octets (the minimum IPv4 header size) to 60 octets, accommodating at most 40 octets of options. The upper-layer protocol type is specified via the "Protocol" field of the mandatory IPv4 header.¶
IPv6 took a different approach to the IPv6 packet structure. Rather than employing a variable-length header as IPv4 does, IPv6 employs a packet structure similar to a linked list, where a mandatory fixed-length IPv6 header is followed by an arbitrary number of optional extension headers, with the upper-layer header being the last header in the IPv6 header chain. Each extension header typically specifies its length (unless it is implicit from the extension header type) and the "next header" (NH) type that follows in the IPv6 header chain.¶
This packet structure has the following implications:¶
5. Previous Work on IPv6 Extension Headers
Some of the operational and security implications of IPv6 extension headers have been discussed in the IETF:¶
A number of recent RFCs have discussed issues related to IPv6 extension headers and have specified updates to RFC 2460 [RFC2460] (an earlier version of the IPv6 standard). Many of these updates have now been incorporated into the current IPv6 core standard [RFC8200] or the IPv6 node requirements [RFC8504]. Namely,¶
Additionally, [RFC8200] has relaxed the requirement that "all nodes must examine and process the Hop-by-Hop Options header" from [RFC2460], by specifying that only nodes that have been explicitly configured to process the Hop-by-Hop Options header are required to do so.¶
A number of studies have measured the extent to which packets employing IPv6 extension headers are dropped in the public Internet:¶
6. Packet-Forwarding Engine Constraints
Most contemporary carrier-grade routers use dedicated hardware, e.g., Application
If a hardware
Historically, some packet
If an IPv6 header chain is sufficiently long such that it exceeds the packet lookup capacity of the router, the router might be unable to determine how the packet should be handled and thus could resort to dropping the packet.¶
6.1. Recirculation
Although type
Recirculation is typically used on packet
7. Requirement to Process Layer 3 / Layer 4 Information in Intermediate Systems
The following subsections discuss some of the reasons for which intermediate systems may need to process Layer 3 / Layer 4 information to make a forwarding decision.¶
7.1. ECMP and Hash-Based Load Sharing
In the case of Equal Cost Multipath (ECMP) load sharing, the intermediate system needs to make a decision regarding which of its interfaces to use to forward a given packet. Since round-robin usage of the links is usually avoided to prevent packet reordering, forwarding engines need to use a mechanism that will consistently forward the same data streams down the same forwarding paths. Most forwarding engines achieve this by calculating a simple hash using an n-tuple gleaned from a combination of Layer 2 through to Layer 4 protocol header information. This n-tuple will typically use the src/dst Media Access Control (MAC) addresses, src/dst IP addresses, and, if possible, further Layer 4 src/dst port information.¶
In the IPv6 world, flows are expected to be identified by means of the IPv6 "Flow Label" [RFC6437]. Thus, ECMP and hash-based load sharing should be possible without the need to process the entire IPv6 header chain to obtain upper-layer information to identify flows. [RFC7098] discusses how the IPv6 Flow Label can be used to enhance Layer 3/4 load distribution and balancing for large server farms.¶
Historically, many IPv6 implementations failed to set the Flow Label, and hash-based ECMP
Clearly, widespread support of [RFC6437] would relieve intermediate systems from having to process the entire IPv6 header chain, making Flow Label-based ECMP and load sharing [RFC6438] feasible.¶
If an intermediate system cannot determine consistent n-tuples for calculating flow hashes, data streams are more likely to end up being distributed unequally across ECMP and load-shared links. This may lead to packet drops or reduced performance.¶
7.2. Enforcing Infrastructure ACLs
Infrastructure Access Control Lists (iACLs) drop unwanted packets destined to a network's infrastructure. Typically, iACLs are deployed because external direct access to a network's infrastructure addresses is operationally unnecessary and can be used for attacks of different sorts against router control planes. To this end, traffic usually needs to be differentiated on the basis of Layer 3 or Layer 4 criteria to achieve a useful balance of protection and functionality. For example, an infrastructure may be configured with the following policy:¶
If a forwarding router cannot determine consistent n-tuples for calculating flow hashes, data streams are more likely to end up being distributed unequally across ECMP and load-shared links. This may lead to packet drops or reduced performance.¶
If a network cannot deploy infrastructure ACLs, then the security of the network may be compromised as a result of the increased attack surface.¶
7.3. DDoS Management and Customer Requests for Filtering
The case of customer Distributed Denial
For example, a website that normally only handles traffic on TCP ports 80 and 443 could be subject to a volumetric DDoS attack using NTP and DNS packets with a randomized source IP address, thereby rendering source-based remote triggered black hole [RFC5635] mechanisms useless. In this situation, ACLs that provide DDoS protection could be configured to block all UDP traffic at the network edge without impairing the web server functionality in any way. Thus, being able to block arbitrary protocols at the network edge can avoid DDoS-related problems both in the provider network and on the customer edge link.¶
7.4. Network Intrusion Detection and Prevention
Network Intrusion Detection Systems (NIDS) examine network traffic and try to identify traffic patterns that can be correlated to network-based attacks. These systems generally attempt to inspect application
Network Intrusion Prevention Systems (IPS) operate similarly to NIDSs, but they can also prevent intrusions by reacting to detected attack attempts by e.g., triggering packet filtering policies at firewalls and other devices.¶
Use of extension headers can be problematic for NIDS/IPS, since:¶
As a result, in order to increase the efficiency or effectiveness of these systems, packets employing IPv6 extension headers are often dropped at the network ingress point(s) of networks that deploy these systems.¶
7.5. Firewalling
Firewalls enforce security policies by means of packet filtering. These systems usually inspect Layer 3 and Layer 4 traffic but can often also examine application
As with a NIDS or IPS (Section 7.4), use of IPv6 extension headers can represent a challenge to network firewalls, since:¶
Additionally, a common firewall filtering policy is the so-called "default deny", where all traffic is blocked (by default), and only expected traffic is added to an "allow/accept list".¶
As a result, packets employing IPv6 extension headers are often dropped by network firewalls, either because of the challenges represented by extension headers or because the use of IPv6 extension headers has not been explicitly allowed.¶
Note that although the data presented in [Zack
8. Operational and Security Implications
8.1. Inability to Find Layer 4 Information
As discussed in Section 7, intermediate systems that need to find the Layer 4 header must process the entire IPv6 header chain. When such devices are unable to obtain the required information, the forwarding device has the option to drop the packet unconditionally
8.2. Route-Processor Protection
Most contemporary carrier-grade routers have a fast hardware
The Hop-by-Hop Options header has been particularly challenging since, in most circumstances, the corresponding packet is punted to the control plane for processing. As a result, many operators drop IPv6 packets containing this extension header [RFC7872]. [RFC6192] provides advice regarding protection of a router's control plane.¶
8.3. Inability to Perform Fine-Grained Filtering
Some intermediate systems do not have support for fine-grained filtering of IPv6 extension headers. For example, an operator that wishes to drop packets containing RHT0 may only be able to filter on the extension header type (Routing Header). This could result in an operator enforcing a coarser filtering policy (e.g., "drop all packets containing a Routing Header" vs. "only drop packets that contain a Routing Header Type 0").¶
8.4. Security Concerns Associated with IPv6 Extension Headers
The security implications of IPv6 extension headers generally fall into one or more of these categories:¶
Unlike IPv4 packets where the upper-layer protocol can be trivially found by means of the IHL field of the IPv4 header, the structure of IPv6 packets is more flexible and complex. This can represent a challenge for devices that need to find this information, since locating upper-layer protocol information requires that all IPv6 extension headers be examined. In turn, this presents implementation difficulties, since some packet
Sometimes, packets with IPv6 extension headers can impact throughput performance on intermediate systems. Unless appropriate mitigations are put in place (e.g., packet dropping and/or rate limiting), an attacker could simply send a large amount of IPv6 traffic employing IPv6 extension headers with the purpose of performing a DoS attack (see Sections 6.1 and 8 for further details). The extent to which performance is affected on these devices is implementation dependent.¶
IPv6 implementations
The IPv6 Fragment Header is employed for the fragmentation and reassembly of IPv6 packets. While many of the security implications of the fragmentation
9. IANA Considerations
This document has no IANA actions.¶
10. Security Considerations
The security implications of IPv6 extension headers are discussed in Section 8.4. This document does not introduce any new security issues.¶
11. References
11.1. Normative References
- [RFC5095]
-
Abley, J., Savola, P., and G. Neville-Neil, "Deprecation of Type 0 Routing Headers in IPv6", RFC 5095, DOI 10
.17487 , , <https:///RFC5095 www >..rfc -editor .org /info /rfc5095 - [RFC5722]
-
Krishnan, S., "Handling of Overlapping IPv6 Fragments", RFC 5722, DOI 10
.17487 , , <https:///RFC5722 www >..rfc -editor .org /info /rfc5722 - [RFC6946]
-
Gont, F., "Processing of IPv6 "Atomic" Fragments", RFC 6946, DOI 10
.17487 , , <https:///RFC6946 www >..rfc -editor .org /info /rfc6946 - [RFC6980]
-
Gont, F., "Security Implications of IPv6 Fragmentation with IPv6 Neighbor Discovery", RFC 6980, DOI 10
.17487 , , <https:///RFC6980 www >..rfc -editor .org /info /rfc6980 - [RFC7112]
-
Gont, F., Manral, V., and R. Bonica, "Implications of Oversized IPv6 Header Chains", RFC 7112, DOI 10
.17487 , , <https:///RFC7112 www >..rfc -editor .org /info /rfc7112 - [RFC8021]
-
Gont, F., Liu, W., and T. Anderson, "Generation of IPv6 Atomic Fragments Considered Harmful", RFC 8021, DOI 10
.17487 , , <https:///RFC8021 www >..rfc -editor .org /info /rfc8021 - [RFC8200]
-
Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", STD 86, RFC 8200, DOI 10
.17487 , , <https:///RFC8200 www >..rfc -editor .org /info /rfc8200 - [RFC8504]
-
Chown, T., Loughney, J., and T. Winters, "IPv6 Node Requirements", BCP 220, RFC 8504, DOI 10
.17487 , , <https:///RFC8504 www >..rfc -editor .org /info /rfc8504
11.2. Informative References
- [Almeida-2020]
-
Almeida, R., Cunha, I., Teixeira, R., Veitch, D., and C. Diot, "Classification of Load Balancing in the Internet", IEEE INFOCOM 2020, DOI 10
.1109 , , <https:///INFOCOM41043 .2020 .9155387 homepages >..dcc .ufmg .br /~cunha /papers /almeida20infoco m -mca .pdf - [APNIC-Scudder]
-
Scudder, J., "Modern router architecture and IPv6", APNIC Blog, , <https://
blog >..apnic .net /2020 /06 /04 /modern -router -architecture -and -ipv6 / - [Atlasis2012]
-
Atlasis, A., "Attacking IPv6 Implementation Using Fragmentation", Black Hat Europe 2012, , <https://
void >..gr /kargig /ipv6 /bh -eu -12 -Atlasis -Attacking _IPv6 -Slides .pdf - [Atlasis2014]
-
Atlasis, A., "A Novel Way of Abusing IPv6 Extension Headers to Evade IPv6 Security Devices", , <http://
www >..insinuator .net /2014 /05 /a -novel -way -of -abusing -ipv6 -extension -headers -to -evade -ipv6 -security -devices / - [BH-EU-2014]
-
Atlasis, A., Rey, E., and R. Schaefer, "Evasion of High-End IDPS Devices at the IPv6 Era", Black Hat Europe 2014, , <https://
www >..ernw .de /download /eu -14 -Atlasis -Rey -Schaefer -briefings -Evasion -of -High End -IPS -Devices -wp .pdf - [Bonica-NANOG58]
-
Bonica, R., "IPv6 Fragmentation: The Case For Deprecation", NANOG 58, , <https://
www >..nanog .org /sites /default /files /mon .general .fragmentation .bonica .pdf - [Cisco-EH-Cons]
-
Cisco, "IPv6 Extension Headers Review and Considerations", , <http://
www >..cisco .com /en /US /technologies /tk648 /tk872 /technologies _white _paper0900aecd80 54d37d .pdf - [Cisco-Frag]
-
Cisco, "Cisco IOS XR Software Crafted IPv6 Packet Denial of Service Vulnerability", , <http://
tools >..cisco .com /security /center /content /Cisco Security Advisory /cisco -sa -20150611 -iosxr - [FreeBSD-SA]
-
The FreeBSD Project, "IPv6 Hop-by-Hop options use-after-free bug", , <https://
www >..freebsd .org /security /advisories /Free BSD -SA -20 :24 .ipv6 .asc - [HEADERS]
-
Kumari, W., Jaeggli, J., Bonica, R. P., and J. Linkova, "Operational Issues Associated With Long IPv6 Header Chains", Work in Progress, Internet-Draft, draft
-wkumari , , <https://-long -headers -03 datatracker >..ietf .org /doc /html /draft -wkumari -long -headers -03 - [Huston-2017]
-
Huston, G., "Dealing with IPv6 fragmentation in the DNS", APNIC Blog, , <https://
blog >..apnic .net /2017 /08 /22 /dealing -ipv6 -fragmentation -dns / - [Huston-2020]
-
Huston, G., "Measurement of IPv6 Extension Header Support", NPS/CAIDA 2020 Virtual IPv6 Workshop, , <https://
www >..cmand .org /workshops /202006 -v6 /slides /2020 -06 -16 -xtn -hdrs .pdf - [IEPG94-Scudder]
-
Petersen, B. and J. Scudder, "Modern Router Architecture for Protocol Designers", IEPG 94, , <http://
www >..iepg .org /2015 -11 -01 -ietf94 /IEPG -Router Architecture -jgs .pdf - [IPV6-EH]
-
Gont, F. and W. Liu, "Recommendations on the Filtering of IPv6 Packets Containing IPv6 Extension Headers at Transit Routers", Work in Progress, Internet-Draft, draft
-ietf , , <https://-opsec -ipv6 -eh -filtering -08 datatracker >..ietf .org /doc /html /draft -ietf -opsec -ipv6 -eh -filtering -08 - [Jaeggli-2018]
-
Jaeggli, J., "IPv6 flow label: misuse in hashing", APNIC Blog, , <https://
blog >..apnic .net /2018 /01 /11 /ipv6 -flow -label -misuse -hashing / - [Linkova
-Gont -IEPG90] -
Linkova, J. and F. Gont, "IPv6 Extension Headers in the Real World v2.0", IEPG 90, , <http://
www >..iepg .org /2014 -07 -20 -ietf90 /iepg -ietf90 -ipv6 -ehs -in -the -real -world -v2 .0 .pdf - [Microsoft-SA]
-
Microsoft, "Windows TCP/IP Remote Code Execution Vulnerability", CVE-2021-24094, , <https://
msrc >..microsoft .com /update -guide /vulnerability /CVE -2021 -24094 - [nmap]
-
Lyon, G., "Firewall/IDS Evasion and Spoofing", Chapter 15. Nmap Reference Guide, <https://
nmap >..org /book /man -bypass -firewalls -ids .html - [OPERATORS]
-
Jaeggli, J., Colitti, L., Kumari, W., Vyncke, E., Kaeo, M., and T. Taylor, Ed., "Why Operators Filter Fragments and What It Implies", Work in Progress, Internet-Draft, draft
-taylor , , <https://-v6ops -fragdrop -02 datatracker >..ietf .org /doc /html /draft -taylor -v6ops -fragdrop -02 - [PARSING]
-
Kampanakis, P., "Implementation Guidelines for Parsing IPv6 Extension Headers", Work in Progress, Internet-Draft, draft
-kampanakis , , <https://-6man -ipv6 -eh -parsing -01 datatracker >..ietf .org /doc /html /draft -kampanakis -6man -ipv6 -eh -parsing -01 - [PMTUD
-Blackholes] -
De Boer, M. and J. Bosma, "Discovering Path MTU black holes on the Internet using RIPE Atlas", University of Amsterdam, MSc. Systems & Network Engineering, , <http://
www >..nlnetlabs .nl /downloads /publications /pmtu -black -holes -msc -thesis .pdf - [RFC2460]
-
Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", RFC 2460, DOI 10
.17487 , , <https:///RFC2460 www >..rfc -editor .org /info /rfc2460 - [RFC5635]
-
Kumari, W. and D. McPherson, "Remote Triggered Black Hole Filtering with Unicast Reverse Path Forwarding (uRPF)", RFC 5635, DOI 10
.17487 , , <https:///RFC5635 www >..rfc -editor .org /info /rfc5635 - [RFC6192]
-
Dugal, D., Pignataro, C., and R. Dunn, "Protecting the Router Control Plane", RFC 6192, DOI 10
.17487 , , <https:///RFC6192 www >..rfc -editor .org /info /rfc6192 - [RFC6437]
-
Amante, S., Carpenter, B., Jiang, S., and J. Rajahalme, "IPv6 Flow Label Specification", RFC 6437, DOI 10
.17487 , , <https:///RFC6437 www >..rfc -editor .org /info /rfc6437 - [RFC6438]
-
Carpenter, B. and S. Amante, "Using the IPv6 Flow Label for Equal Cost Multipath Routing and Link Aggregation in Tunnels", RFC 6438, DOI 10
.17487 , , <https:///RFC6438 www >..rfc -editor .org /info /rfc6438 - [RFC7045]
-
Carpenter, B. and S. Jiang, "Transmission and Processing of IPv6 Extension Headers", RFC 7045, DOI 10
.17487 , , <https:///RFC7045 www >..rfc -editor .org /info /rfc7045 - [RFC7098]
-
Carpenter, B., Jiang, S., and W. Tarreau, "Using the IPv6 Flow Label for Load Balancing in Server Farms", RFC 7098, DOI 10
.17487 , , <https:///RFC7098 www >..rfc -editor .org /info /rfc7098 - [RFC7113]
-
Gont, F., "Implementation Advice for IPv6 Router Advertisement Guard (RA-Guard)", RFC 7113, DOI 10
.17487 , , <https:///RFC7113 www >..rfc -editor .org /info /rfc7113 - [RFC7739]
-
Gont, F., "Security Implications of Predictable Fragment Identification Values", RFC 7739, DOI 10
.17487 , , <https:///RFC7739 www >..rfc -editor .org /info /rfc7739 - [RFC7872]
-
Gont, F., Linkova, J., Chown, T., and W. Liu, "Observations on the Dropping of Packets with IPv6 Extension Headers in the Real World", RFC 7872, DOI 10
.17487 , , <https:///RFC7872 www >..rfc -editor .org /info /rfc7872 - [RFC8900]
-
Bonica, R., Baker, F., Huston, G., Hinden, R., Troan, O., and F. Gont, "IP Fragmentation Considered Fragile", BCP 230, RFC 8900, DOI 10
.17487 , , <https:///RFC8900 www >..rfc -editor .org /info /rfc8900 - [RFC8955]
-
Loibl, C., Hares, S., Raszuk, R., McPherson, D., and M. Bacher, "Dissemination of Flow Specification Rules", RFC 8955, DOI 10
.17487 , , <https:///RFC8955 www >..rfc -editor .org /info /rfc8955 - [RFC8956]
-
Loibl, C., Ed., Raszuk, R., Ed., and S. Hares, Ed., "Dissemination of Flow Specification Rules for IPv6", RFC 8956, DOI 10
.17487 , , <https:///RFC8956 www >..rfc -editor .org /info /rfc8956 - [Zack
-FW -Benchmark] -
Zack, E., "Firewall Security Assessment and Benchmarking IPv6 Firewall Load Tests", IPv6 Hackers Meeting #1, , <https://
www >..ipv6hackers .org /files /meetings /ipv6 -hackers -1 /zack -ipv6hackers1 -firewall -security -assessment -and -benchmarking .pdf
Acknowledgements
The authors would like to thank (in alphabetical order) Mikael Abrahamsson, Fred Baker, Dale W. Carder, Brian Carpenter, Tim Chown, Owen DeLong, Gorry Fairhurst, Guillermo Gont, Tom Herbert, Lee Howard, Tom Petch, Sander Steffann, Eduard Vasilenko, Éric Vyncke, Rob Wilton, Jingrong Xie, and Andrew Yourtchenko for providing valuable comments on earlier draft versions of this document.¶
Fernando Gont would like to thank Jan Zorz / Go6 Lab <https://