RFC 8968
Babel Routing Protocol over Datagram Transport Layer Security
RFC 8968: Babel Routing Protocol over Datagram Transport Layer Security π¦
okay bestie, this is RFC 8968 π Here's the title block tea:
- Request for Comments: 8968 πΈ
- Authors: A. DΓ©cimo (IRIF, University of Paris-Diderot), D. Schinazi (Google LLC), and J. Chroboczek (IRIF, University of Paris-Diderot) π
- Category: Standards Track β¨
- ISSN: 2070-1721
- Date: January 2021 π
- Obsoletes / Updates: there's no Obsoletes or Updates line in the title block, so it doesn't list any π
Abstract β¨
Okay so the Babel Routing Protocol doesn't have any way to check who your neighbours are, and it doesn't keep the messages between them private or unchanged π This spec fixes that by wrapping Babel in Datagram Transport Layer Security (DTLS) for authentication, integrity, and confidentiality π«Ά
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 π
Okay so the Babel routing protocol [RFC8966] has no built-in way to authenticate neighbours or protect the messages sent between them π¬ That's a big deal, because an attacker can send crafted Babel messages that trick a network into routing traffic to them, or to some poor under-resourced target, which causes denial of service. This document fixes that by 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 in this doc wraps Babel packets in DTLS, so it gets all of DTLS's good stuff: authentication, integrity, optional replay protection, confidentiality, and asymmetric keying π Which means it's expected to work in a pretty wide range of environments β¨
There's another option for securing Babel called Message Authentication Code (MAC) authentication for Babel (Babel-MAC) [RFC8967]. It's a lot more basic: authentication, integrity, and replay protection, but only with a small number of symmetric keys π You can find a comparison of the Babel security mechanisms and where each one fits in [RFC8966].
Also, Babel over DTLS gives you a single authentication domain. That means every node with the right credentials can share any and all routing information π«Ά
DTLS has several ways for nodes to identify themselves and prove they hold the secrets tied to those identities. This document doesn't pick one of them. The details of identity management are left to deployment profiles of Babel over DTLS π
2. Operation of the Protocol π
Babel over DTLS needs a few changes to how Babel normally works. First, DTLS is a client-server protocol, but Babel is peer-to-peer π€― Second, DTLS can only protect unicast communication, while Babel packets can go to both unicast and multicast destinations π
2.1. DTLS Connection Initiation
Babel over DTLS runs on a different port than unencrypted Babel. Every Babel over DTLS node MUST act as a DTLS server on a given UDP port, and it 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). The port for unencrypted Babel traffic is registered as the "babel" port (UDP port 6696, see Section 5 of [RFC8966]).
When a Babel node finds a new neighbour (usually by receiving an unencrypted multicast Babel packet), it compares the neighbour's IP address with its own, using network byte order. If the node's address is lower than the newly discovered neighbour's address, it acts as a client and connects to that neighbour. In other words, the node with the lowest address is the DTLS client for that pairwise relationship. For example, fe80::1:2 counts as lower than fe80::2:1 π¦
The node acting as the DTLS client starts its DTLS connection from an ephemeral UDP port. Nodes SHOULD make sure that new client DTLS connections use different ephemeral ports from recently used connections, so servers can tell the new and old DTLS connections apart. Alternatively, nodes could use DTLS connection identifiers [DTLS-CID] as a higher-entropy way to tell connections apart π§
When a node gets a new DTLS connection, it MUST check that the source IP address is either an IPv6 link-local address or an IPv4 address that belongs to the local network. If it's neither, it MUST reject the connection π« Nodes use mutual authentication, meaning both the client and the server are authenticated: 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 in [BCP195] MUST be followed to avoid attacks on DTLS. On top of that, nodes MUST only negotiate DTLS version 1.2 or higher. Nodes MUST use DTLS replay protection so attackers can't replay stale information π ββοΈ Nodes SHOULD drop packets that have been reordered by more than two IHU (I Heard You) intervals, so attackers can't make stale information stick around longer. And if a node gets a new DTLS connection from a neighbour it already has a connection with, the node MUST NOT discard the older connection until it has finished the handshake for the new one and validated the peer's identity π«Ά
2.2. Protocol Encoding
Babel over DTLS sends all unicast Babel packets protected by DTLS. The whole Babel packet, from the Magic byte at the start of the Babel header to the last byte of the Babel packet trailer, gets 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 one exception: Hello TLVs without the Unicast flag set. Babel over DTLS nodes MUST NOT send any unprotected unicast packets either. This keeps the info in Babel packets (for example, the network topology) confidential, since it only ever travels encrypted by DTLS π€« Unless some out-of-band neighbour discovery mechanism is available, nodes SHOULD periodically send unprotected Multicast Hellos so new neighbours can be discovered. To stay bidirectionally reachable, nodes can either rely entirely on unprotected Multicast Hellos, or send protected Unicast Hellos on top of the Multicast Hellos πΈ
Since Babel over DTLS only protects unicast packets, implementors may build Babel over DTLS by modifying a Babel implementation that has no DTLS support. They replace any TLV that was previously sent over multicast with a separate TLV sent over unicast for each neighbour. TLVs that were previously sent over multicast can be replaced with the same contents over unicast, except for 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 keep the security properties of this mechanism intact, unprotected packets get 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. Heads up though: receiving an unprotected packet can still be used to discover new neighbours, even when every TLV in that packet gets 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 gets flushed from the neighbour table (Appendix A of [RFC8966]), its associated DTLS state SHOULD be discarded. If the node thinks the link is still viable, it SHOULD send a DTLS close_notify alert to the neighbour π
2.6. Simultaneous Operation of Babel over DTLS and Unprotected Babel on a Node
Implementations MAY implement both Babel over DTLS and unprotected Babel π A node MAY also run both at the same time. BUT, and this is a big but π¨, a node running both MUST make sure 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. That effectively gives the nodes on that interface the same access as authenticated nodes, so it SHOULD NOT be done unless that interface has a mechanism to authenticate nodes at a lower layer (for example, IPsec) π
2.7. Simultaneous Operation of Babel over DTLS and Unprotected Babel on a Network
Okay so, if Babel over DTLS and unprotected Babel are both running on the same network, the Babel over DTLS implementation is going to receive unprotected Multicast Hellos and try to kick off a DTLS connection π« . Those connection attempts can land on nodes that only speak unprotected Babel, and those nodes are NOT going to respond. So, bestie, Babel over DTLS implementations SHOULD rate-limit their DTLS connection attempts so they don't dump 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 single packet π¦. That shrinks how much Babel payload can actually fit. This document does NOT relax the packet size requirements in Section 4 of [RFC8966], but it does RECOMMEND that DTLS overhead be taken into account when computing the maximum packet size π .
More precisely, nodes SHOULD compute the DTLS overhead based on the ciphersuites in use, and they SHOULD NOT send Babel packets larger than the interface 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 reception requirement does NOT take the DTLS overhead into account, because the peer may not be able to compute the DTLS overhead, and the packet may get fragmented by lower layers π§.
Also, distinct DTLS connections can use different ciphers, and those ciphers can have different amounts of per-packet overhead. So 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
β οΈ Okay bestie, this section is SERIOUS, so pay attention π.
A malicious client might try to perform a huge number of DTLS handshakes with a server. Clients aren't uniquely identified by the protocol until the handshake completes, and they can be obfuscated with IPv6 temporary addresses, so a server needs to mitigate the impact of this kind of attack. Attackers might also try to keep in-progress handshakes open for as long as possible, using variants of 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, which are beyond the scope of this document π.
Babel over DTLS allows sending Multicast Hellos unprotected, which means attackers can tamper with them π. For example, an attacker could send erroneous values for the Seqno and Interval fields, which would make bidirectional reachability detection 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 protects 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 make a node believe it has bidirectional reachability to a neighbour even though that neighbour has disconnected from the network. To prevent this, 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, because Multicast Hellos are sent unprotected.
Additionally, an attacker could save some packets and replay them later, hoping to propagate 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
π¦ where this page comes from
- ietf: rfc8968 2021-01
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms