ietf-corpus

rfc-6935

IPv6 and UDP Checksums for Tunneled Packets

M. Eubanks, P. Chimento, M. Westerlund
date2013-04 streamIETF areaint wg6man statusPROPOSED STANDARD pages12 canonicalhttps://www.rfc-editor.org/rfc/rfc6935 doi10.17487/RFC6935 errataview
This document updates the IPv6 specification (RFC 2460) to improve performance when a tunnel protocol uses UDP with IPv6 to tunnel packets. The performance improvement is obtained by relaxing the IPv6 UDP checksum requirement for tunnel protocols whose header information is protected on the "inner" packet being carried. Relaxing this requirement removes the overhead associated with the computation of UDP checksums on IPv6 packets that carry the tunnel protocol packets. This specification describes how the IPv6 UDP checksum requirement can be relaxed when the encapsulated packet itself contains a checksum. It also describes the limitations and risks of this approach and discusses the restrictions on the use of this method.

updates

Extracted elements (21)

design-rationale §4.1

Context establishment (tunneling state) must use checksummed UDP or other integrity-protected protocols so that undetected errors cannot create long-lived, widespread failures affecting more than a single corrupted packet.

ip, udp

design-rationale §4.2

In tunnel usage, each outer encapsulating packet provides only transport from ingress to egress; a corruption typically affects only that single tunneled packet rather than cascading into protocol state. This limits the blast radius of undetected corruption compared to stateful non-tunnel protocols.

ip, udp

design-rationale §1

IPv4 allows zero UDP checksum because IPv4 has a checksum over the IP header. IPv6 has no IP header checksum, so RFC 2460 explicitly forbade zero UDP checksums. This update relaxes that rule specifically for tunnel protocols whose inner packets carry their own checksums.

ip, udp

design-rationale §6

The UDP checksum is overloaded with the task of protecting the IPv6 header for UDP flows (analogous to TCP checksum for TCP). Protocols that do not use a pseudo-header approach to checksums have essentially no protection from misdelivered packets.

ip, udp

design-rationale §1

UDP-based tunneling is increasingly necessary because deploying new protocol numbers on a critical mass of routers and middleboxes now takes decades, while UDP passes through firewalls and other middleboxes. This motivates allowing zero UDP checksums to reduce tunnel endpoint overhead.

udp, ip

design-rationale §6

UDP-Lite (RFC 3828) would provide better protection than zero UDP checksums but lacks middlebox support. If middleboxes were updated to support UDP-Lite, it would be preferred over the zero-checksum method for many tunnel protocols.

udp, ip

design-rationale §4.2

Zero UDP checksum is restricted to tunnel protocols because tunneled (inner) packets carry their own checksums or integrity mechanisms, providing a second layer of corruption detection. Non-tunnel protocols that directly consume the payload must rely on the UDP checksum for first-level verification and therefore cannot safely use a zero checksum.

ip, udp

interoperability-note §4.3

Middleboxes that conform to RFC 2460 are likely to discard datagrams with a zero UDP checksum. Tunnel protocols intending to use zero UDP checksum MUST define a method for handling cases when a middlebox prevents the path from supporting such datagrams.

ip, udp

interoperability-note §4.2

Tunnel protocols carrying non-IP inner packets require further analysis before using zero UDP checksums; IP inner packets are generally safe because all IPv4 and IPv6 packets include at least one checksum at the network or transport layer.

ip, udp

normative-requirement §5 MUST

Any node implementing zero-checksum mode MUST follow the node requirements specified in Section 4 of RFC 6936 ('Applicability Statement for the Use of IPv6 UDP Datagrams with Zero Checksums').

ip, udp

normative-requirement §5 MUST

Any protocol that enables zero-checksum mode for a specific port or ports MUST follow the usage requirements specified in Section 5 of RFC 6936.

ip, udp

normative-requirement §5 MUST

IPv6 receivers MUST by default discard UDP packets containing a zero checksum and SHOULD log the error. This default behavior is preserved from RFC 2460; only explicitly configured zero-checksum-mode ports are exempted.

ip, udp

normative-requirement §4.1 SHOULD

Keepalive datagrams with a zero UDP checksum SHOULD be sent to validate the network path, and keepalive traffic should include both zero-checksum and non-zero-checksum datagrams so that endpoints can discover middleboxes that drop zero-checksum packets.

ip, udp

normative-requirement §5 MUST

Middleboxes supporting IPv6 MUST follow requirements 9, 10, and 11 of the usage requirements specified in Section 5 of RFC 6936, which govern handling of datagrams with zero UDP checksums.

ip, udp

normative-requirement §4.1 SHOULD

Receivers SHOULD attempt to detect corruption of the address information in an encapsulating packet by checking against the established tunnel context 5-tuple. They SHOULD also attempt to detect corruption of source-fragmented encapsulating packets.

ip, udp

normative-requirement §5 MUST

Whenever originating a UDP packet for a port in the default mode, an IPv6 node MUST compute a UDP checksum over the packet and pseudo-header; if that computation yields zero, the checksum MUST be changed to hex FFFF before placement in the UDP header.

ip, udp

protocol-element §4.1

A robust tunnel protocol should track tunnel context based on the 5-tuple: (tunneled protocol number, IPv6 source address, IPv6 destination address, UDP source port, UDP destination port). This 5-tuple check provides a first filter against misdelivered or corrupted datagrams.

ip, udp

protocol-element §5

An IPv6 node associates a mode—default or zero-checksum—with each used UDP port (for sending and/or receiving). Zero-checksum mode is an opt-in per-port configuration permitted only for specific tunnel encapsulation protocols.

ip, udp

security-consideration §7

If hardware processes zero-checksum UDP packets faster than non-zero-checksum packets, an attacker can inject non-zero-checksum packets into a tunnel that forwards zero-checksum packets to cause overload in the slow path. Protection mechanisms such as source-address filtering and throttling of non-zero-checksum traffic should be employed.

security, udp, ip

security-consideration §7

Less work is required to generate an attack using a zero UDP checksum than a standard checksum, but this does not introduce significant new vulnerabilities because checksums are not a security measure and can be trivially computed by any attacker.

security, udp, ip

security-consideration §7

Source address validation can help prevent injection of traffic into tunnel contexts by an attacker, but will not protect against an intentional attacker who forges correct source information. Zero-checksum users should apply all available context verification checks to minimize misdelivery risk.

security, udp, ip