rfc-9467

Relaxed Packet Counter Verification for Babel MAC Authentication

J. Chroboczek, T. Høiland-Jørgensen
date2024-01 streamIETF areartg wgbabel statusPROPOSED STANDARD pages8 canonicalhttps://www.rfc-editor.org/rfc/rfc9467 doi10.17487/RFC9467
This document relaxes the packet verification rules defined in "MAC Authentication for the Babel Routing Protocol" (RFC 8967) in order to make the protocol more robust in the presence of packet reordering. This document updates RFC 8967.

updates

Extracted elements (18)

design-rationale §3.1.1

Generalizing beyond two PC values (e.g., per-TOS or per-802.11 access category) would be unsafe because the field used to select the highest PC must itself be MAC-protected. Only destination address/port and packet body are covered by the MAC; TOS and 802.11 access category are not, so an attacker could replay a packet by changing the unprotected field to select a lower stored PC.

routing, security

design-rationale §1

IEEE 802.11 power-saving modes cause access points to buffer multicast packets and release them after the power-saving interval ends, delaying them by up to hundreds of milliseconds relative to unicast packets. This systematically causes RFC 8967 PC verification to fail for multicast packets on Wi-Fi links, motivating the relaxed verification rules in this document.

routing, security

design-rationale §1

Two complementary techniques are defined: separate PCm/PCu states allow arbitrary reordering between unicast and multicast packets, while window-based verification allows bounded reordering between arbitrary packets. The former is RECOMMENDED because Babel is designed to tolerate occasional packet loss, making the window approach merely OPTIONAL.

routing, security

interoperability-note §1

This document updates RFC 8967 by replacing specific bullet points in Section 4.3 of that document. Implementations of RFC 8967 that do not implement these relaxed rules will drop legitimately reordered packets on links with Wi-Fi power-saving modes, while compliant implementations will accept them.

routing, security

normative-requirement §3.2 RECOMMENDED

A window size of S=128 is RECOMMENDED for window-based PC verification.

routing, security

normative-requirement §3.3 MUST

An implementation combining both techniques MUST maintain two distinct windows per neighbour table entry (one for multicast, one for unicast). When a successful Challenge Reply is received, both windows MUST be reset. Incoming packets consult the multicast or unicast window based on the destination address.

routing, security

normative-requirement §3.2 MUST

If the received PC index i is negative (packet too old), the packet MUST be discarded.

routing, security

normative-requirement §3.2 MUST

If the window value at index i is already set (PC previously seen), the packet MUST be discarded as a replay.

routing, security

normative-requirement §3.2 MUST

On receiving a successful Challenge Reply with window-based verification, PCh MUST be set to the received value and all window values MUST be reset except the right-edge value (index S-1), which MUST be set.

routing, security

normative-requirement §1 MAY

The two techniques (split PCm/PCu state and window-based verification) MAY be used simultaneously.

routing, security

normative-requirement §3.1 MUST

When a packet without a successful Challenge Reply is received and the Index matches, the receiver compares the received PC against PCm (multicast destination) or PCu (unicast destination). If the received PC is smaller than or equal to the stored value, the packet MUST be dropped without sending a challenge.

routing, security

normative-requirement §3.1 MUST

When a successful Challenge Reply is received, the Index from the PC TLV MUST be stored in the neighbour table Index field, and the PC from the TLV MUST be stored in both the PCm and PCu fields of the neighbour table entry.

routing, security

normative-requirement §3.2 MUST

When PC is strictly larger than PCh (i ≥ S), the window MUST be shifted left by (i - S + 1), PCh MUST be updated to the received PC, and the right-edge window value MUST be set.

routing, security

protocol-element §3.1

The neighbour table entry (Index, PC) pair from RFC 8967 Section 3.2 is replaced by a triple (Index, PCm, PCu), where Index is 0–32 octets, and PCm and PCu are 32-bit integers tracking the highest PC seen for multicast and unicast packets respectively.

routing, security

protocol-element §3.2

Window-based verification extends the neighbour table entry to a triple (Index, PCh, Window), where PCh is a 32-bit highest-PC value and Window is a vector of S booleans (default S=128 RECOMMENDED) representing whether each PC value in the range [PCh-S+1, PCh] has been seen.

routing, security

security-consideration §4

The destination IP address used to select between PCm and PCu is included in the MAC pseudo-header and therefore integrity-protected. An attacker cannot replay a unicast packet as a multicast packet (or vice versa) without invalidating the MAC, preserving the anti-replay properties of RFC 8967.

routing, security

security-consideration §4

The relaxed procedures marginally increase per-neighbour state by 4 to 36 octets depending on implementation choices. This increase is considered too small to significantly affect resistance to denial-of-service attacks.

routing, security

state-machine §3.2

On packet receipt with window-based verification, compute index i = PC - PCh + S - 1. If i < 0, discard (too old). If 0 ≤ i < S and window[i] is set, discard (replay). If 0 ≤ i < S and window[i] is unset, mark set and accept. If i ≥ S, shift window left by (i - S + 1), set PCh to received PC, mark right edge set, and accept.

routing, security