idnits 2.17.1 draft-nishida-tcpm-apaws-02.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 == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: 1) Option Exchange in SYN This method uses a new experimental TCP option defined in [RFC6994] and exchanges it during SYN negotiation. The format of the option is depicted in Figure 1. The option does not have any content as it simply indicates the endpoint supports A-PAWS. In this signaling method, when an endpoint wants to use A-PAWS, it MUST put A-PAWS option in SYN or SYN-ACK segment. If an endpoint does not find A-PAWS option in received SYN or SYN-ACK segment, it MUST not send segments with A-PAWS logic in Section 3.3. However, it MUST activate A-PAWS receiver logic in Section 3.4 if it has sent A-PAWS option in SYN or SYN-ACK segment. This is because some middleboxes may remove A-PAWS option in SYN or SYN-ACK segment. A-PAWS receiver logic in Section 3.4 can interact with both A-PAWS and PAWS sender. This signaling requires additional option space in SYN segments, hence non-SYN segment signaling should be used when there is not enough space in SYN option space. == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: 2) Option Exchange in non-SYN Segments This method uses the option in Figure 1 as well as the SYN segment signaling. However, the options are not exchanged during SYN negotiation. When a endpoint sets A-PAWS option in the segments, it indicates that it can receive the segments from A-PAWS senders. Hence, it MUST activate A-PAWS receiver logic in Section 3.4 if it sends the options. However, it MUST not send segments with A-PAWS logic in Section 3.3 until it receives A-PAWS options. This approach does not require extra option space or special timestamp value in SYN segments. However, negotiating features in non-SYN segments will require to address further arguments such as when to send the options or how to retransmits the options. We discuss these points in the next section and provide some recommended rules for implementations. == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: Rule 2: An endpoint MUST not send segments with A-PAWS logic in Section 3.3 until it receives A-PAWS option from the other endpoint. -- The document date (October 17, 2015) is 3085 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 793 (Obsoleted by RFC 9293) ** Obsolete normative reference: RFC 1323 (Obsoleted by RFC 7323) -- Obsolete informational reference (is this intentional?): RFC 6824 (Obsoleted by RFC 8684) Summary: 2 errors (**), 0 flaws (~~), 4 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group Y. Nishida 3 Internet-Draft GE Global Research 4 Intended status: Experimental October 17, 2015 5 Expires: April 19, 2016 7 A-PAWS: Alternative Approach for PAWS 8 draft-nishida-tcpm-apaws-02 10 Abstract 12 This documents describe a technique called A-PAWS which can provide 13 protection against old duplicates segments like PAWS. While PAWS 14 requires TCP to set timestamp options in all segments in a TCP 15 connection, A-PAWS supports the same feature without using 16 timestamps. A-PAWS is designed to be used complementary with PAWS. 17 TCP needs to use PAWS when it is necessary and activates A-PAWS only 18 when it is safe to use. Without impairing the reliability and the 19 robustness of TCP, A-PAWS can provide more option space to other TCP 20 extensions. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at http://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on April 19, 2016. 39 Copyright Notice 41 Copyright (c) 2015 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 57 2. Conventions and Terminology . . . . . . . . . . . . . . . . . 3 58 3. The A-PAWS Design . . . . . . . . . . . . . . . . . . . . . . 3 59 3.1. Signaling Methods . . . . . . . . . . . . . . . . . . . . 4 60 3.2. A-PAWS Negotiation Logic for non-SYN Segment Signaling . 5 61 3.3. Sending Behavior . . . . . . . . . . . . . . . . . . . . 6 62 3.4. Receiving Behavior . . . . . . . . . . . . . . . . . . . 6 63 4. When To Activate A-PAWS . . . . . . . . . . . . . . . . . . . 6 64 5. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . 7 65 5.1. Protection Against Early Incarnations . . . . . . . . . . 7 66 5.2. Protection Against Security Threats . . . . . . . . . . . 7 67 5.3. Middlebox Considerations . . . . . . . . . . . . . . . . 8 68 5.4. Aggressive Mode in A-PAWS . . . . . . . . . . . . . . . . 8 69 6. Security Considerations . . . . . . . . . . . . . . . . . . . 9 70 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 71 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 72 8.1. Normative References . . . . . . . . . . . . . . . . . . 9 73 8.2. Informative References . . . . . . . . . . . . . . . . . 9 74 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 10 76 1. Introduction 78 PAWS (Protect Against Wrapped Sequences) defined in [RFC1323] is a 79 technique that can identify old duplicate segments in a TCP 80 connection. An old duplicate segment can be generated when it has 81 been delayed by queueing, etc. If such a segment has the sequence 82 number which falls within the receiver's current window, the receiver 83 will accept it without any warning or error. However, this segment 84 can be a segment created by an old connection that has the same port 85 and address pair, or a segments sent 2**32 bytes earlier on the same 86 connection. Although this situation rarely happens, it impairs the 87 reliability of TCP. 89 PAWS utilizes timestamp option in [RFC1323] to provide protection 90 against this. It is assumed that every received TCP segment contains 91 a timestamp. PAWS can identify old duplicate segments by comparing 92 the timestamp in the received segments and the timestamps from other 93 segments received recently. If both TCP endpoints agree to use PAWS, 94 all segments belong to this connection should have timestamp. Since 95 PAWS is the only standardized protection against old duplicate 96 segments, it has been implemented and used in most TCP 97 implementations. However, as some TCP extensions such as [RFC2018], 98 [RFC5925] and [RFC6824] also requires a certain amount of option 99 space in non-SYN segments, using 10-12 bytes length in option space 100 for timestamp in all segments tends to be considered expensive in 101 recent discussions. 103 In addition, although PAWS is necessary for connections which 104 transmit more than 2**32 bytes, it is not very important for other 105 connections since [RFC0793] already has protection against segments 106 from old connections by using timers. Moreover, some research 107 results indicates that most of TCP flows tend to transmit small 108 amount of data, which means only small fraction of TCP connections 109 really need PAWS [QIAN11]. Timestamp option is also used for RTTM 110 (Round Trip Time Measurement) in [RFC1323]. Gathering many RTT 111 samples from the timestamp in every TCP segment looks useful approach 112 to improve RTO estimation. However, some research results shows the 113 number of samples per RTT does not affect the effectiveness of the 114 RTO [MALLMAN99]. Hence, we can think if PAWS is not used, sending a 115 few timestamps per RTT will be sufficient. 117 Based on these observations, we propose a new technique called A-PAWS 118 which can archive similar protection against old duplicates segments. 119 The basic idea of A-PAWS is to attain the same protection against old 120 all duplicate segments as PAWS while reducing the use of TS options 121 in segments. A-PAWS is designed to be used complementary with PAWS. 122 This means an implementation that supports A-PAWS is still required 123 to supports PAWS. A-PAWS is activated only when it is safe to use. 124 This sounds the applicability of A-PAWS is limited, however, we 125 believe TCP will have a lot of chances to save the option space if it 126 uses A-PAWS. 128 There are some discussions that PAWS can also be used to enhance 129 security, however, we still believe that A-PAWS can maintain the same 130 level of security as PAWS. Detailed discussions on this point are 131 provided in Section 5. A-PAWS is an experimental idea yet, but we 132 hope it will contribute to facilitating the use of TCP option space. 134 2. Conventions and Terminology 136 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 137 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 138 document are to be interpreted as described in [RFC2119]. 140 3. The A-PAWS Design 142 A-PAWS assumes PAWS as it is designed to be used complementary with 143 PAWS. Hence, a node which supports A-PAWS MUST support PAWS. The 144 following mechanisms are required in TCP in order to perform A-PAWS. 146 3.1. Signaling Methods 148 An endpoint that supports A-PAWS can use the following signaling 149 methods to activate A-PAWS logic. 151 1) Option Exchange in SYN 152 This method uses a new experimental TCP option defined in 153 [RFC6994] and exchanges it during SYN negotiation. The format of 154 the option is depicted in Figure 1. The option does not have any 155 content as it simply indicates the endpoint supports A-PAWS. In 156 this signaling method, when an endpoint wants to use A-PAWS, it 157 MUST put A-PAWS option in SYN or SYN-ACK segment. If an endpoint 158 does not find A-PAWS option in received SYN or SYN-ACK segment, 159 it MUST not send segments with A-PAWS logic in Section 3.3. 160 However, it MUST activate A-PAWS receiver logic in Section 3.4 if 161 it has sent A-PAWS option in SYN or SYN-ACK segment. This is 162 because some middleboxes may remove A-PAWS option in SYN or SYN- 163 ACK segment. A-PAWS receiver logic in Section 3.4 can interact 164 with both A-PAWS and PAWS sender. This signaling requires 165 additional option space in SYN segments, hence non-SYN segment 166 signaling should be used when there is not enough space in SYN 167 option space. 169 2) Option Exchange in non-SYN Segments 170 This method uses the option in Figure 1 as well as the SYN 171 segment signaling. However, the options are not exchanged during 172 SYN negotiation. When a endpoint sets A-PAWS option in the 173 segments, it indicates that it can receive the segments from 174 A-PAWS senders. Hence, it MUST activate A-PAWS receiver logic in 175 Section 3.4 if it sends the options. However, it MUST not send 176 segments with A-PAWS logic in Section 3.3 until it receives 177 A-PAWS options. This approach does not require extra option 178 space or special timestamp value in SYN segments. However, 179 negotiating features in non-SYN segments will require to address 180 further arguments such as when to send the options or how to 181 retransmits the options. We discuss these points in the next 182 section and provide some recommended rules for implementations. 184 1 2 3 185 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 186 +---------------+---------------+------------------------------+ 187 | Kind = 254 | Length = 4 | 16-bit ExID = TBD | 188 +---------------+---------------+------------------------------+ 190 Figure 1: A-PAWS option format 192 3.2. A-PAWS Negotiation Logic for non-SYN Segment Signaling 194 One important characteristic for A-PAWS is its signaling mechanism 195 does not require tight synchronization between endpoints since A-PAWS 196 receivers can interact with both A-PAWS senders and PAWS senders. 197 This allow us not to invent another three-way handshake like 198 mechanisms for non-SYN segments. This approach will require drastic 199 changes in the current TCP semantics. Instead, we propose a 200 relatively simple and easy mechanism for feature negotiation by using 201 the following rules on A-PAWS endpoints. 203 Rule 1: An endpoint MUST activate A-PAWS receiver logic in 204 Section 3.4 before it sends A-PAWS option. 206 Rule 2: An endpoint MUST not send segments with A-PAWS logic in 207 Section 3.3 until it receives A-PAWS option from the other 208 endpoint. 210 These rules can avoid situations where an endpoint sends segments by 211 A-PAWS logic to an endpoint that doesn't use A-PAWS logic. 213 Another discussion point for this signaling method is when to set 214 A-PAWS option in segments. As A-PAWS employs asynchronous signaling, 215 both endpoints basically can set A-PAWS option in segments anytime 216 they want. However, it is recommended to use the following rules for 217 setting A-PAWS options. 219 Rule 3: An endpoint SHOULD use a data segment when it sets A-PAWS 220 option in a segment. 222 Rule 4: When an endpoint receives a data segment with A-PAWS 223 option, it SHOULD set A-PAWS option for its ACK segment. 225 Rule 5: An endpoint MAY use A-PAWS options in retransmitted 226 segments. 228 These rules allow endpoints to have loose synchronized signaling so 229 that they can at least solicit responses from their peers. Of 230 course, even an endpoint solicit a response by setting A-PAWS option 231 in a data segment, it might not receive A-PAWS option in the ACK 232 segment. This can be caused by the lost of the ACK segment or 233 middleboxes that remove unknown options. In order to address these 234 cases, the following rules can be used. 236 Rule 6: As long as an endpoint does not violate the other rules, 237 it MAY set A-PAWS option in multiple data segments with a certain 238 interval in case no A-PAWS options has been sent from the peer. 240 This rule can address the cases where A-PAWS options has been removed 241 by middleboxes or segments with A-PAWS options has been lost. 243 3.3. Sending Behavior 245 A-PAWS enabled TCP transmits segments, it needs to follow the rules 246 below. 248 1. TCP needs to check how many bytes has been transmitted in a 249 connection. If the transmitted bytes exceeds 2**32 - 250 'Sender.Offset', TCP migrates PAWS mode and MUST set timestamp 251 option in all segments to be transmitted. The value for 252 'Sender.Offset' is discussed in Section 5. 254 2. If the number of bytes transmitted in a TCP connection does not 255 exceeds 2**32 - 'Sender.Offset', TCP MAY omit timestamp option in 256 segments as long as it does not affect RTTM. This draft does not 257 define how much TCP can omit timestamps because it should be 258 determined by RTTM. 260 3.4. Receiving Behavior 262 A-PAWS enabled TCP receives segments, it needs to follow the rules 263 below. 265 1. TCP needs to check how many bytes has been received in a TCP 266 connection. If it exceeds 2**32 bytes, A-PAWS nodes SHOULD 267 discard the received segments which does not have timestamp 268 option. TCP MUST perform PAWS check when received bytes exceeds 269 2**32 bytes. 271 2. If the number of bytes received in a TCP connection does not 272 exceeds 2**32 bytes, A-PAWS nodes SHOULD accept the segments even 273 if it does not have timestamp option. A-PAWS nodes MAY skip PAWS 274 check until the received bytes exceeds 2**32 bytes. 276 4. When To Activate A-PAWS 278 In basic principal, A-PAWS capable nodes can always use A-PAWS logic 279 as long as the peers agree with them. However, the following cases 280 require special considerations to enable A-PAWS. 282 1. As "When To Keep Quiet" section in [RFC0793] suggests, it is 283 recommended that TCP keeps quiet for a MSL upon starting up or 284 recovering from a crash where memory of sequence numbers has been 285 lost. However, if timestamps are being used and if the timestamp 286 clock can be guaranteed to be increased monotonically, this quiet 287 time may be unnecessary. Because TCP can identify the segments 288 from old connections by checking the timestamp. We think some 289 TCP implementations may disable the quiet time because of using 290 timestamps from this reason. However, since A-PAWS nodes does 291 not set timestamp options in all segments, TCP cannot rely on 292 this approach. To avoid decreasing the robustness of TCP 293 connection, TCP MUST NOT use A-PAWS for a MSL upon starting up or 294 recovering from a crash. 296 2. Various TCP implementations provide APIs such as setsockopt() 297 that can set SO_REUSEADDR flag on TCP connections. If this flag 298 is set, the TCP connection allows to reuse the same local port 299 without waiting for 2 MSL period. While this option is useful 300 when users want to relaunch applications immediately, it makes 301 the TCP connection a little vulnerable as TCP stack might receive 302 duplicate segments from earlier incarnations. It has been said 303 that PAWS can contribute to mitigate this risk by checking the 304 timestamps in segments. In order to keep the same level of 305 protection, TCP SHOULD NOT send A-PAWS option when SO_REUSEADDR 306 flag is set. This rule prevents the peer from sending segments 307 to this node with A-PAWS logic. However, the node can send 308 segments with A-PAWS logic as long as it received A-PAWS option 309 from the peer. 311 5. Discussion 313 As A-PAWS is an experimental logic, the following points need to be 314 considered and discussed. 316 5.1. Protection Against Early Incarnations 318 There are some discussions that timestamp can enhance the robustness 319 against early incarnations. Since A-PAWS does not set timestamps in 320 all segments, some may say that it degrades the robustness of TCP. 321 We believe that the degradation caused by A-PAWS on this point is 322 negligible. As long as TCP limits the usage of A-PAWS as described 323 in Section 4, duplicate segments from early incarnations should not 324 be received by TCP. 326 5.2. Protection Against Security Threats 328 A TCP connection can be identified by a 5-tuple: source address, 329 destination address, source port number, destination port number and 330 protocol. Crackers need to guess all these parameters when they try 331 malicious attacks on the connection. PAWS can enhance the protection 332 for this as it additionally requires timestamp checking. However, we 333 think the effect of PAWS against malicious attacks is limited due to 334 the simplicity of PAWS check. In PAWS, a segment can be considered 335 as an old duplicate if the timestamp in the segment less than some 336 timestamps recently received on the connection. The "less than" in 337 this context is determined by processing timestamp values as 32 bit 338 unsigned integers in a modular 32-bit space. For example, if t1 and 339 t2 are timestamp values, t1 < t2 is verified when 0 < (t2 - t1) < 340 2**31 computed in unsigned 32-bit arithmetic. Hence, if crackers set 341 a random value in the timestamp option, there will be 50% chance for 342 them to trick PAWS check. Moreover, there will be more chances if 343 they send multiple segments with different timestamps, which will not 344 be difficult to perform. 346 In addition, we think there might be a case where using PAWS 347 increases security risks. PAWS recommends to increase timestamp over 348 a system when TCP waives the "quiet time" described in [RFC0793]. 349 However, if timestamps are generated from a global counter, it may 350 leak some information such as system uptime as discussed in 351 [SILBERSACK05]. A-PAWS might be able to allows TCP to use random 352 timestamp values per connections. 354 5.3. Middlebox Considerations 356 A-PAWS is designed to be robust against middleboxes. This means that 357 endpoints will not be messed up even if middleboxes discard A-PAWS 358 option. This is because A-PAWS sender logic is activated only when 359 TCP receives a segment with A-PAWS options. A-PAWS receiver logic 360 does not need to know whether the sender is using PAWS or A-PAWS. 361 Activating A-PAWS receiving logic for PAWS sender might be redundant 362 as it requires additional overheads. However, we believe the 363 overhead will be acceptable in most cases because of the simplicity 364 of A-PAWS logic. 366 Another concern on middleboxes is that they can insert or delete some 367 bytes in TCP connections. If a middlebox inserts extra bytes into a 368 TCP connections, there might be a situation where an A-PAWS sender 369 can transmit segments without timestamp, while an A-PAWS receiver 370 perform PAWS check on them as it already has received 2**32 bytes. 371 In order to avoid discarding segments unnecessarily, we recommend 372 that A-PAWS sender should have a certain amount of offset bytes in 373 order to migrate PAWS mode before the receiver receives 2**32 bytes. 374 We call this protocol parameter 'Sender.Offset'. The proper value 375 for 'Sender.Offset' needs to be discussed. 377 5.4. Aggressive Mode in A-PAWS 379 The current A-PAWS requires TCP to migrate PAWS mode after sending/ 380 receiving 2**32 bytes. However, if both nodes check if 2 MSL has 381 already passed during sending/receiving 2**32 bytes, it is safe to 382 continue using A-PAWS. We call this Aggressive mode. The use of 383 Aggressive mode will be explored in future versions. 385 6. Security Considerations 387 We believe A-PAWS can maintain the same level of security as PAWS 388 does, but further discussions will be needed. Some security aspects 389 of A-PAWS are discussed in Section 5. 391 7. IANA Considerations 393 This document uses the Experimental Option Experiment Identifier. An 394 application for this codepoint in the IANA TCP Experimental Option 395 ExID registry will be submitted. 397 8. References 399 8.1. Normative References 401 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC 402 793, September 1981. 404 [RFC1323] Jacobson, V., Braden, R., and D. Borman, "TCP Extensions 405 for High Performance", RFC 1323, DOI 10.17487/RFC1323, May 406 1992, . 408 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 409 Requirement Levels", BCP 14, RFC 2119, March 1997. 411 8.2. Informative References 413 [MALLMAN99] 414 Allman, M. and V. Paxson, "On Estimating End-to-End 415 Network Path Properties", Proceedings of the ACM SIGCOMM , 416 September 1999. 418 [QIAN11] Qian, L. and B. Carpenter, "A Flow-Based Performance 419 Analysis of TCP and TCP Applications", 3rd International 420 Conference on Computer and Network Technology (ICCNT 2011) 421 , February 2011. 423 [RFC2018] Mathis, M., Mahdavi, J., Floyd, S., and A. Romanow, "TCP 424 Selective Acknowledgment Options", RFC 2018, DOI 10.17487/ 425 RFC2018, October 1996, 426 . 428 [RFC5925] Touch, J., Mankin, A., and R. Bonica, "The TCP 429 Authentication Option", RFC 5925, DOI 10.17487/RFC5925, 430 June 2010, . 432 [RFC6824] Ford, A., Raiciu, C., Handley, M., and O. Bonaventure, 433 "TCP Extensions for Multipath Operation with Multiple 434 Addresses", RFC 6824, DOI 10.17487/RFC6824, January 2013, 435 . 437 [RFC6994] Touch, J., "Shared Use of Experimental TCP Options", RFC 438 6994, August 2013. 440 [SILBERSACK05] 441 Silbersack, M., "Improving TCP/IP security through 442 randomization without sacrificing interoperability.", 443 EuroBSDCon 2005 , November 2005. 445 Author's Address 447 Yoshifumi Nishida 448 GE Global Research 449 2623 Camino Ramon 450 San Ramon, CA 94583 451 USA 453 Email: nishida@wide.ad.jp