draft-ietf-babel-dtls-00.txt   draft-ietf-babel-dtls-01.txt 
Network Working Group A. Decimo Network Working Group A. Decimo
Internet-Draft IRIF, University of Paris-Diderot Internet-Draft IRIF, University of Paris-Diderot
Updates: 6126bis (if approved) D. Schinazi Updates: 6126bis (if approved) D. Schinazi
Intended status: Standards Track Apple Inc. Intended status: Standards Track Apple Inc.
Expires: February 16, 2019 J. Chroboczek Expires: April 11, 2019 J. Chroboczek
IRIF, University of Paris-Diderot IRIF, University of Paris-Diderot
August 15, 2018 October 8, 2018
Babel Routing Protocol over Datagram Transport Layer Security Babel Routing Protocol over Datagram Transport Layer Security
draft-ietf-babel-dtls-00 draft-ietf-babel-dtls-01
Abstract Abstract
This documents describes how to use Datagram Transport Layer Security The Babel Routing Protocol does not contain any means to authenticate
(DTLS) to secure the Babel Routing Protocol. neighbours or protect messages sent between them. This documents
describes a mechanism to ensure these properties, using Datagram
Transport Layer Security (DTLS). This document updates RFC 6126bis.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on February 16, 2019. This Internet-Draft will expire on April 11, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Specification of Requirements . . . . . . . . . . . . . . 3 1.1. Specification of Requirements . . . . . . . . . . . . . . 2
1.2. Applicability . . . . . . . . . . . . . . . . . . . . . . 2
2. Operation of the Protocol . . . . . . . . . . . . . . . . . . 3 2. Operation of the Protocol . . . . . . . . . . . . . . . . . . 3
3. Handling protected and unprotected data . . . . . . . . . . . 3 2.1. DTLS Connection Initiation . . . . . . . . . . . . . . . 3
3.1. Cleartext and DTLS on the same port . . . . . . . . . . . 3 2.2. Protocol Encoding . . . . . . . . . . . . . . . . . . . . 4
3.2. Cleartext and DTLS on separate ports . . . . . . . . . . 4 2.3. Transmission . . . . . . . . . . . . . . . . . . . . . . 4
4. Establishing and handling Babel over DTLS sessions . . . . . 4 2.4. Reception . . . . . . . . . . . . . . . . . . . . . . . . 4
4.1. Session Initiation . . . . . . . . . . . . . . . . . . . 4 2.5. Neighbour table entry . . . . . . . . . . . . . . . . . . 4
4.2. Transmission . . . . . . . . . . . . . . . . . . . . . . 4 3. Interface Maximum Transmission Unit Issues . . . . . . . . . 5
4.3. Reception . . . . . . . . . . . . . . . . . . . . . . . . 5 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5
4.4. Neighbour flush . . . . . . . . . . . . . . . . . . . . . 5 5. Security Considerations . . . . . . . . . . . . . . . . . . . 5
5. Interface MTU Issues . . . . . . . . . . . . . . . . . . . . 5 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 5
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 6.1. Normative References . . . . . . . . . . . . . . . . . . 6
7. Security Considerations . . . . . . . . . . . . . . . . . . . 6 6.2. Informative References . . . . . . . . . . . . . . . . . 6
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 6
8.1. Normative References . . . . . . . . . . . . . . . . . . 6
8.2. Informative References . . . . . . . . . . . . . . . . . 7
Appendix A. Performance Considerations . . . . . . . . . . . . . 7 Appendix A. Performance Considerations . . . . . . . . . . . . . 7
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7
1. Introduction 1. Introduction
Babel over DTLS is a security protocol for the Babel routing protocol The Babel Routing Protocol [RFC6126bis] does not contain any means to
[RFC6126bis], that uses Datagram Transport Layer Security (DTLS) authenticate neighbours or protect messages sent between them.
[RFC6347]. This document describes how to protect Babel with Babel Because of this, an attacker is able to send maliciously crafted
over DTLS. Babel messages which could lead a network to route traffic to an
attacker or to an under-resourced target causing denial of service.
The motivation for proposing Babel over DTLS is that DTLS provides a This documents describes a mechanism to prevent such attacks, using
sub-layer of security that is well-defined, whose security has been Datagram Transport Layer Security (DTLS) [RFC6347].
shown, and that has multiple implementations. Babel over DTLS has
the following properties, inherited from DTLS:
o authentication of peers;
o integrity of data;
o confidentiality of data;
o use of asymmetric keys.
The main change to the Babel protocol is that Babel over DTLS
requires most packets to be sent over unicast.
A malicious entity in range of a non-secured deployment of Babel can
learn properties of the network, but also reroute legitimate traffic
by advertising routes with a low metric.
1.1. Specification of Requirements 1.1. Specification of Requirements
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP "OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
2. Operation of the Protocol 1.2. Applicability
At first sight, there are incompatibilities between Babel and DTLS.
Babel is a pure peer-to-peer protocol, while DTLS is a two parties
client-server protocol. A Babel implementation typically uses
unicast and multicast, while DTLS can only protect unicast.
The problem of assigning a client of server role for a DTLS handshake
to Babel nodes is solved by a simple arbitrary choice. The addresses
of the two nodes are compared, and the node with the lowest address
acts as the server.
Babel is sufficiently flexible to work almost without multicast. In
Babel over DTLS, almost all packets are sent via unicast. Packets
that would have been sent via unicast needs to be duplicated and sent
to all of the original recipients via unicast. The cost of
duplication is balanced by the fact that on networks with low
throughput, unicast is often far more effective than multicast. Only
neighbour discovery packets are sent via multicast, as they do not
represent a security threat.
3. Handling protected and unprotected data
A Babel node needs to receive unprotected data for bootstrapping
reasons, as well as protected data. Protected and unprotected
traffic needs to be differentiated.
[ NOTE TO READER: AUTHORS ARE CONSIDERING THESE TWO OPTIONS BUT ONLY
ONE WILL BE RETAINED IN THE FINAL DOCUMENT. ]
3.1. Cleartext and DTLS on the same port
In this approach, Babel and Babel over DTLS traffic is received on
the same port. The DTLS client port, the DTLS server port, and the
Babel port (6696) are equal. When a packet is received, it is
unconditionally treated as a DTLS packet and decrypted.
o If the decryption is successful, the decrypted content is parsed
as a Babel packet and the node acts on it.
o Otherwise, the packet is parsed as a Babel packet and the node
MUST silently ignore all TLVs except Hello and IHU.
Since the source port is fixed as 6696, a node that loses its DTLS
state (e.g. if it reboots), will reuse the same source and
destination ports for the new session. In order to avoid discarding
these new packets, nodes receiving an unexpected DTLS ClientHello
MUST proceed with a new handshake and MUST NOT destroy the existing
session until the new session's handshake completes to avoid denial
of service attacks (Section 4.2.8 of [RFC6347]).
3.2. Cleartext and DTLS on separate ports The current two main mechanisms for securing Babel are Babel over
DTLS (as described in this document) and Babel Cryptographic
Authentication [BabelHMAC]. The latter has the advantages of being
simpler and not requiring a dependency on DTLS, therefore
implementers are encouraged to consider it in preference to the
mechanism defined in this document whenever both are applicable to a
given deployment. Both mechanisms ensure integrity of messages and
prevent message replay.
In this approach, a different port (number TBD) is allocated by IANA However, DTLS offers several features that are not provided by Babel
for Babel over DTLS traffic. The Babel over DTLS server listens on Cryptographic Authentication, therefore Babel over DTLS is applicable
this port and Babel over DTLS clients use an ephemeral source port to in cases where those features are needed. Examples of such features
initiate outbound DTLS connections. Unprotected Babel messages are include:
sent and received over the standard Babel port (6696). When parsing
unprotected packets, all Babel TLVs except Hello and IHU MUST be
silently ignored.
4. Establishing and handling Babel over DTLS sessions o Asymmetric keys. DTLS allows authentication via asymmetric keys,
which allows a finer granularity of trust per-peer, and allows for
revocation.
4.1. Session Initiation o Confidentiality of data. DTLS encrypts payloads, preventing an
on-link attacker from observing the routing table.
When a node A acquires a new neighbour B (e.g. when A first receives 2. Operation of the Protocol
a Babel packet from B, see Section 3.4 of [RFC6126bis]),
o if the IP address A uses to send and receive Babel packets is Babel over DTLS requires changes to how Babel is operated, for two
smaller than the source IP address of the received Babel packet reasons. Firstly, because DTLS introduces the concepts of client and
from B, A initialises its DTLS state as a server for peer B; server, while Babel is a peer-to-peer protocol. Secondly, DTLS can
only protect unicast, while Babel TLVs can be sent over both unicast
and multicast.
o otherwise, A initialises its DTLS state as a client for peer B, 2.1. DTLS Connection Initiation
and initiates a DTLS handshake.
Once the handshake succeeds and a DTLS session is established, nodes All Babel over DTLS nodes MUST act as DTLS servers on the "babel-
send all unicast Babel messages over DTLS. dtls" port (UDP port TBD), and MUST listen for multicast traffic on
the unencrypted "babel" port (UDP port 6696). When a Babel node
discovers a new neighbor (generally by receiving an unencrypted
multicast Babel packet), it compares the neighbour's IPv6 link-local
address with its own, using network byte ordering. If a node's
address is lower than the recently discovered neighbor's address, it
acts as a client and connects to the neighbor. 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. When a node receives a new DTLS
connection, it MUST verify the source IP address, and reject the
connection if the address is not an IPv6 link-local address.
4.2. Transmission 2.2. Protocol Encoding
Since DTLS cannot secure multicast, nodes SHOULD send all TLVs over Babel over DTLS sends all unicast Babel packets encrypted by DTLS.
unicast DTLS, if possible. All TLVs that are not Hello nor IHU MUST The entire Babel packet, from the Magic byte at the start of the
be sent over unicast DTLS. Hello and IHU TLVs MAY be sent either Babel header to the last byte of the Babel packet trailer, is sent
over unicast DTLS or unprotected multicast. Nodes MUST NOT send any protected by DTLS.
unprotected packets over unicast.
4.3. Reception 2.3. Transmission
Packets received over unicast DTLS are parsed the same way as any When sending packets, Babel over DTLS nodes MUST NOT send any TLVs
packets in the original specification of Babel. Nodes MUST parse over the unprotected "babel" port, with the exception of Hello TLVs
unprotected packets received over multicast, however they MUST without the Unicast flag set. Babel over DTLS nodes MUST NOT send
silently ignore any TLV that is not Hello or IHU. Unprotected any unprotected unicast packet. Unless some out-of-band neighbor
packets received over unicast MUST be silently ignored. 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 on unprotected multicast Hellos, or also send protected unicast
Hellos.
4.4. Neighbour flush Since Babel over DTLS only protects unicast packets, implementors may
implement Babel over DTLS by modifying an unprotected implementation
of Babel, and replacing any TLV sent over multicast with a separate
TLV sent over unicast for each neighbour.
When a neighbour entry is flushed from the neighbour table 2.4. Reception
(Appendix A of [RFC6126bis]), its associated DTLS state SHOULD be
discarded. The node MAY send a DTLS close_notify alert to the
neighbour.
5. Interface MTU Issues 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 neighbors, even when all TLVs in that packet are
silently ignored.
Compared to normal Babel, DTLS adds at least 13 octets of header, 2.5. Neighbour table entry
plus cipher and authentication overhead to every packet. This
reduces the size of the Babel payload that can be carried.
As stated in Section 4 of [RFC6126bis], in order to minimise the It is RECOMMENDED for nodes to associate the state of their DTLS
number of packets being sent while avoiding lower-layer connection with their neighbour table. When a neighbour entry is
fragmentation, a Babel node SHOULD attempt to maximise the size of flushed from the neighbour table (Appendix A of [RFC6126bis]), its
the packets it sends, up to the outgoing interface's MTU adjusted for associated DTLS state SHOULD be discarded. The node MAY send a DTLS
lower-layer headers (28 octets for UDP over IPv4, 48 octets for UDP close_notify alert to the neighbour.
over IPv6). It MUST NOT send packets larger than the attached
interface's MTU adjusted for lower-layer headers 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 lower-
layer headers or 512 octets, whichever is larger. Babel packets MUST
NOT be sent in IPv6 Jumbograms.
Theses requirements are retained by this specification, but are 3. Interface Maximum Transmission Unit Issues
extended to take DTLS overhead into account as follows. The Babel
node MUST ensure that the DTLS datagram size does not exceed the
interface MTU, i.e., each DTLS record MUST fit within a single
datagram, as required by [RFC6347]. A Babel node MUST consider the
amount of record expansion expected by the DTLS processing when
calculating the maximum size of Babel packet that fits within the
interface MTU. The overhead can be computed as DTLS overhead of 13
octets + authentication overhead of the negotiated DTLS cipher suite
+ block padding (Section 4.1.1.1 of [RFC6347]).
6. IANA Considerations 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. Nodes
SHOULD compute the overhead of DTLS depending on the ciphers in use,
and SHOULD NOT send Babel packets larger than the interface maximum
transmission unit (MTU) minus the overhead of lower layers (IP, UDP
and DTLS). This helps reduce the likelihood of lower-layer
fragmentation which would negatively impact performance and
reliability. 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. Babel packets MUST NOT be sent in
IPv6 Jumbograms.
If the final version of this specification uses the standard Babel 4. IANA Considerations
port for unprotected packets and DTLS Section 3.1, no actions are
required from IANA.
If the final version of this specification uses separate ports for If this document is approved, IANA is requested to register a UDP
unprotected packets and DTLS Section 3.2, IANA is requested to assign port number, called "babel-dtls", for use by Babel over DTLS.
a UDP port with label "Babel_DTLS".
7. Security Considerations 5. Security Considerations
The interaction between two Babel peers requires Datagram Transport The interaction between two Babel peers requires Datagram Transport
Layer Security (DTLS) with a cipher suite offering confidentiality Layer Security (DTLS) with a cipher suite offering confidentiality
protection. The guidance given in [RFC7525] MUST be followed to protection. The guidance given in [RFC7525] MUST be followed to
avoid attacks on DTLS. The DTLS client SHOULD use the TLS avoid attacks on DTLS. The DTLS client SHOULD use the TLS
Certificate Status Request extension (Section 8 of [RFC6066]). Certificate Status Request extension (Section 8 of [RFC6066]).
A malicious client might attempt to perform a high number of DTLS A malicious client might attempt to perform a high number of DTLS
handshakes with a server. As the clients are not uniquely identified handshakes with a server. As the clients are not uniquely identified
by the protocol and can be obfuscated with IPv4 address sharing and by the protocol and can be obfuscated with IPv4 address sharing and
with IPv6 temporary addresses, a server needs to mitigate the impact with IPv6 temporary addresses, a server needs to mitigate the impact
of such an attack. Such mitigation might involve rate limiting of such an attack. Such mitigation might involve rate limiting
handshakes from a given subnet or more advanced DoS/DDoS avoidance handshakes from a given subnet or more advanced denial of service
techniques beyond the scope of this document. avoidance techniques beyond the scope of this document.
8. References
8.1. Normative References 6. References
6.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC6126bis] [RFC6126bis]
Chroboczek, J. and D. Schinazi, "The Babel Routing Chroboczek, J. and D. Schinazi, "The Babel Routing
Protocol", Internet Draft draft-ietf-babel-rfc6126bis-05, Protocol", Internet Draft draft-ietf-babel-rfc6126bis-05,
October 2017. May 2018.
[RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer
Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347,
January 2012, <https://www.rfc-editor.org/info/rfc6347>. January 2012, <https://www.rfc-editor.org/info/rfc6347>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
8.2. Informative References 6.2. Informative References
[BabelHMAC]
Do, C., Kolodziejak, W., and J. Chroboczek, "Babel
Cryptographic Authentication", Internet Draft draft-ietf-
babel-hmac-00, August 2018.
[RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS)
Extensions: Extension Definitions", RFC 6066, Extensions: Extension Definitions", RFC 6066,
DOI 10.17487/RFC6066, January 2011, DOI 10.17487/RFC6066, January 2011,
<https://www.rfc-editor.org/info/rfc6066>. <https://www.rfc-editor.org/info/rfc6066>.
[RFC7250] Wouters, P., Ed., Tschofenig, H., Ed., Gilmore, J., [RFC7250] Wouters, P., Ed., Tschofenig, H., Ed., Gilmore, J.,
Weiler, S., and T. Kivinen, "Using Raw Public Keys in Weiler, S., and T. Kivinen, "Using Raw Public Keys in
Transport Layer Security (TLS) and Datagram Transport Transport Layer Security (TLS) and Datagram Transport
Layer Security (DTLS)", RFC 7250, DOI 10.17487/RFC7250, Layer Security (DTLS)", RFC 7250, DOI 10.17487/RFC7250,
 End of changes. 36 change blocks. 
173 lines changed or deleted 142 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/