Babel over DTLS: Babel Routing Protocol over Datagram Transport Layer Security
How Babel routers use DTLS to authenticate neighbours and keep their routing messages private and tamper-proof.
Décimo, A., Schinazi, D., and J. Chroboczek, "Babel Routing Protocol over Datagram Transport Layer Security", RFC 8968, DOI 10.17487/RFC8968, January 2021, <https://www.rfc-editor.org/info/rfc8968>.
@misc{rfc8968,
series = {Request for Comments},
number = 8968,
howpublished = {RFC 8968},
publisher = {RFC Editor},
doi = {10.17487/RFC8968},
url = {https://www.rfc-editor.org/info/rfc8968},
author = {A. Décimo and D. Schinazi and J. Chroboczek},
title = {{Babel Routing Protocol over Datagram Transport Layer Security}},
pagetotal = 9,
year = 2021,
month = jan,
} RFC text
Contents
Internet Engineering Task Force (IETF) A. Décimo
Request for Comments: 8968 IRIF, University of Paris-Diderot
Category: Standards Track D. Schinazi
ISSN: 2070-1721 Google LLC
J. Chroboczek
IRIF, University of Paris-Diderot
January 2021
Babel Routing Protocol over Datagram Transport Layer Security
Abstract
The Babel Routing Protocol does not contain any means to authenticate
neighbours or provide integrity or confidentiality for messages sent
between them. This document specifies a mechanism to ensure these
properties using Datagram Transport Layer Security (DTLS).
Status of This Memo
This is an Internet Standards Track document.
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). Further information on
Internet Standards is available in 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://www.rfc-editor.org/info/rfc8968.
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://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 Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Table of Contents
1. Introduction
1.1. Specification of Requirements
1.2. Applicability
2. Operation of the Protocol
2.1. DTLS Connection Initiation
2.2. Protocol Encoding
2.3. Transmission
2.4. Reception
2.5. Neighbour Table Entry
2.6. Simultaneous Operation of Babel over DTLS and Unprotected
Babel on a Node
2.7. Simultaneous Operation of Babel over DTLS and Unprotected
Babel on a Network
3. Interface Maximum Transmission Unit Issues
4. IANA Considerations
5. Security Considerations
6. References
6.1. Normative References
6.2. Informative References
Appendix A. Performance Considerations
Acknowledgments
Authors' Addresses
1. Introduction
The Babel routing protocol [RFC8966] does not contain any means to
authenticate neighbours or protect messages sent between them.
Because of this, an attacker is able to send maliciously crafted
Babel messages that could lead a network to route traffic to an
attacker or to an under-resourced target, causing denial of service.
This document specifies a mechanism to prevent such attacks using
Datagram Transport Layer Security (DTLS) [RFC6347].
1.1. Specification of Requirements
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.
1.2. Applicability
The protocol described in this document protects Babel packets with
DTLS. As such, it inherits the features offered by DTLS, notably
authentication, integrity, optional replay protection,
confidentiality, and asymmetric keying. It is therefore expected to
be applicable in a wide range of environments.
There exists another mechanism for securing Babel, namely Message
Authentication Code (MAC) authentication for Babel (Babel-MAC)
[RFC8967]. Babel-MAC only offers basic features, namely
authentication, integrity, and replay protection with a small number
of symmetric keys. A comparison of Babel security mechanisms and
their applicability can be found in [RFC8966].
Note that Babel over DTLS provides a single authentication domain,
meaning that all nodes that have the right credentials can convey any
and all routing information.
DTLS supports several mechanisms by which nodes can identify
themselves and prove possession of secrets tied to these identities.
This document does not prescribe which of these mechanisms to use;
details of identity management are left to deployment profiles of
Babel over DTLS.
2. Operation of the Protocol
Babel over DTLS requires some changes to how Babel operates. First,
DTLS is a client-server protocol, while Babel is a peer-to-peer
protocol. Second, DTLS can only protect unicast communication, while
Babel packets can be sent to both unicast and multicast destinations.
2.1. DTLS Connection Initiation
Babel over DTLS operates on a different port than unencrypted Babel.
All Babel over DTLS nodes MUST act as DTLS servers on a given UDP
port and MUST listen for unencrypted Babel traffic on another UDP
port, which MUST be distinct from the first one. The default port
for Babel over DTLS is registered with IANA as the "babel-dtls" port
(UDP port 6699, see Section 4), and the port exchanging unencrypted
Babel traffic is registered as the "babel" port (UDP port 6696, see
Section 5 of [RFC8966]).
When a Babel node discovers a new neighbour (generally by receiving
an unencrypted multicast Babel packet), it compares the neighbour's
IP address with its own, using network byte ordering. If a node's
address is lower than the recently discovered neighbour's address, it
acts as a client and connects to the neighbour. In other words, the
node with the lowest address is the DTLS client for this pairwise
relationship. As an example, fe80::1:2 is considered lower than
fe80::2:1.
The node acting as DTLS client initiates its DTLS connection from an
ephemeral UDP port. Nodes SHOULD ensure that new client DTLS
connections use different ephemeral ports from recently used
connections to allow servers to differentiate between the new and old
DTLS connections. Alternatively, nodes could use DTLS connection
identifiers [DTLS-CID] as a higher-entropy mechanism to distinguish
between connections.
When a node receives a new DTLS connection, it MUST verify that the
source IP address is either an IPv6 link-local address or an IPv4
address belonging to the local network; if it is neither, it MUST
reject the connection. Nodes use mutual authentication
(authenticating both client and server); clients MUST authenticate
servers and servers MUST authenticate clients. Implementations MUST
support authenticating peers against a local store of credentials.
If either node fails to authenticate its peer against its local
policy, it MUST abort the DTLS handshake. The guidance given in
[BCP195] MUST be followed to avoid attacks on DTLS. Additionally,
nodes MUST only negotiate DTLS version 1.2 or higher. Nodes MUST use
DTLS replay protection to prevent attackers from replaying stale
information. Nodes SHOULD drop packets that have been reordered by
more than two IHU (I Heard You) intervals, to avoid letting attackers
make stale information last longer. If a node receives a new DTLS
connection from a neighbour to whom it already has a connection, the
node MUST NOT discard the older connection until it has completed the
handshake of the new one and validated the identity of the peer.
2.2. Protocol Encoding
Babel over DTLS sends all unicast Babel packets protected by DTLS.
The entire Babel packet, from the Magic byte at the start of the
Babel header to the last byte of the Babel packet trailer, is sent
protected by DTLS.
2.3. Transmission
When sending packets, Babel over DTLS nodes MUST NOT send any TLVs
over the unprotected "babel" port, with the exception of Hello TLVs
without the Unicast flag set. Babel over DTLS nodes MUST NOT send
any unprotected unicast packets. This ensures the confidentiality of
the information sent in Babel packets (e.g., the network topology) by
only sending it encrypted by DTLS. Unless some out-of-band neighbour
discovery mechanism is available, nodes SHOULD periodically send
unprotected Multicast Hellos to ensure discovery of new neighbours.
In order to maintain bidirectional reachability, nodes can either
rely entirely on unprotected Multicast Hellos, or send protected
Unicast Hellos in addition to the Multicast Hellos.
Since Babel over DTLS only protects unicast packets, implementors may
implement Babel over DTLS by modifying an implementation of Babel
without DTLS support and replacing any TLV previously sent over
multicast with a separate TLV sent over unicast for each neighbour.
TLVs previously sent over multicast can be replaced with the same
contents over unicast, with the exception of Hellos as described
above. Some implementations could also change the contents of IHU
TLVs when converting to unicast in order to remove redundant
information.
2.4. Reception
Babel over DTLS nodes can receive Babel packets either protected over
a DTLS connection or unprotected directly over the "babel" port. To
ensure the security properties of this mechanism, unprotected packets
are treated differently. Nodes MUST silently ignore any unprotected
packet sent over unicast. When parsing an unprotected packet, a node
MUST silently ignore all TLVs that are not of type Hello. Nodes MUST
also silently ignore any unprotected Hello with the Unicast flag set.
Note that receiving an unprotected packet can still be used to
discover new neighbours, even when all TLVs in that packet are
silently ignored.
2.5. Neighbour Table Entry
It is RECOMMENDED for nodes to associate the state of their DTLS
connection with their neighbour table. When a neighbour entry is
flushed from the neighbour table (Appendix A of [RFC8966]), its
associated DTLS state SHOULD be discarded. The node SHOULD send a
DTLS close_notify alert to the neighbour if it believes the link is
still viable.
2.6. Simultaneous Operation of Babel over DTLS and Unprotected Babel on
a Node
Implementations MAY implement both Babel over DTLS and unprotected
Babel. Additionally, a node MAY simultaneously run both Babel over
DTLS and unprotected Babel. However, a node running both MUST ensure
that it runs them on separate interfaces, as the security properties
of Babel over DTLS rely on ignoring unprotected Babel packets (other
than Multicast Hellos). An implementation MAY offer configuration
options to allow unprotected Babel on some interfaces but not others,
which effectively gives nodes on that interface the same access as
authenticated nodes; however, this SHOULD NOT be done unless that
interface has a mechanism to authenticate nodes at a lower layer
(e.g., IPsec).
2.7. Simultaneous Operation of Babel over DTLS and Unprotected Babel on
a Network
If Babel over DTLS and unprotected Babel are both operated on the
same network, the Babel over DTLS implementation will receive
unprotected Multicast Hellos and attempt to initiate a DTLS
connection. These connection attempts can be sent to nodes that only
run unprotected Babel, who will not respond. Babel over DTLS
implementations SHOULD therefore rate-limit their DTLS connection
attempts to avoid causing undue load on the network.
3. Interface Maximum Transmission Unit Issues
Compared to unprotected Babel, DTLS adds header, authentication tag,
and possibly block-size padding overhead to every packet. This
reduces the size of the Babel payload that can be carried. This
document does not relax the packet size requirements in Section 4 of
[RFC8966] but recommends that DTLS overhead be taken into account
when computing maximum packet size.
More precisely, nodes SHOULD compute the overhead of DTLS depending
on the ciphersuites in use and SHOULD NOT send Babel packets larger
than the interface maximum transmission unit (MTU) minus the overhead
of IP, UDP, and DTLS. Nodes MUST NOT send Babel packets larger than
the attached interface's MTU adjusted for known lower-layer headers
(at least UDP and IP) or 512 octets, whichever is larger, but not
exceeding 2^(16) - 1 adjusted for lower-layer headers. Every Babel
speaker MUST be able to receive packets that are as large as any
attached interface's MTU adjusted for UDP and IP headers or 512
octets, whichever is larger. Note that this requirement on reception
does not take into account the overhead of DTLS because the peer may
not have the ability to compute the overhead of DTLS, and the packet
may be fragmented by lower layers.
Note that distinct DTLS connections can use different ciphers, which
can have different amounts of per-packet overhead. Therefore, the
MTU to one neighbour can be different from the MTU to another
neighbour on the same link.
4. IANA Considerations
IANA has registered a UDP port number, called "babel-dtls", for use
by Babel over DTLS:
Service Name: babel-dtls
Port Number: 6699
Transport Protocols: UDP only
Description: Babel Routing Protocol over DTLS
Assignee: IESG, iesg@ietf.org
Contact: IETF Chair, chair@ietf.org
Reference: RFC 8968
Service Code: None
5. Security Considerations
A malicious client might attempt to perform a high number of DTLS
handshakes with a server. As the clients are not uniquely identified
by the protocol until the handshake completes and can be obfuscated
with IPv6 temporary addresses, a server needs to mitigate the impact
of such an attack. Note that attackers might attempt to keep in-
progress handshakes open for as long as possible by using variants on
the attack commonly known as Slowloris [SLOWLORIS]. Mitigating these
attacks might involve limiting the rate of handshakes from a given
subnet or more advanced denial of service avoidance techniques beyond
the scope of this document.
Babel over DTLS allows sending Multicast Hellos unprotected;
attackers can therefore tamper with them. For example, an attacker
could send erroneous values for the Seqno and Interval fields,
causing bidirectional reachability detection to fail. While
implementations MAY use Multicast Hellos for link quality estimation,
they SHOULD also emit protected Unicast Hellos to prevent this class
of denial-of-service attack.
While DTLS provides protection against an attacker that replays valid
packets, DTLS is not able to detect when an active on-path attacker
intercepts valid packets and resends them at a later time. This
attack could be used to make a node believe it has bidirectional
reachability to a neighbour even though that neighbour has
disconnected from the network. To prevent this attack, nodes MUST
discard the DTLS state associated with a neighbour after a finite
time of not receiving valid DTLS packets. This can be implemented
by, for example, discarding a neighbour's DTLS state when its
associated IHU timer fires. Note that relying solely on the receipt
of Hellos is not sufficient as Multicast Hellos are sent unprotected.
Additionally, an attacker could save some packets and replay them
later in hopes of propagating stale routing information at a later
time. This can be mitigated by discarding received packets that have
been reordered by more than two IHU intervals.
6. References
6.1. Normative References
[BCP195] Sheffer, Y., Holz, R., and P. Saint-Andre,
"Recommendations for Secure Use of Transport Layer
Security (TLS) and Datagram Transport Layer Security
(DTLS)", BCP 195, RFC 7525, May 2015,
<https://www.rfc-editor.org/info/bcp195>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer
Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347,
January 2012, <https://www.rfc-editor.org/info/rfc6347>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8966] Chroboczek, J. and D. Schinazi, "The Babel Routing
Protocol", RFC 8966, DOI 10.17487/RFC8966, January 2021,
<https://www.rfc-editor.org/info/rfc8966>.
6.2. Informative References
[DTLS-CID] Rescorla, E., Tschofenig, H., and T. Fossati, "Connection
Identifiers for DTLS 1.2", Work in Progress, Internet-
Draft, draft-ietf-tls-dtls-connection-id-08, 2 November
2020, <https://tools.ietf.org/html/draft-ietf-tls-dtls-
connection-id-08>.
[RFC7250] Wouters, P., Ed., Tschofenig, H., Ed., Gilmore, J.,
Weiler, S., and T. Kivinen, "Using Raw Public Keys in
Transport Layer Security (TLS) and Datagram Transport
Layer Security (DTLS)", RFC 7250, DOI 10.17487/RFC7250,
June 2014, <https://www.rfc-editor.org/info/rfc7250>.
[RFC7918] Langley, A., Modadugu, N., and B. Moeller, "Transport
Layer Security (TLS) False Start", RFC 7918,
DOI 10.17487/RFC7918, August 2016,
<https://www.rfc-editor.org/info/rfc7918>.
[RFC7924] Santesson, S. and H. Tschofenig, "Transport Layer Security
(TLS) Cached Information Extension", RFC 7924,
DOI 10.17487/RFC7924, July 2016,
<https://www.rfc-editor.org/info/rfc7924>.
[RFC8094] Reddy, T., Wing, D., and P. Patil, "DNS over Datagram
Transport Layer Security (DTLS)", RFC 8094,
DOI 10.17487/RFC8094, February 2017,
<https://www.rfc-editor.org/info/rfc8094>.
[RFC8967] Dô, C., Kolodziejak, W., and J. Chroboczek, "MAC
Authentication for the Babel Routing Protocol", RFC 8967,
DOI 10.17487/RFC8967, January 2021,
<https://www.rfc-editor.org/info/rfc8967>.
[SLOWLORIS]
Hansen, R., "Slowloris HTTP DoS", June 2009,
<https://web.archive.org/web/20150315054838/
http://ha.ckers.org/slowloris/>.
Appendix A. Performance Considerations
To reduce the number of octets taken by the DTLS handshake,
especially the size of the certificate in the ServerHello (which can
be several kilobytes), Babel peers can use raw public keys [RFC7250]
or the Cached Information Extension [RFC7924]. The Cached
Information Extension avoids transmitting the server's certificate
and certificate chain if the client has cached that information from
a previous TLS handshake. TLS False Start [RFC7918] can reduce round
trips by allowing the TLS second flight of messages
(ChangeCipherSpec) to also contain the (encrypted) Babel packet.
Acknowledgments
The authors would like to thank Roman Danyliw, Donald Eastlake,
Thomas Fossati, Benjamin Kaduk, Gabriel Kerneis, Mirja Kühlewind,
Antoni Przygienda, Henning Rogge, Dan Romascanu, Barbara Stark,
Markus Stenberg, Dave Taht, Martin Thomson, Sean Turner, and Martin
Vigoureux for their input and contributions. The performance
considerations in this document were inspired from the ones for DNS
over DTLS [RFC8094].
Authors' Addresses
Antonin Décimo
IRIF, University of Paris-Diderot
Paris
France
Email: antonin.decimo@gmail.com
David Schinazi
Google LLC
1600 Amphitheatre Parkway
Mountain View, CA 94043
United States of America
Email: dschinazi.ietf@gmail.com
Juliusz Chroboczek
IRIF, University of Paris-Diderot
Case 7014
75205 Paris CEDEX 13
France
Email: jch@irif.fr
ISO Plain Language
On this page
§1Why Babel Needs Protection
The Babel routing protocol (RFC 8966) contains no means to authenticate neighbours or to protect the messages sent between them. Because of that, an attacker is able to send maliciously crafted Babel messages that could lead a network to route traffic to the attacker or to an under-resourced target, causing denial of service. This document specifies a mechanism to prevent such attacks using Datagram Transport Layer Security (DTLS) (RFC 6347).
Protecting Babel packets with DTLS means the mechanism inherits the features DTLS offers: authentication, integrity, optional replay protection, confidentiality, and asymmetric keying. It is therefore expected to be applicable in a wide range of environments.
There is another mechanism for securing Babel, MAC authentication for Babel, or Babel-MAC (RFC 8967). Babel-MAC offers only basic features: authentication, integrity and replay protection, with a small number of symmetric keys. A comparison of the Babel security mechanisms and their applicability is in RFC 8966. One point to keep in mind is that Babel over DTLS provides a single authentication domain, meaning that all nodes that hold the right credentials can convey any and all routing information.
DTLS supports several mechanisms by which nodes can identify themselves and prove possession of secrets tied to those identities. This document does not prescribe which to use; the details of identity management are left to deployment profiles of Babel over DTLS.
Plain Babel trusts whoever sends a packet. A neighbour on the same link can claim routes it does not have, or send a message that makes everyone else send their traffic somewhere else. Wrapping the packets in DTLS means each neighbour proves who it is before its routing messages are believed.
§2.1Starting and Maintaining a DTLS Connection
Babel over DTLS requires some changes to how Babel operates. DTLS is a client-server protocol, while Babel is a peer-to-peer protocol, and DTLS can only protect unicast communication, while Babel packets can go to both unicast and multicast destinations.
All Babel over DTLS nodes MUST act as DTLS servers on a given UDP port and MUST listen for unencrypted Babel traffic on another UDP port, which MUST be distinct from the first. The default port for Babel over DTLS is registered with IANA as the babel-dtls port, UDP port 6699, and the port exchanging unencrypted Babel traffic is the babel port, UDP port 6696.
When a node discovers a new neighbour, generally by receiving an unencrypted multicast Babel packet, it compares the neighbour's IP address with its own, using network byte ordering. If a node's address is lower than the neighbour's address, it acts as a client and connects to the neighbour. The node with the lowest address is therefore the DTLS client for that pairwise relationship. The node acting as client initiates the DTLS connection from an ephemeral UDP port, and nodes SHOULD ensure that new client connections use different ephemeral ports from recently used connections so that servers can tell a new connection from an old one. Alternatively, nodes could use DTLS connection identifiers as a higher-entropy mechanism.
When a node receives a new DTLS connection, it MUST verify that the source IP address is either an IPv6 link-local address or an IPv4 address belonging to the local network, and it MUST reject the connection if it is neither. Nodes use mutual authentication, so clients MUST authenticate servers and servers MUST authenticate clients. Implementations MUST support authenticating peers against a local store of credentials, and if either node fails to authenticate its peer it MUST abort the handshake. Nodes MUST only negotiate DTLS version 1.2 or higher, and MUST use DTLS replay protection to prevent attackers from replaying stale information. Nodes SHOULD drop packets that have been reordered by more than two IHU, or I Heard You, intervals, so that attackers cannot make stale information last longer. If a node receives a new DTLS connection from a neighbour to which it already has a connection, it MUST NOT discard the older connection until it has completed the handshake of the new one and validated the peer's identity.
To reduce the number of octets the handshake takes, Babel peers can use raw public keys or the Cached Information Extension, which avoids transmitting the server's certificate and chain when the client has cached that information from a previous handshake. TLS False Start can reduce round trips by allowing the second flight of messages to carry the encrypted Babel packet.
Neighbours compare IP addresses, and the one with the lower address opens the connection. Both sides then check the other's identity against credentials they already hold, and the connection is dropped if that fails. Only DTLS 1.2 or later is allowed, and a node throws away a connection that has gone quiet for long enough.
- Multicast HelloUnprotected discovery; this is how neighbours find each other.
- DTLS handshake from an ephemeral portThe lower-addressed node acts as the DTLS client.
- Mutual authentication resultBoth sides check the other against local credentials, or abort.
- Protected Babel packetsThe whole Babel packet travels inside DTLS.
§2.2What the Protection Covers on the Wire
Babel over DTLS sends all unicast Babel packets protected by DTLS. The entire Babel packet, from the Magic byte at the start of the Babel header to the last byte of the Babel packet trailer, is sent protected.
When sending packets, Babel over DTLS nodes MUST NOT send any TLVs over the unprotected babel port, with the exception of Hello TLVs without the Unicast flag set. They MUST NOT send any unprotected unicast packets. This ensures the confidentiality of the information in Babel packets, such as the network topology, by only sending it encrypted by DTLS. Unless some out-of-band neighbour discovery mechanism is available, nodes SHOULD periodically send unprotected Multicast Hellos so that new neighbours can be discovered. To maintain bidirectional reachability, nodes can either rely entirely on unprotected Multicast Hellos, or send protected Unicast Hellos in addition to them.
Because only unicast packets are protected, an implementor can take an existing Babel implementation and replace any TLV previously sent over multicast with a separate TLV sent over unicast for each neighbour, keeping the same contents, except for Hellos as described above. Some implementations could also change the contents of IHU TLVs when converting to unicast, to remove redundant information.
On reception, a node can receive Babel packets either protected over a DTLS connection or unprotected over the babel port, and unprotected packets are treated differently. Nodes MUST silently ignore any unprotected packet sent over unicast. When parsing an unprotected packet, a node MUST silently ignore all TLVs that are not of type Hello, and MUST also silently ignore any unprotected Hello with the Unicast flag set. Receiving an unprotected packet can still be used to discover new neighbours, even when all TLVs in that packet are ignored.
It is RECOMMENDED that nodes associate the state of their DTLS connection with their neighbour table. When a neighbour entry is flushed from the neighbour table, its associated DTLS state SHOULD be discarded, and the node SHOULD send a DTLS close_notify alert to the neighbour if it believes the link is still viable.
The whole Babel packet is encrypted, not just parts of it. The only thing sent in the clear is the periodic multicast Hello that says a node is here, so that new neighbours can find each other. Anything else that arrives unprotected is ignored.
- BabelThe routing protocol whose packets are being protected
- DTLSEncrypts and authenticates each unicast Babel packet
- UDPCarries the protected packets, port 6699
- IPCarries the UDP datagrams
§2.6Running Protected and Unprotected Babel Together
Implementations MAY implement both Babel over DTLS and unprotected Babel, and a node MAY simultaneously run both. A node running both MUST ensure that it runs them on separate interfaces, because the security properties of Babel over DTLS rely on ignoring unprotected Babel packets other than Multicast Hellos. An implementation MAY offer configuration options that allow unprotected Babel on some interfaces but not others, which effectively gives nodes on that interface the same access as authenticated nodes. That SHOULD NOT be done unless the interface has a mechanism to authenticate nodes at a lower layer, such as IPsec.
If Babel over DTLS and unprotected Babel are both operated on the same network, the Babel over DTLS implementation will receive unprotected Multicast Hellos and attempt to initiate a DTLS connection. These connection attempts can be sent to nodes that only run unprotected Babel, and those nodes will not respond. Babel over DTLS implementations SHOULD therefore rate-limit their DTLS connection attempts, to avoid causing undue load on the network.
A router can run the protected and the plain version of Babel at the same time, but only on different interfaces. On a shared network, a protected node will keep trying to reach plain nodes that never answer, so the attempts are rate-limited.
§3Packet Size and the Interface MTU
Compared with unprotected Babel, DTLS adds header, authentication tag, and possibly block-size padding overhead to every packet. That reduces the size of the Babel payload that can be carried. This document does not relax the packet size requirements in Section 4 of RFC 8966, but recommends that DTLS overhead be taken into account when computing the maximum packet size.
Nodes SHOULD compute the overhead of DTLS depending on the ciphersuites in use, and SHOULD NOT send Babel packets larger than the interface maximum transmission unit minus the overhead of IP, UDP and DTLS. Nodes MUST NOT send Babel packets larger than the attached interface's MTU adjusted for known lower-layer headers, at least UDP and IP, or 512 octets, whichever is larger, but not exceeding 2^16 minus 1 adjusted for lower-layer headers. Every Babel speaker MUST be able to receive packets that are as large as any attached interface's MTU adjusted for UDP and IP headers, or 512 octets, whichever is larger. This reception requirement does not take DTLS overhead into account, because the peer may not be able to compute the overhead of DTLS and the packet may be fragmented by lower layers.
Distinct DTLS connections can use different ciphers, which can have different amounts of per-packet overhead. The MTU to one neighbour can therefore be different from the MTU to another neighbour on the same link.
Encryption costs extra bytes on every packet, so a router has to send smaller Babel packets than it would otherwise. The rule is the interface's MTU minus the headers for IP, UDP and DTLS, and never below a floor of 512 octets.
§5Security Considerations
A malicious client might attempt to perform a high number of DTLS handshakes with a server. Since clients are not uniquely identified by the protocol until the handshake completes, and can be obfuscated with IPv6 temporary addresses, a server needs to mitigate the impact of such an attack. Attackers might also try to keep in-progress handshakes open for as long as possible, using a variant of the attack commonly known as Slowloris. Mitigating these attacks might involve limiting the rate of handshakes from a given subnet, or more advanced denial-of-service avoidance techniques beyond the scope of this document.
Babel over DTLS allows Multicast Hellos to be sent unprotected, so attackers can tamper with them. For example, an attacker could send erroneous values for the Seqno and Interval fields, causing bidirectional reachability detection to fail. While implementations MAY use Multicast Hellos for link quality estimation, they SHOULD also emit protected Unicast Hellos to prevent this class of denial-of-service attack.
DTLS protects against an attacker who replays valid packets, but it cannot detect an active on-path attacker who intercepts valid packets and resends them at a later time. That attack could be used to make a node believe it has bidirectional reachability to a neighbour even though that neighbour has disconnected from the network. To prevent it, nodes MUST discard the DTLS state associated with a neighbour after a finite time of not receiving valid DTLS packets, for example when that neighbour's IHU timer fires. Relying solely on the receipt of Hellos is not sufficient, because Multicast Hellos are sent unprotected. An attacker could also save some packets and replay them later in the hope of propagating stale routing information, which is mitigated by discarding received packets that have been reordered by more than two IHU intervals.
Two attacks remain. A flood of half-finished handshakes can tie up the server, so the rate of new connections should be limited. And the plaintext multicast Hello can be forged to break the reachability check, so a node should also send its Hellos over the protected connection and should forget a neighbour it has not heard from in a while.
- Handshake floodLimit the rate of handshakes from a given subnet.
- Forged Multicast HelloAlso send protected Unicast Hellos.
- Delayed replayDiscard DTLS state after a finite time without valid packets.
- Reordered packetsDrop packets reordered by more than two IHU intervals.