idnits 2.17.1 draft-ietf-ntp-extension-field-07.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 : ---------------------------------------------------------------------------- == There are 4 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC5905, updated by this document, for RFC5378 checks: 2005-07-11) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (February 9, 2016) is 2970 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) No issues found here. Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 NTP Working Group T. Mizrahi 2 Internet Draft Marvell 3 Intended status: Standards Track D. Mayer 4 Updates: 5905 Network Time Foundation 5 Expires: August 2016 February 9, 2016 7 The Network Time Protocol Version 4 (NTPv4) Extension Fields 8 draft-ietf-ntp-extension-field-07.txt 10 Abstract 12 The Network Time Protocol Version 4 (NTPv4) defines the optional 13 usage of extension fields. An extension field, defined in RFC5905, is 14 an optional field that resides at the end of the NTP header, and can 15 be used to add optional capabilities or additional information that 16 is not conveyed in the standard NTP header. This document updates 17 RFC5905 by clarifying some points regarding NTP extension fields and 18 their usage with Message Authentication Codes (MAC). 20 Status of this Memo 22 This Internet-Draft is submitted to IETF 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), its areas, and its working groups. Note that 27 other groups may also distribute working documents as Internet- 28 Drafts. 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 The list of current Internet-Drafts can be accessed at 36 http://www.ietf.org/ietf/1id-abstracts.txt. 38 The list of Internet-Draft Shadow Directories can be accessed at 39 http://www.ietf.org/shadow.html. 41 This Internet-Draft will expire on August 9, 2016. 43 Copyright Notice 45 Copyright (c) 2016 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (http://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction...................................................2 61 2. Conventions Used in this Document..............................3 62 2.1. Terminology...............................................3 63 2.2. Terms & Abbreviations.....................................3 64 3. NTP Extension Fields - RFC 5905 Update.........................3 65 4. Security Considerations........................................6 66 5. IANA Considerations............................................7 67 6. Acknowledgments................................................7 68 7. References.....................................................7 69 7.1. Normative References......................................7 70 7.2. Informative References....................................7 72 1. Introduction 74 The NTP header format consists of a set of fixed fields that may be 75 followed by some optional fields. Two types of optional fields are 76 defined, Message Authentication Codes (MAC), and extension fields, as 77 defined in Section 7.5 of [RFC5905]. 79 If a MAC is used, it resides at the end of the packet. This field can 80 be either 24 octets long, 20 octets long, or a 4-octet crypto-NAK. 82 NTP extension fields were defined in [RFC5905] as a generic mechanism 83 that allows to add future extensions and features without modifying 84 the NTP header format (Section 16 of [RFC5905]). 86 The only currently defined extension fields are the ones used by the 87 AutoKey protocol [RFC5906], and the Checksum Complement [NTPComp]. 88 The AutoKey extension field is always followed by a MAC, and Section 89 10 of [RFC5906] specifies the parsing rules that allow a host to 90 distinguish between an extension field and a MAC. However, a MAC is 91 not mandatory after an extension field; an NTPv4 packet can include 92 one or more extension fields without including a MAC (Section 7.5 of 93 [RFC5905]). 95 This document updates [RFC5905] by clarifying some points regarding 96 the usage of extension fields. These updates include changes to 97 address errors found after the publication of [RFC5905] with respect 98 to extension fields. Specifically, this document updates Section 7.5 99 of [RFC5905], clarifying the relationship between extension fields 100 and MACs, and defining the behavior of a host that receives an 101 unknown extension field. 103 2. Conventions Used in this Document 105 2.1. Terminology 107 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 108 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 109 document are to be interpreted as described in [KEYWORDS]. 111 2.2. Terms & Abbreviations 113 NTPv4 Network Time Protocol Version 4 [RFC5905] 115 MAC Message Authentication Code 117 3. NTP Extension Fields - RFC 5905 Update 119 This document updates Section 7.5 of [RFC5905] as follows: 121 OLD: 123 7.5. NTP Extension Field Format 125 In NTPv4, one or more extension fields can be inserted after the 126 header and before the MAC, which is always present when an extension 127 field is present. Other than defining the field format, this 128 document makes no use of the field contents. An extension field 129 contains a request or response message in the format shown in Figure 130 14. 132 0 1 2 3 133 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 134 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 135 | Field Type | Length | 136 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 137 . . 138 . Value . 139 . . 140 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 141 | Padding (as needed) | 142 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 143 Figure 14: Extension Field Format 145 All extension fields are zero-padded to a word (four octets) 146 boundary. The Field Type field is specific to the defined function 147 and is not elaborated here. While the minimum field length 148 containing required fields is four words (16 octets), a maximum field 149 length remains to be established. 151 The Length field is a 16-bit unsigned integer that indicates the 152 length of the entire extension field in octets, including the Padding 153 field. 155 NEW: 157 7.5. NTP Extension Field Format 159 In NTPv4, one or more extension fields can be inserted after the 160 header and before the MAC, if a MAC is present. 162 Other than defining the field format, this document makes no use of 163 the field contents. An extension field contains a request or 164 response message in the format shown in Figure 14. 166 0 1 2 3 167 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 168 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 169 | Field Type | Length | 170 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 171 . . 172 . Value . 173 . . 174 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 175 | Padding (as needed) | 176 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 177 Figure 14: Extension Field Format 179 All extension fields are zero-padded to a word (four octets) 180 boundary. 182 The Field Type, Value, and Padding fields are specific to the defined 183 function and are not elaborated here; the Field Type value is defined 184 in an IANA registry and its Length, Value and Padding are defined by 185 the document referred to by the registry. If a host receives an 186 extension field with an unknown Field Type, the host SHOULD ignore 187 the extension field and MAY drop the packet altogether if policy 188 requires it. 190 While the minimum field length containing required fields is four 191 words (16 octets), the maximum field length cannot be longer than 192 65532 octets due to the maximum size of the length field. 194 The Length field is a 16-bit unsigned integer that indicates the 195 length of the entire extension field in octets, including the Padding 196 field. 198 7.5.1 Extension Fields and MACs 200 7.5.1.1 Extension Fields in the Presence of a MAC 202 An extension field can be used in an NTP packet that includes a MAC, 203 for example, as defined in [RFC5906]. A specification that defines a 204 new extension field MUST specify whether the extension field requires 205 a MAC or not. If the extension field requires a MAC, the extension 206 field specification MUST define the algorithm to be used to create 207 the MAC and the length of the MAC thus created. An extension field 208 MAY allow for more than one algorithm to be used in which case the 209 information about which one was used MUST be included in the 210 extension field itself. 212 7.5.1.2 Multiple Extension Fields with a MAC 214 If there are multiple extension fields that require a MAC they MUST 215 all require use of the same algorithm and MAC length. Extension 216 fields that do not require a MAC can be included with extension 217 fields that do require a MAC. 219 An NTP packet MUST NOT be sent with two or more extension fields that 220 require a MAC with different algorithms. 222 If an NTP packet is received with two or more extension fields that 223 this receiver recognizes and those fields require a MAC with 224 different algorithms, the packet MUST be discarded. 226 7.5.1.3 MAC in the absence of an Extension field 228 A MAC MUST NOT be longer than 24 octets if there is no extension 229 field present, unless a longer MAC is agreed upon by both client and 230 server. The client and server can negotiate this behavior using a 231 previous exchange of packets with an extension field which defines 232 the size and algorithm of the MAC transmitted in NTP packets. 234 7.5.1.4 Extension Fields in the Absence of a MAC 236 If a MAC is not present, one or more extension fields can be inserted 237 after the header, according to the following rules: 239 o If the packet includes a single extension field, the length of the 240 extension field MUST be at least 7 words, i.e., at least 28 241 octets. 243 o If the packet includes more than one extension field, the length 244 of the last extension field MUST be at least 28 octets. The length 245 of the other extension fields in this case MUST be at least 16 246 octets each. 248 4. Security Considerations 250 The security considerations of time protocols in general are 251 discussed in [RFC7384], and the security considerations of NTP are 252 discussed in [RFC5905]. 254 Distributed Denial-of-Service (DDoS) attacks on NTP servers involve 255 flooding a server with a high rate of NTP packets. Malicious usage of 256 extension fields cannot amplify such DDoS attacks; such malicious 257 attempts are mitigated by NTP servers, since the servers ignore 258 unknown extension fields (as discussed in Section 3.), and only 259 respond, if needed, with known extension fields. Extension fields 260 from incoming packets are neither propagated by NTP servers nor 261 included in any response. NTP servers create their own extension 262 fields if needed for a response. A large number of extension fields 263 should be flagged by an NTP server as a potential attack. Large 264 extension field sizes should also be flagged unless they are expected 265 to be large. 267 Middleboxes such as firewalls MUST NOT filter NTP packets based on 268 their extension fields. Such middleboxes should not examine extension 269 fields in the packets since NTP packets may contain new extension 270 fields that the middleboxes have not been updated to recognize. 272 5. IANA Considerations 274 There are no new IANA considerations implied by this document. 276 6. Acknowledgments 278 The authors gratefully acknowledge Dave Mills for his insightful 279 comments. The authors also thank Tim Chown, Sean Turner, Miroslav 280 Lichvar, Suresh Krishnan, and Jari Arkko for their thorough review 281 and helpful comments. 283 This document was prepared using 2-Word-v2.0.template.dot. 285 7. References 287 7.1. Normative References 289 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate 290 Requirement Levels", BCP 14, RFC 2119, March 1997. 292 [RFC5905] Mills, D., Martin, J., Burbank, J., Kasch, W., 293 "Network Time Protocol Version 4: Protocol and 294 Algorithms Specification", RFC 5905, June 2010. 296 7.2. Informative References 298 [RFC5906] Haberman, B., Mills, D., "Network Time Protocol 299 Version 4: Autokey Specification", RFC 5906, June 300 2010. 302 [RFC7384] Mizrahi, T., "Security Requirements of Time Protocols 303 in Packet Switched Networks", RFC 7384, October 2014. 305 [NTPComp] Mizrahi, T., "UDP Checksum Complement in the Network 306 Time Protocol (NTP)", draft-ietf-ntp-checksum-trailer 307 (work in progress), October 2015. 309 Authors' Addresses 311 Tal Mizrahi 312 Marvell 313 6 Hamada St. 314 Yokneam, 20692 Israel 316 Email: talmi@marvell.com 318 Danny Mayer 319 Network Time Foundation 320 PO Box 918 321 Talent OR 97540 323 Email: mayer@ntp.org