| < draft-tschofenig-tls-dtls-rrc-00.txt | draft-tschofenig-tls-dtls-rrc-01.txt > | |||
|---|---|---|---|---|
| TLS T. Fossati | TLS T. Fossati | |||
| Internet-Draft H. Tschofenig, Ed. | Internet-Draft H. Tschofenig, Ed. | |||
| Updates: 6347 (if approved) Arm Limited | Updates: 6347 (if approved) Arm Limited | |||
| Intended status: Standards Track July 08, 2019 | Intended status: Standards Track March 2, 2020 | |||
| Expires: January 9, 2020 | Expires: September 3, 2020 | |||
| Return Routability Check for DTLS 1.2 and DTLS 1.3 | Return Routability Check for DTLS 1.2 and DTLS 1.3 | |||
| draft-tschofenig-tls-dtls-rrc-00 | draft-tschofenig-tls-dtls-rrc-01 | |||
| Abstract | Abstract | |||
| This document specifies a return routability check for use in context | This document specifies a return routability check for use in context | |||
| of the Connection ID (CID) construct for the Datagram Transport Layer | of the Connection ID (CID) construct for the Datagram Transport Layer | |||
| Security (DTLS) protocol versions 1.2 and 1.3. | Security (DTLS) protocol versions 1.2 and 1.3. | |||
| 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 | |||
| skipping to change at page 1, line 33 ¶ | skipping to change at page 1, line 33 ¶ | |||
| 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 January 9, 2020. | This Internet-Draft will expire on September 3, 2020. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2019 IETF Trust and the persons identified as the | Copyright (c) 2020 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 | |||
| skipping to change at page 2, line 21 ¶ | skipping to change at page 2, line 21 ¶ | |||
| the copyright in such materials, this document may not be modified | the copyright in such materials, this document may not be modified | |||
| outside the IETF Standards Process, and derivative works of it may | outside the IETF Standards Process, and derivative works of it may | |||
| not be created outside the IETF Standards Process, except to format | not be created outside the IETF Standards Process, except to format | |||
| it for publication as an RFC or to translate it into languages other | it for publication as an RFC or to translate it into languages other | |||
| than English. | than English. | |||
| Table of Contents | Table of Contents | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | |||
| 2. Conventions and Terminology . . . . . . . . . . . . . . . . . 3 | 2. Conventions and Terminology . . . . . . . . . . . . . . . . . 3 | |||
| 3. Application Layer Return Routability Check . . . . . . . . . 3 | 3. The Return Routability Check Message . . . . . . . . . . . . 3 | |||
| 4. The Return Routability Check Message . . . . . . . . . . . . 4 | 4. RRC Example . . . . . . . . . . . . . . . . . . . . . . . . . 4 | |||
| 5. RRC Example . . . . . . . . . . . . . . . . . . . . . . . . . 5 | 5. Security and Privacy Considerations . . . . . . . . . . . . . 7 | |||
| 6. Security and Privacy Considerations . . . . . . . . . . . . . 7 | 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 | |||
| 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 | 7. Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . 7 | |||
| 8. Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . 7 | 8. Normative References . . . . . . . . . . . . . . . . . . . . 7 | |||
| 9. Normative References . . . . . . . . . . . . . . . . . . . . 7 | Appendix A. History . . . . . . . . . . . . . . . . . . . . . . 8 | |||
| Appendix A. History . . . . . . . . . . . . . . . . . . . . . . 9 | Appendix B. Acknowledgements . . . . . . . . . . . . . . . . . . 8 | |||
| Appendix B. Working Group Information . . . . . . . . . . . . . 9 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8 | |||
| Appendix C. Acknowledgements . . . . . . . . . . . . . . . . . . 9 | ||||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 | ||||
| 1. Introduction | 1. Introduction | |||
| In "classical" DTLS, selecting a security context of an incoming DTLS | In "classical" DTLS, selecting a security context of an incoming DTLS | |||
| record is accomplished with the help of the 5-tuple, i.e. source IP | record is accomplished with the help of the 5-tuple, i.e. source IP | |||
| address, source port, transport protocol, destination IP address, and | address, source port, transport protocol, destination IP address, and | |||
| destination port. Changes to this 5 tuple can happen for a variety | destination port. Changes to this 5 tuple can happen for a variety | |||
| reasons over the lifetime of the DTLS session. In the IoT content | reasons over the lifetime of the DTLS session. In the IoT context, | |||
| NAT rebinding is a common reason with sleepy devices. Other examples | NAT rebinding is common with sleepy devices. Other examples include | |||
| include end host mobility and multi-homing. Without CID, if the | end host mobility and multi-homing. Without CID, if the source IP | |||
| source IP address and/or source port changes during the lifetime of | address and/or source port changes during the lifetime of an ongoing | |||
| an ongoing DTLS session then the receiver will be unable to locate | DTLS session then the receiver will be unable to locate the correct | |||
| the correct security context. As a result, the DTLS handshake has to | security context. As a result, the DTLS handshake has to be re-run. | |||
| be re-run. | Of course, it is not necessary to re-run the full handshake if | |||
| session resumption is supported and negotiated. | ||||
| A CID is an identifier carried in the record layer header of a DTLS | A CID is an identifier carried in the record layer header of a DTLS | |||
| datagram that gives the receiver additional information for selecting | datagram that gives the receiver additional information for selecting | |||
| the appropriate security context. The CID mechanism has been | the appropriate security context. The CID mechanism has been | |||
| specified in [I-D.ietf-tls-dtls-connection-id] for DTLS 1.2 and in | specified in [I-D.ietf-tls-dtls-connection-id] for DTLS 1.2 and in | |||
| [I-D.ietf-tls-dtls13] for DTLS 1.3. | [I-D.ietf-tls-dtls13] for DTLS 1.3. | |||
| An on-path adversary could intercept and modify the source IP address | Section 6 of [I-D.ietf-tls-dtls-connection-id] describes how the use | |||
| (and the source port). Even if receiver checks the authenticity and | of CID increases the attack surface by providing both on-path and | |||
| freshness of the packet, the recipient is fooled into changing the | off-path attackers an opportunity for (D)DoS. It then goes on | |||
| CID-to-IP/port association. This attack is possible because the | describing the steps a DTLS principal must take when a record with a | |||
| network and transport layer identifiers, such as source IP address | CID is received that has a source address (and/or port) different | |||
| and source port numbers, are not integrity protected and | from the one currently associated with the DTLS connection. However, | |||
| authenticated by the DTLS record layer. | the actual mechanism for ensuring that the new peer address is | |||
| willing to receive and process DTLS records is left open. This | ||||
| This attack makes strong assumptions on the attacker's abilities, and | document standardizes a return routability check (RRC) as part of the | |||
| moreover it only misleads the peer until the next message gets | DTLS protocol itself. | |||
| through un-intercepted. | ||||
| A return routability check (RRC) is performed by the receiving peer | The return routability check is performed by the receiving peer | |||
| before the CID-to-IP address/port binding is updated in that peer's | before the CID-to-IP address/port binding is updated in that peer's | |||
| session state database. This is done in order to provide a certain | session state database. This is done in order to provide more | |||
| degree of confidence to the receiving peer that the sending peer is | confidence to the receiving peer that the sending peer is reachable | |||
| reachable at the indicated address and port. | at the indicated address and port. | |||
| Without such a return routability check, an adversary can redirect | ||||
| traffic towards a third party or a black hole. | ||||
| While an equivalent check can be performed at the application layer | ||||
| (modulo the DTLS API exposing the address update event to the calling | ||||
| application), it is advantageous to offer this functionality at the | ||||
| DTLS layer. Section 3 describes the application layer procedure and | ||||
| Section 4 specifies a new message to perform this return routability | ||||
| check. | ||||
| 2. Conventions and Terminology | 2. Conventions and Terminology | |||
| 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. | |||
| This document assumes familiarity with the CID solutions defined for | This document assumes familiarity with the CID format and protocol | |||
| DTLS 1.2 [I-D.ietf-tls-dtls-connection-id] and for DTLS 1.3 | defined for DTLS 1.2 [I-D.ietf-tls-dtls-connection-id] and for DTLS | |||
| [I-D.ietf-tls-dtls13]. | 1.3 [I-D.ietf-tls-dtls13]. | |||
| 3. Application Layer Return Routability Check | 3. The Return Routability Check Message | |||
| When a record with CID is received that has the source address of the | When a record with CID is received that has the source address of the | |||
| enclosing UDP datagram different from the one previously associated | enclosing UDP datagram different from the one previously associated | |||
| with that CID, the receiver MUST NOT update its view of the peer's IP | with that CID, the receiver MUST NOT update its view of the peer's IP | |||
| address and port number with the source specified in the UDP datagram | address and port number with the source specified in the UDP datagram | |||
| before cryptographically validating the enclosed record(s). This is | before cryptographically validating the enclosed record(s) but | |||
| to ensure that a man-on-the-middle attacker that sends a datagram | instead perform a return routability check. | |||
| with a different source address/port on an existing CID session does | ||||
| not successfully manage to re-route any return traffic. | ||||
| Furthermore, when using CID, anti-replay protection MUST be enabled. | ||||
| This is to ensure that a man-on-the-middle attacker sending a | ||||
| previously captured record with a modified source IP address and port | ||||
| will not be able to successfully pass the above check (since the | ||||
| datagram is very likely discarded on receipt - if it falls outside | ||||
| the replay window). | ||||
| The two countermeasures cannot complete stop a man-in-the-middle | ||||
| attacker who performs a DoS on the sender or uses the receiver as as | ||||
| backscatter source for a DDoS attack. For a more generic protection, | ||||
| a return routability check is needed. | ||||
| It is RECOMMENDED that implementations of the CID functionaliy | ||||
| described in [I-D.ietf-tls-dtls-connection-id] and in | ||||
| [I-D.ietf-tls-dtls13] added peer address update events to their APIs. | ||||
| Applications can then use these events as triggers to perform an | ||||
| application layer return routability check, for example one that is | ||||
| based on successful exchange of minimal amount of ping-pong traffic | ||||
| with the peer. | ||||
| 4. The Return Routability Check Message | ||||
| enum { | enum { | |||
| invalid(0), | invalid(0), | |||
| change_cipher_spec(20), | change_cipher_spec(20), | |||
| alert(21), | alert(21), | |||
| handshake(22), | handshake(22), | |||
| application_data(23), | application_data(23), | |||
| heartbeat(24), /* RFC 6520 */ | heartbeat(24), /* RFC 6520 */ | |||
| return_routability_check(TBD), /* NEW */ | return_routability_check(TBD), /* NEW */ | |||
| (255) | (255) | |||
| } ContentType; | } ContentType; | |||
| struct { | ||||
| opaque cookie<1..2^16-1>; | ||||
| } Cookie; | ||||
| struct { | ||||
| Cookie cookie; | ||||
| } return_routability_check; | ||||
| The newly introduced return_routability_check message contains a | The newly introduced return_routability_check message contains a | |||
| cookie. The semantic of the cookie is similar to the cookie used in | cookie. The semantic of the cookie is similar to the cookie used in | |||
| the HelloRetryRequest message defined in [RFC8446]. | the HelloRetryRequest message defined in [RFC8446]. | |||
| The return_routability_check message MUST be authenticated and | The return_routability_check message MUST be authenticated and | |||
| encrypted using the currently active security context. | encrypted using the currently active security context. | |||
| The endpoint that observes the peer's address update MUST stop | The receiver that observes the peer's address and or port update MUST | |||
| sending any buffered application data (or limit the sending rate to a | stop sending any buffered application data (or limit the sending rate | |||
| TBD threshold) and initiate the return routability check that | to a TBD threshold) and initiate the return routability check that | |||
| proceeds as follows: | proceeds as follows: | |||
| 1. A cookie is placed in the return_routability_check message; | ||||
| 2. The message is sent to the observed new address and a timeout T | ||||
| is started; | ||||
| 3. The peer endpoint, after successfully verifying the received | 1. A cookie is placed in the return_routability_check message; | |||
| return_routability_check message echoes it back; | ||||
| 4. When the initiator receives and verifies the | 2. The message is sent to the observed new address and a timeout T | |||
| return_routability_check message, it updates the peer address | is started; | |||
| binding; | ||||
| 5. If T expires, or the address confirmation fails, the peer address | 3. The peer endpoint, after successfully verifying the received | |||
| binding is not updated. | return_routability_check message echoes it back; | |||
| After this point, any pending send operation is resumed to the bound | 4. When the initiator receives and verifies the | |||
| peer address. | return_routability_check message, it updates the peer address | |||
| binding; | ||||
| struct { | 5. If T expires, or the address confirmation fails, the peer address | |||
| opaque cookie<1..2^16-1>; | binding is not updated. | |||
| } Cookie; | ||||
| struct { | After this point, any pending send operation is resumed to the bound | |||
| Cookie cookie; | peer address. | |||
| } return_routability_check; | ||||
| 5. RRC Example | 4. RRC Example | |||
| The example shown in Figure 1 illustrates a client and a server | The example shown in Figure 1 illustrates a client and a server | |||
| exchanging application payloads protected by DTLS with an | exchanging application payloads protected by DTLS with an | |||
| unilaterally used CIDs. At some point in the communication | unilaterally used CIDs. At some point in the communication | |||
| interaction the IP address used by the client changes and, thanks to | interaction the IP address used by the client changes and, thanks to | |||
| the CID usage, the security context to interpret the record is | the CID usage, the security context to interpret the record is | |||
| successfully located by the server. However, the server wants to | successfully located by the server. However, the server wants to | |||
| test the reachability of the client at his new IP address, to avoid | test the reachability of the client at his new IP address, to avoid | |||
| being abused (e.g., as an amplifier) by an attacker impersonating the | being abused (e.g., as an amplifier) by an attacker impersonating the | |||
| client. | client. | |||
| skipping to change at page 7, line 5 ¶ | skipping to change at page 7, line 5 ¶ | |||
| <<< IP Address B | <<< IP Address B | |||
| Verified >> | Verified >> | |||
| <======== Application Data | <======== Application Data | |||
| Src-IP=Z | Src-IP=Z | |||
| Dst-IP=B | Dst-IP=B | |||
| Figure 1: Return Routability Example | Figure 1: Return Routability Example | |||
| 6. Security and Privacy Considerations | 5. Security and Privacy Considerations | |||
| As all the datagrams in DTLS are authenticated, integrity and | ||||
| confidentiality protected there is no risk that an attacker | ||||
| undetectably modifies the contents of those packets. The IP | ||||
| addresses in the IP header and the port numbers of the transport | ||||
| layer are, however, not authenticated. With the introduction of the | ||||
| CID, care must be taken to test reachability of a peer at a given IP | ||||
| address and port. | ||||
| Note that the return routability checks do not protect against third- | Note that the return routability checks do not protect against | |||
| party flooding if the attacker is along the path, as the attacker can | flooding of third-parties if the attacker is on-path, as the attacker | |||
| forward the return routability checks to the real peer (even if those | can redirect the return routability checks to the real peer (even if | |||
| datagrams are cryptographically authenticated). | those datagrams are cryptographically authenticated). On-path | |||
| adversaries can, in general, pose a harm to connectivity. | ||||
| 7. IANA Considerations | 6. IANA Considerations | |||
| IANA is requested to allocate an entry to the existing TLS | IANA is requested to allocate an entry to the existing TLS | |||
| "ContentType" registry, for the return_routability_check(TBD) defined | "ContentType" registry, for the return_routability_check(TBD) defined | |||
| in this document. | in this document. | |||
| 8. Open Issues | 7. Open Issues | |||
| - Should the return routability check use separate sequence numbers | - Should the return routability check use separate sequence numbers | |||
| and replay windows? | and replay windows? | |||
| - Should the heartbeat message be re-used instead of the proposed | - Should the heartbeat message be re-used instead of the proposed | |||
| new message exchange? | new message exchange? | |||
| 9. References | 8. Normative References | |||
| 9.1. Normative References | ||||
| [I-D.ietf-tls-dtls-connection-id] | [I-D.ietf-tls-dtls-connection-id] | |||
| Rescorla, E., Tschofenig, H., and T. Fossati, "Connection | Rescorla, E., Tschofenig, H., and T. Fossati, "Connection | |||
| Identifiers for DTLS 1.2", draft-ietf-tls-dtls-connection- | Identifiers for DTLS 1.2", draft-ietf-tls-dtls-connection- | |||
| id-05 (work in progress), May 2019. | id-07 (work in progress), October 2019. | |||
| [I-D.ietf-tls-dtls13] | [I-D.ietf-tls-dtls13] | |||
| Rescorla, E., Tschofenig, H., and N. Modadugu, "The | Rescorla, E., Tschofenig, H., and N. Modadugu, "The | |||
| Datagram Transport Layer Security (DTLS) Protocol Version | Datagram Transport Layer Security (DTLS) Protocol Version | |||
| 1.3", draft-ietf-tls-dtls13-31 (work in progress), March | 1.3", draft-ietf-tls-dtls13-34 (work in progress), | |||
| 2019. | November 2019. | |||
| [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>. | |||
| [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security | ||||
| (TLS) Protocol Version 1.2", RFC 5246, | ||||
| DOI 10.17487/RFC5246, August 2008, | ||||
| <https://www.rfc-editor.org/info/rfc5246>. | ||||
| [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 | [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>. | |||
| [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol | [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol | |||
| Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, | Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, | |||
| <https://www.rfc-editor.org/info/rfc8446>. | <https://www.rfc-editor.org/info/rfc8446>. | |||
| 9.2. URIs | ||||
| [1] mailto:tls@ietf.org | ||||
| [2] https://www1.ietf.org/mailman/listinfo/tls | ||||
| [3] https://www.ietf.org/mail-archive/web/tls/current/index.html | ||||
| Appendix A. History | Appendix A. History | |||
| RFC EDITOR: PLEASE REMOVE THE THIS SECTION | RFC EDITOR: PLEASE REMOVE THE THIS SECTION | |||
| - Initial version | - 01: Removed text that overlapped with draft-ietf-tls-dtls- | |||
| connection-id | ||||
| Appendix B. Working Group Information | ||||
| RFC EDITOR: PLEASE REMOVE THE THIS SECTION | ||||
| The discussion list for the IETF TLS working group is located at the | ||||
| e-mail address tls@ietf.org [1]. Information on the group and | ||||
| information on how to subscribe to the list is at | ||||
| https://www1.ietf.org/mailman/listinfo/tls [2] | ||||
| Archives of the list can be found at: https://www.ietf.org/mail- | - 00: Initial version | |||
| archive/web/tls/current/index.html [3] | ||||
| Appendix C. Acknowledgements | Appendix B. Acknowledgements | |||
| We would like to thank Achim Kraus, Hanno Becker and Manuel Pegourie- | We would like to thank Achim Kraus, Hanno Becker and Manuel Pegourie- | |||
| Gonnard for their input to this document. | Gonnard for their input to this document. | |||
| Authors' Addresses | Authors' Addresses | |||
| Thomas Fossati | Thomas Fossati | |||
| Arm Limited | Arm Limited | |||
| EMail: thomas.fossati@arm.com | EMail: thomas.fossati@arm.com | |||
| End of changes. 33 change blocks. | ||||
| 154 lines changed or deleted | 82 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||