idnits 2.17.1 draft-ietf-babel-dtls-08.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (August 9, 2019) is 1722 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 7525 (ref. 'BCP195') (Obsoleted by RFC 9325) == Outdated reference: A later version (-20) exists of draft-ietf-babel-rfc6126bis-12 ** Obsolete normative reference: RFC 6347 (Obsoleted by RFC 9147) == Outdated reference: A later version (-12) exists of draft-ietf-babel-hmac-08 == Outdated reference: A later version (-13) exists of draft-ietf-tls-dtls-connection-id-06 Summary: 2 errors (**), 0 flaws (~~), 4 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group A. Decimo 3 Internet-Draft IRIF, University of Paris-Diderot 4 Intended status: Standards Track D. Schinazi 5 Expires: February 10, 2020 Google LLC 6 J. Chroboczek 7 IRIF, University of Paris-Diderot 8 August 9, 2019 10 Babel Routing Protocol over Datagram Transport Layer Security 11 draft-ietf-babel-dtls-08 13 Abstract 15 The Babel Routing Protocol does not contain any means to authenticate 16 neighbours or provide integrity or confidentiality for messages sent 17 between them. This document specifies a mechanism to ensure these 18 properties, using Datagram Transport Layer Security (DTLS). 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at https://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on February 10, 2020. 37 Copyright Notice 39 Copyright (c) 2019 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (https://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 55 1.1. Specification of Requirements . . . . . . . . . . . . . . 2 56 1.2. Applicability . . . . . . . . . . . . . . . . . . . . . . 3 57 2. Operation of the Protocol . . . . . . . . . . . . . . . . . . 3 58 2.1. DTLS Connection Initiation . . . . . . . . . . . . . . . 3 59 2.2. Protocol Encoding . . . . . . . . . . . . . . . . . . . . 4 60 2.3. Transmission . . . . . . . . . . . . . . . . . . . . . . 4 61 2.4. Reception . . . . . . . . . . . . . . . . . . . . . . . . 5 62 2.5. Neighbour table entry . . . . . . . . . . . . . . . . . . 5 63 2.6. Simultaneous operation of both Babel over DTLS and 64 unprotected Babel on a Node . . . . . . . . . . . . . . . 5 65 2.7. Simultaneous operation of both Babel over DTLS and 66 unprotected Babel on a Network . . . . . . . . . . . . . 6 67 3. Interface Maximum Transmission Unit Issues . . . . . . . . . 6 68 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 69 5. Security Considerations . . . . . . . . . . . . . . . . . . . 7 70 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 71 6.1. Normative References . . . . . . . . . . . . . . . . . . 8 72 6.2. Informative References . . . . . . . . . . . . . . . . . 8 73 Appendix A. Performance Considerations . . . . . . . . . . . . . 9 74 Appendix B. Acknowledgments . . . . . . . . . . . . . . . . . . 9 75 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 77 1. Introduction 79 The Babel Routing Protocol [RFC6126bis] does not contain any means to 80 authenticate neighbours or protect messages sent between them. 81 Because of this, an attacker is able to send maliciously crafted 82 Babel messages which could lead a network to route traffic to an 83 attacker or to an under-resourced target causing denial of service. 84 This document specifies a mechanism to prevent such attacks, using 85 Datagram Transport Layer Security (DTLS) [RFC6347]. 87 1.1. Specification of Requirements 89 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 90 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 91 "OPTIONAL" in this document are to be interpreted as described in BCP 92 14 [RFC2119] [RFC8174] when, and only when, they appear in all 93 capitals, as shown here. 95 1.2. Applicability 97 The protocol described in this document protects Babel packets with 98 DTLS. As such, it inherits the features offered by DTLS, notably 99 authentication, integrity, replay protection, confidentiality and 100 asymmetric keying. It is therefore expected to be applicable in a 101 wide range of environments. 103 There exists another mechanism for securing Babel, namely Babel HMAC 104 authentication [BABEL-HMAC]. HMAC only offers basic features, namely 105 authentication, integrity and replay protection with a small number 106 of symmetric keys. A comparison of Babel security mechanisms and 107 their applicability can be found in [RFC6126bis]. 109 Note that Babel over DTLS provides a single authentication domain, 110 meaning that all nodes that have the right credentials can convey any 111 and all routing information. 113 2. Operation of the Protocol 115 Babel over DTLS requires some changes to how Babel operates. First, 116 DTLS is a client-server protocol, while Babel is a peer-to-peer 117 protocol. Second, DTLS can only protect unicast communication, while 118 Babel packets can be sent over to both unicast and multicast 119 destinations. 121 2.1. DTLS Connection Initiation 123 Babel over DTLS operates on a different port than unencrypted Babel. 124 All Babel over DTLS nodes MUST act as DTLS servers on a given UDP 125 port, and MUST listen for unencrypted Babel traffic on another UDP 126 port, which MUST be distinct from the first one. The default port 127 for Babel over DTLS is registered with IANA as the "babel-dtls" port 128 (UDP port TBD, see Section 4), and the port exchanging unencrypted 129 Babel traffic is registered as the "babel" port (UDP port 6696, see 130 Section 5 of [RFC6126bis]). 132 When a Babel node discovers a new neighbour (generally by receiving 133 an unencrypted multicast Babel packet), it compares the neighbour's 134 IP address with its own, using network byte ordering. If a node's 135 address is lower than the recently discovered neighbour's address, it 136 acts as a client and connects to the neighbour. In other words, the 137 node with the lowest address is the DTLS client for this pairwise 138 relationship. As an example, fe80::1:2 is considered lower than 139 fe80::2:1. 141 The node acting as DTLS client initiates its DTLS connection from an 142 ephemeral UDP port. Nodes SHOULD ensure that new client DTLS 143 connections use different ephemeral ports from recently used 144 connections to allow servers to differentiate between the new and old 145 DTLS connections. Alternatively, nodes could use DTLS connection 146 identifiers [DTLS-CID] as a higher-entropy mechanism to distinguish 147 between connections. 149 When a node receives a new DTLS connection, it MUST verify that the 150 source IP address is either an IPv6 link-local address or an IPv4 151 address belonging to the local network; if it is neither, it MUST 152 reject the connection. Nodes use mutual authentication 153 (authenticating both client and server); clients MUST authenticate 154 servers and servers MUST authenticate clients. Implementations MUST 155 support authenticating peers against a local store of credentials. 156 If either node fails to authenticate its peer against its local 157 policy, it MUST abort the DTLS handshake. The guidance given in 158 [BCP195] MUST be followed to avoid attacks on DTLS. Additionally, 159 nodes MUST only negotiate DTLS version 1.2 or higher. Nodes MUST use 160 DTLS replay protection to prevent attackers from replaying stale 161 information. Nodes SHOULD drop packets that have been reordered by 162 more than two IHU (I Heard You) intervals, to avoid letting attackers 163 make stale information last longer. If a node receives a new DTLS 164 connection from a neighbour to whom it already has a connection, the 165 node MUST NOT discard the older connection until it has completed the 166 handshake of the new one and validated the identity of the peer. 168 2.2. Protocol Encoding 170 Babel over DTLS sends all unicast Babel packets protected by DTLS. 171 The entire Babel packet, from the Magic byte at the start of the 172 Babel header to the last byte of the Babel packet trailer, is sent 173 protected by DTLS. 175 2.3. Transmission 177 When sending packets, Babel over DTLS nodes MUST NOT send any TLVs 178 over the unprotected "babel" port, with the exception of Hello TLVs 179 without the Unicast flag set. Babel over DTLS nodes MUST NOT send 180 any unprotected unicast packets. This ensures the confidentiality of 181 the information sent in Babel packets (e.g., the network topology) by 182 only sending it encrypted by DTLS. Unless some out-of-band neighbour 183 discovery mechanism is available, nodes SHOULD periodically send 184 unprotected multicast Hellos to ensure discovery of new neighbours. 185 In order to maintain bidirectional reachability, nodes can either 186 rely entirely on unprotected multicast Hellos, or send protected 187 unicast Hellos in addition to the multicast Hellos. 189 Since Babel over DTLS only protects unicast packets, implementors may 190 implement Babel over DTLS by modifying an implementation of Babel 191 without DTLS support, and replacing any TLV previously sent over 192 multicast with a separate TLV sent over unicast for each neighbour. 193 TLVs previously sent over multicast can be replaced with the same 194 contents over unicast, with the exception of Hellos as described 195 above. Some implementations could also change the contents of IHU 196 TLVs when converting to unicast in order to remove redundant 197 information. 199 2.4. Reception 201 Babel over DTLS nodes can receive Babel packets either protected over 202 a DTLS connection, or unprotected directly over the "babel" port. To 203 ensure the security properties of this mechanism, unprotected packets 204 are treated differently. Nodes MUST silently ignore any unprotected 205 packet sent over unicast. When parsing an unprotected packet, a node 206 MUST silently ignore all TLVs that are not of type Hello. Nodes MUST 207 also silently ignore any unprotected Hello with the Unicast flag set. 208 Note that receiving an unprotected packet can still be used to 209 discover new neighbours, even when all TLVs in that packet are 210 silently ignored. 212 2.5. Neighbour table entry 214 It is RECOMMENDED for nodes to associate the state of their DTLS 215 connection with their neighbour table. When a neighbour entry is 216 flushed from the neighbour table (Appendix A of [RFC6126bis]), its 217 associated DTLS state SHOULD be discarded. The node SHOULD send a 218 DTLS close_notify alert to the neighbour if it believes the link is 219 still viable. 221 While DTLS provides protection against an attacker that replays valid 222 packets, DTLS is not able to detect when an active on-path attacker 223 intercepts valid packets and resends them at a later time. This 224 attack could be used to make a node believe it has bidirectional 225 reachability to a neighbour even though that neighbour has 226 disconnected from the network. To prevent this attack, nodes MUST 227 discard the DTLS state associated with a neighbour after a finite 228 time of not receiving valid DTLS packets. This can be implemented 229 by, for example, discarding a neighbour's DTLS state when its 230 associated IHU timer fires. Note that relying solely on the receipt 231 of Hellos is not sufficient as multicast Hellos are sent unprotected. 233 2.6. Simultaneous operation of both Babel over DTLS and unprotected 234 Babel on a Node 236 Implementations MAY implement both Babel over DTLS and unprotected 237 Babel. Additionally, a node MAY simultaneously run both Babel over 238 DTLS and unprotected Babel. However, a node running both MUST ensure 239 that it runs them on separate interfaces, as the security properties 240 of Babel over DTLS rely on not accepting unprotected Babel packets 241 (other than multicast Hellos). A node MAY allow configuration 242 options to allow unprotected Babel on some interfaces but not others; 243 this effectively gives nodes on that interface the same access as 244 authenticated nodes, and SHOULD NOT be done unless that interface has 245 a mechanism to authenticate nodes at a lower layer (e.g., IPsec). 247 2.7. Simultaneous operation of both Babel over DTLS and unprotected 248 Babel on a Network 250 If Babel over DTLS and unprotected Babel are both operated on the 251 same network, the Babel over DTLS implementation will receive 252 unprotected multicast Hellos and attempt to initiate a DTLS 253 connection. These connection attempts can be sent to nodes that only 254 run unprotected Babel, who will not respond. Babel over DTLS 255 implementations SHOULD therefore rate-limit their DTLS connection 256 attempts to avoid causing undue load on the network. 258 3. Interface Maximum Transmission Unit Issues 260 Compared to unprotected Babel, DTLS adds header, authentication tag 261 and possibly block-size padding overhead to every packet. This 262 reduces the size of the Babel payload that can be carried. This 263 document does not relax the packet size requirements in Section 4 of 264 [RFC6126bis], but recommends that DTLS overhead be taken into account 265 when computing maximum packet size. 267 More precisely, nodes SHOULD compute the overhead of DTLS depending 268 on the ciphersuites in use, and SHOULD NOT send Babel packets larger 269 than the interface maximum transmission unit (MTU) minus the overhead 270 of IP, UDP and DTLS. Nodes MUST NOT send Babel packets larger than 271 the attached interface's MTU adjusted for known lower-layer headers 272 (at least UDP and IP) or 512 octets, whichever is larger, but not 273 exceeding 2^16 - 1 adjusted for lower-layer headers. Every Babel 274 speaker MUST be able to receive packets that are as large as any 275 attached interface's MTU adjusted for UDP and IP headers or 512 276 octets, whichever is larger. Note that this requirement on reception 277 does not take into account the overhead of DTLS because the peer may 278 not have the ability to compute the overhead of DTLS and the packet 279 may be fragmented by lower layers. 281 Note that distinct DTLS connections can use different ciphers, which 282 can have different amounts of overhead per packet. Therefore, the 283 MTU to one neighbour can be different from the MTU to another 284 neighbour on the same link. 286 4. IANA Considerations 288 If this document is approved, IANA is requested to register a UDP 289 port number, called "babel-dtls", for use by Babel over DTLS. 290 Details of the request to IANA are as follows: 292 o Assignee: IESG, iesg@ietf.org 294 o Contact Person: IETF Chair, chair@ietf.org 296 o Transport Protocols: UDP only 298 o Service Code: None 300 o Service Name: babel-dtls 302 o Desired Port Number: 6699 304 o Description: Babel Routing Protocol over DTLS 306 o Reference: This document 308 o Defined TXT Keys: None 310 5. Security Considerations 312 A malicious client might attempt to perform a high number of DTLS 313 handshakes with a server. As the clients are not uniquely identified 314 by the protocol until the handshake completes and can be obfuscated 315 with IPv6 temporary addresses, a server needs to mitigate the impact 316 of such an attack. Note that attackers might attempt to keep in- 317 progress handshakes open for as long as possible by using variants on 318 the attack commonly known as Slowloris [SLOWLORIS]. Mitigating these 319 attacks might involve rate limiting handshakes from a given subnet or 320 more advanced denial of service avoidance techniques beyond the scope 321 of this document. 323 Babel over DTLS allows sending multicast Hellos unprotected; 324 attackers can therefore tamper with them. For example, an attacker 325 could send erroneous values for the Seqno and Interval fields, 326 causing bidirectional reachability detection to fail. While 327 implementations MAY use multicast Hellos for link quality estimation, 328 they SHOULD also emit protected unicast Hellos to prevent this class 329 of denial-of-service attack. 331 6. References 333 6.1. Normative References 335 [BCP195] Sheffer, Y., Holz, R., and P. Saint-Andre, 336 "Recommendations for Secure Use of Transport Layer 337 Security (TLS) and Datagram Transport Layer Security 338 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 339 2015, . 341 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 342 Requirement Levels", BCP 14, RFC 2119, 343 DOI 10.17487/RFC2119, March 1997, 344 . 346 [RFC6126bis] 347 Chroboczek, J. and D. Schinazi, "The Babel Routing 348 Protocol", Internet Draft draft-ietf-babel-rfc6126bis-12, 349 August 2019. 351 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 352 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 353 January 2012, . 355 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 356 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 357 May 2017, . 359 6.2. Informative References 361 [BABEL-HMAC] 362 Do, C., Kolodziejak, W., and J. Chroboczek, "Babel 363 Cryptographic Authentication", Internet Draft draft-ietf- 364 babel-hmac-08, June 2019. 366 [DTLS-CID] 367 Rescorla, E., Tschofenig, H., Fossati, T., and T. Gondrom, 368 "Connection Identifiers for DTLS 1.2", Internet Draft 369 draft-ietf-tls-dtls-connection-id-06, July 2019. 371 [RFC7250] Wouters, P., Ed., Tschofenig, H., Ed., Gilmore, J., 372 Weiler, S., and T. Kivinen, "Using Raw Public Keys in 373 Transport Layer Security (TLS) and Datagram Transport 374 Layer Security (DTLS)", RFC 7250, DOI 10.17487/RFC7250, 375 June 2014, . 377 [RFC7918] Langley, A., Modadugu, N., and B. Moeller, "Transport 378 Layer Security (TLS) False Start", RFC 7918, 379 DOI 10.17487/RFC7918, August 2016, 380 . 382 [RFC7924] Santesson, S. and H. Tschofenig, "Transport Layer Security 383 (TLS) Cached Information Extension", RFC 7924, 384 DOI 10.17487/RFC7924, July 2016, 385 . 387 [RFC8094] Reddy, T., Wing, D., and P. Patil, "DNS over Datagram 388 Transport Layer Security (DTLS)", RFC 8094, 389 DOI 10.17487/RFC8094, February 2017, 390 . 392 [SLOWLORIS] 393 Hansen, R., "Welcome to Slowloris...", June 2009, 394 . 397 Appendix A. Performance Considerations 399 To reduce the number of octets taken by the DTLS handshake, 400 especially the size of the certificate in the ServerHello (which can 401 be several kilobytes), Babel peers can use raw public keys [RFC7250] 402 or the Cached Information Extension [RFC7924]. The Cached 403 Information Extension avoids transmitting the server's certificate 404 and certificate chain if the client has cached that information from 405 a previous TLS handshake. TLS False Start [RFC7918] can reduce round 406 trips by allowing the TLS second flight of messages 407 (ChangeCipherSpec) to also contain the (encrypted) Babel packet. 409 Appendix B. Acknowledgments 411 The authors would like to thank Roman Danyliw, Donald Eastlake, 412 Thomas Fossati, Benjamin Kaduk, Gabriel Kerneis, Mirja Kuehlewind, 413 Antoni Przygienda, Henning Rogge, Dan Romascanu, Barbara Stark, 414 Markus Stenberg, Dave Taht, Martin Thomson, Sean Turner and Martin 415 Vigoureux for their input and contributions. The performance 416 considerations in this document were inspired from the ones for DNS 417 over DTLS [RFC8094]. 419 Authors' Addresses 420 Antonin Decimo 421 IRIF, University of Paris-Diderot 422 Paris 423 France 425 Email: antonin.decimo@gmail.com 427 David Schinazi 428 Google LLC 429 1600 Amphitheatre Parkway 430 Mountain View, California 94043 431 USA 433 Email: dschinazi.ietf@gmail.com 435 Juliusz Chroboczek 436 IRIF, University of Paris-Diderot 437 Case 7014 438 75205 Paris Cedex 13 439 France 441 Email: jch@irif.fr