ietf-corpus

rfc-5722

Handling of Overlapping IPv6 Fragments

S. Krishnan
date2009-12 streamIETF areaint wg6man statusPROPOSED STANDARD pages6 canonicalhttps://www.rfc-editor.org/rfc/rfc5722 doi10.17487/RFC5722 errataview
The fragmentation and reassembly algorithm specified in the base IPv6 specification allows fragments to overlap. This document demonstrates the security issues associated with allowing overlapping fragments and updates the IPv6 specification to explicitly forbid overlapping fragments. [STANDARDS-TRACK]

updated by

updates

Extracted elements (9)

design-rationale §3

The overlapping fragment attack is significantly more dangerous in IPv6 than in IPv4. In IPv4, the overlapping region of a TCP header typically does not include source and destination ports, but in IPv6 an attacker can craft overlapping fragments that replace the source or destination port, enabling broader bypass of port-based access controls.

ip, security

design-rationale §2

The RFC 1858 mitigation for overlapping fragment attacks (dropping packets with fragment offset of 1) works for IPv4 but is ineffective for IPv6 because the fragmentable part of an IPv6 packet can contain extension headers before the TCP header, making the offset-based check unreliable.

ip, security

interoperability-note §1

This document updates RFC 2460 (the IPv6 base specification) to explicitly forbid overlapping fragments. The original RFC 2460 fragmentation and reassembly algorithm did not prevent fragments from overlapping.

ip

normative-requirement §4 MUST NOT

IPv6 nodes transmitting datagrams that need to be fragmented MUST NOT create overlapping fragments.

ip, security

normative-requirement §4 MAY

Nodes MAY provide mechanisms to track the reception of overlapping fragment packets, for instance by implementing counters or alarms relating to these events.

ip, security

normative-requirement §4 MUST

When reassembling an IPv6 datagram, if one or more constituent fragments is determined to be an overlapping fragment, the entire datagram (and any constituent fragments, including those not yet received) MUST be silently discarded.

ip, security

protocol-element §3

The IPv6 Fragment Header (Next Header value 44) includes a FragmentOffset field, a More Fragments (M) bit, and a 32-bit Identification field. The attack exploits the fact that two fragments with the same Identification value but overlapping offsets can carry contradictory upper-layer header content.

ip

security-consideration §3

Overlapping IPv6 fragments can be used to bypass stateful firewalls: a first fragment carries a TCP SYN+ACK (appearing as a response to an initiated connection) to pass the firewall, while a subsequent overlapping fragment overwrites the TCP flags to change it to a SYN (connection request), effectively bypassing the firewall's access control.

ip, security

security-consideration §5

This document recommends disallowing overlapping fragments in order to prevent the firewall-bypass attack described in Section 3. The fix is to silently discard any reassembly attempt that involves overlapping fragments.

ip, security