idnits 2.17.1 draft-ietf-tcpm-icmp-attacks-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 16. -- Found old boilerplate from RFC 3978, Section 5.5, updated by RFC 4748 on line 1656. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 1667. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 1674. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 1680. 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 : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) == There are 1 instance 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 Copyright Line does not match the current year -- 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 (March 14, 2008) is 5885 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 793 (Obsoleted by RFC 9293) ** Obsolete normative reference: RFC 1981 (Obsoleted by RFC 8201) ** Obsolete normative reference: RFC 2460 (Obsoleted by RFC 8200) == Outdated reference: A later version (-09) exists of draft-ietf-tcpm-tcp-soft-errors-07 == Outdated reference: A later version (-13) exists of draft-ietf-tcpm-tcpsecure-09 == Outdated reference: A later version (-09) exists of draft-ietf-tsvwg-port-randomization-01 -- Obsolete informational reference (is this intentional?): RFC 816 (Obsoleted by RFC 7805) -- Obsolete informational reference (is this intentional?): RFC 1323 (Obsoleted by RFC 7323) -- Obsolete informational reference (is this intentional?): RFC 2385 (Obsoleted by RFC 5925) -- Obsolete informational reference (is this intentional?): RFC 2581 (Obsoleted by RFC 5681) -- Obsolete informational reference (is this intentional?): RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) -- Obsolete informational reference (is this intentional?): RFC 2821 (Obsoleted by RFC 5321) Summary: 5 errors (**), 0 flaws (~~), 5 warnings (==), 13 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 TCP Maintenance and Minor F. Gont 3 Extensions (tcpm) UTN/FRH 4 Internet-Draft March 14, 2008 5 Intended status: Informational 6 Expires: September 15, 2008 8 ICMP attacks against TCP 9 draft-ietf-tcpm-icmp-attacks-03.txt 11 Status of this Memo 13 By submitting this Internet-Draft, each author represents that any 14 applicable patent or other IPR claims of which he or she is aware 15 have been or will be disclosed, and any of which he or she becomes 16 aware will be disclosed, in accordance with Section 6 of BCP 79. 18 Internet-Drafts are working documents of the Internet Engineering 19 Task Force (IETF), its areas, and its working groups. Note that 20 other groups may also distribute working documents as Internet- 21 Drafts. 23 Internet-Drafts are draft documents valid for a maximum of six months 24 and may be updated, replaced, or obsoleted by other documents at any 25 time. It is inappropriate to use Internet-Drafts as reference 26 material or to cite them other than as "work in progress." 28 The list of current Internet-Drafts can be accessed at 29 http://www.ietf.org/ietf/1id-abstracts.txt. 31 The list of Internet-Draft Shadow Directories can be accessed at 32 http://www.ietf.org/shadow.html. 34 This Internet-Draft will expire on September 15, 2008. 36 Abstract 38 This document discusses the use of the Internet Control Message 39 Protocol (ICMP) to perform a variety of attacks against the 40 Transmission Control Protocol (TCP) and other similar protocols. 41 Additionally, describes a number of widely implemented modifications 42 to TCP's handling of ICMP error messages that help to mitigate these 43 issues. 45 Table of Contents 47 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 48 2. Background . . . . . . . . . . . . . . . . . . . . . . . . . . 5 49 2.1. The Internet Control Message Protocol (ICMP) . . . . . . . 5 50 2.1.1. ICMP for IP version 4 (ICMP) . . . . . . . . . . . . . 5 51 2.1.2. ICMP for IP version 6 (ICMPv6) . . . . . . . . . . . . 6 52 2.2. Handling of ICMP error messages . . . . . . . . . . . . . 6 53 2.3. Handling of ICMP error messages in the context of IPsec . 7 54 3. Constraints in the possible solutions . . . . . . . . . . . . 8 55 4. General counter-measures against ICMP attacks . . . . . . . . 9 56 4.1. TCP sequence number checking . . . . . . . . . . . . . . . 9 57 4.2. Port randomization . . . . . . . . . . . . . . . . . . . . 10 58 4.3. Filtering ICMP error messages based on the ICMP payload . 10 59 5. Blind connection-reset attack . . . . . . . . . . . . . . . . 11 60 5.1. Description . . . . . . . . . . . . . . . . . . . . . . . 11 61 5.2. Attack-specific counter-measures . . . . . . . . . . . . . 12 62 6. Blind throughput-reduction attack . . . . . . . . . . . . . . 13 63 6.1. Description . . . . . . . . . . . . . . . . . . . . . . . 13 64 6.2. Attack-specific counter-measures . . . . . . . . . . . . . 13 65 7. Blind performance-degrading attack . . . . . . . . . . . . . . 14 66 7.1. Description . . . . . . . . . . . . . . . . . . . . . . . 14 67 7.2. Attack-specific counter-measures . . . . . . . . . . . . . 15 68 7.3. The counter-measure for the PMTUD attack in action . . . . 19 69 7.3.1. Normal operation for bulk transfers . . . . . . . . . 19 70 7.3.2. Operation during Path-MTU changes . . . . . . . . . . 21 71 7.3.3. Idle connection being attacked . . . . . . . . . . . . 22 72 7.3.4. Active connection being attacked after discovery 73 of the Path-MTU . . . . . . . . . . . . . . . . . . . 23 74 7.3.5. TCP peer attacked when sending small packets just 75 after the three-way handshake . . . . . . . . . . . . 23 76 7.4. Pseudo-code for the counter-measure for the blind 77 performance-degrading attack . . . . . . . . . . . . . . . 24 78 8. Security Considerations . . . . . . . . . . . . . . . . . . . 28 79 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 28 80 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 29 81 10.1. Normative References . . . . . . . . . . . . . . . . . . . 29 82 10.2. Informative References . . . . . . . . . . . . . . . . . . 29 83 Appendix A. An analysis of ICMP hard errors . . . . . . . . . . . 32 84 Appendix B. Advice and guidance to vendors . . . . . . . . . . . 33 85 Appendix C. Changes from previous versions of the draft (to 86 be removed by the RFC Editor before publishing 87 this document as an RFC) . . . . . . . . . . . . . . 33 88 C.1. Changes from draft-ietf-tcpm-icmp-attacks-02 . . . . . . . 33 89 C.2. Changes from draft-ietf-tcpm-icmp-attacks-01 . . . . . . . 34 90 C.3. Changes from draft-ietf-tcpm-icmp-attacks-00 . . . . . . . 34 91 C.4. Changes from draft-gont-tcpm-icmp-attacks-05 . . . . . . . 35 92 C.5. Changes from draft-gont-tcpm-icmp-attacks-04 . . . . . . . 35 93 C.6. Changes from draft-gont-tcpm-icmp-attacks-03 . . . . . . . 35 94 C.7. Changes from draft-gont-tcpm-icmp-attacks-02 . . . . . . . 35 95 C.8. Changes from draft-gont-tcpm-icmp-attacks-01 . . . . . . . 36 96 C.9. Changes from draft-gont-tcpm-icmp-attacks-00 . . . . . . . 36 97 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 36 98 Intellectual Property and Copyright Statements . . . . . . . . . . 38 100 1. Introduction 102 ICMP [RFC0792] is a fundamental part of the TCP/IP protocol suite, 103 and is used mainly for reporting network error conditions. However, 104 the current specifications do not recommend any kind of validation 105 checks on the received ICMP error messages, thus allowing variety of 106 attacks against TCP [RFC0793] by means of ICMP, which include blind 107 connection-reset, blind throughput-reduction, and blind performance- 108 degrading attacks. All of these attacks can be performed even being 109 off-path, without the need to sniff the packets that correspond to 110 the attacked TCP connection. 112 While the possible security implications of ICMP have been known in 113 the research community for a long time, there has never been an 114 official proposal on how to deal with these vulnerabiliies. In 2005, 115 a disclosure process was carried out by the UK's National 116 Infrastructure Security Co-ordination Centre (NISCC) (now CPNI, 117 Centre for the Protection of National Infrastructure), with the 118 collaboration of other computer emergency response teams. A large 119 number of implementations were found vulnerable to either all or a 120 subset of the attacks discussed in this document [NISCC][US-CERT]. 121 The affected systems ranged from TCP/IP implementations meant for 122 desktop computers, to TCP/IP implementations meant for core Internet 123 routers. 125 It is clear that implementations should be more cautious when 126 processing ICMP error messages, to eliminate or mitigate the use of 127 ICMP to perform attacks against TCP [RFC4907]. 129 This document aims to raise awareness of the use of ICMP to perform a 130 variety of attacks against TCP, and discusses several counter- 131 measures that eliminate or minimize the impact of these attacks. 132 Most of the these counter-measures can be implemented while still 133 remaining compliant with the current specifications, as they simply 134 suggest reasons for not taking the advice provided in the 135 specifications in terms of "SHOULDs", but still comply with the 136 requirements stated as "MUSTs". 138 Section 2 provides background information on ICMP. Section 3 139 discusses the constraints in the general counter-measures that can be 140 implemented against the attacks described in this document. 141 Section 4 proposes several general validation checks that can be 142 implemented to mitigate any ICMP-based attack. Finally, Section 5, 143 Section 6, and Section 7, discuss a variety of ICMP attacks that can 144 be performed against TCP, and propose attack-specific counter- 145 measures that eliminate or greatly mitigate their impact. 147 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 148 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 149 document are to be interpreted as described in RFC 2119 [RFC2119]. 151 2. Background 153 2.1. The Internet Control Message Protocol (ICMP) 155 The Internet Control Message Protocol (ICMP) is used in the Internet 156 Architecture mainly to perform the fault-isolation function, that is, 157 the group of actions that hosts and routers take to determine that 158 there is some network failure [RFC0816]. 160 When an intermediate router detects a network problem while trying to 161 forward an IP packet, it will usually send an ICMP error message to 162 the source system, to raise awareness of the network problem taking 163 place. In the same way, there are a number of scenarios in which an 164 end-system may generate an ICMP error message if it finds a problem 165 while processing a datagram. The received ICMP errors are handed to 166 the corresponding transport-protocol instance, which will usually 167 perform a fault recovery function. 169 It is important to note that ICMP error messages are unreliable, and 170 may be discarded due to data corruption, network congestion or rate- 171 limiting. Thus, while they provide useful information, upper layer 172 protocols cannot depend on ICMP for correct operation. 174 2.1.1. ICMP for IP version 4 (ICMP) 176 [RFC0792] specifies the Internet Control Message Protocol (ICMP) to 177 be used with the Internet Protocol version 4 (IPv4). It defines, 178 among other things, a number of error messages that can be used by 179 end-systems and intermediate systems to report errors to the sending 180 system. The Host Requirements RFC [RFC1122] classifies ICMP error 181 messages into those that indicate "soft errors", and those that 182 indicate "hard errors", thus roughly defining the semantics of them. 184 The ICMP specification [RFC0792] also defines the ICMP Source Quench 185 message (type 4, code 0), which is meant to provide a mechanism for 186 flow control and congestion control. 188 [RFC1191] defines a mechanism called "Path MTU Discovery" (PMTUD), 189 which makes use of ICMP error messages of type 3 (Destination 190 Unreachable), code 4 (fragmentation needed and DF bit set) to allow 191 systems to determine the MTU of an arbitrary internet path. 193 Appendix D of [RFC4301] provides information about which ICMP error 194 messages are produced by hosts, intermediate routers, or both. 196 2.1.2. ICMP for IP version 6 (ICMPv6) 198 [RFC4443] specifies the Internet Control Message Protocol (ICMPv6) to 199 be used with the Internet Protocol version 6 (IPv6) [RFC2460]. 201 [RFC4443] defines the "Packet Too Big" (type 2, code 0) error 202 message, that is analogous to the ICMP "fragmentation needed and DF 203 bit set" (type 3, code 4) error message. [RFC1981] defines the Path 204 MTU Discovery mechanism for IP Version 6, that makes use of these 205 messages to determine the MTU of an arbitrary internet path. 207 Appendix D of [RFC4301] provides information about which ICMPv6 error 208 messages are produced by hosts, intermediate routers, or both. 210 2.2. Handling of ICMP error messages 212 The Host Requirements RFC [RFC1122] states in Section 4.2.3.9 that a 213 TCP MUST act on an ICMP error message passed up from the IP layer, 214 directing it to the connection that elicited the error. 216 In order to allow ICMP messages to be demultiplexed by the receiving 217 system, part of the original packet that elicited the message is 218 included in the payload of the ICMP error message. Thus, the 219 receiving system can use that information to match the ICMP error to 220 the transport protocol instance that elicited it. 222 Neither the Host Requirements RFC [RFC1122] nor the original TCP 223 specification [RFC0793] recommend any validation checks on the 224 received ICMP messages. Thus, as long as the ICMP payload contains 225 the information that identifies an existing communication instance, 226 it will be processed by the corresponding transport-protocol 227 instance, and the corresponding action will be performed. 229 Therefore, in the case of TCP, an attacker could send a forged ICMP 230 message to the attacked system, and, as long as he is able to guess 231 the four-tuple (i.e., Source IP Address, Source TCP port, Destination 232 IP Address, and Destination TCP port) that identifies the 233 communication instance to be attacked, he will be able to use ICMP to 234 perform a variety of attacks. 236 Generally, the four-tuple required to perform these attacks is not 237 known. However, as discussed in [Watson] and [RFC4953], there are a 238 number of scenarios (notably that of TCP connections established 239 between two BGP routers [RFC4271]), in which an attacker may be able 240 to know or guess the four-tuple that identifies a TCP connection. In 241 such a case, if we assume the attacker knows the two systems involved 242 in the TCP connection to be attacked, both the client-side and the 243 server-side IP addresses could be known or be within a reasonable 244 number of possibilities. Furthermore, as most Internet services use 245 the so-called "well-known" ports, only the client port number might 246 need to be guessed. In such a scenario, an attacker would need to 247 send, in principle, at most 65536 packets to perform any of the 248 attacks described in this document. These issues are exacerbated by 249 the fact that most systems choose the port numbers they use for 250 outgoing connections from a subset of the whole port number space, 251 thus reducing the amount of work needed to successfully perform these 252 attacks. 254 The need to be more more cautious when processing received ICMP error 255 messages in order to mitigate or eliminate the impact of the attacks 256 described in this document has been documented by the Internet 257 Architecture Board (IAB) in [RFC4907]. 259 2.3. Handling of ICMP error messages in the context of IPsec 261 Section 5.2 of [RFC4301] describes the processing of inbound IP 262 Traffic in the case of "unprotected-to-protected". In the case of 263 ICMP, when an unprotected ICMP error message is received, it is 264 matched to the corresponding security association by means of the SPI 265 (Security Parameters Index) included in the payload of the ICMP error 266 message. Then, local policy is applied to determine whether to 267 accept or reject the message and, if accepted, what action to take as 268 a result. For example, if an ICMP unreachable message is received, 269 the implementation must decide whether to act on it, reject it, or 270 act on it with constraints. Section 8 ("Path MTU/DF processing") 271 discusses the processing of unauthenticated ICMP "fragmentation 272 needed and DF bit set" (type 3, code 3) and ICMPv6 "Packet Too Big" 273 (type 2, code 0) messages when an IPsec implementation is configured 274 to process (vs. ignore) such messages. 276 Section 6.1.1 of [RFC4301] notes that processing of unauthenticated 277 ICMP error messages may result in denial or degradation of service, 278 and therefore it would be desirable to ignore such messages. 279 However, it also notes that in many cases ignoring these ICMP 280 messages can degrade service, e.g., because of a failure to process 281 PMTUD and redirection messages, and therefore there is also a 282 motivation for accepting and acting upon them. It finally states 283 that to accommodate both ends of this spectrum, a compliant IPsec 284 implementation MUST permit a local administrator to configure an 285 IPsec implementation to accept or reject unauthenticated ICMP 286 traffic, and that this control MUST be at the granularity of ICMP 287 type and MAY be at the granularity of ICMP type and code. 288 Additionally, an implementation SHOULD incorporate mechanisms and 289 parameters for dealing with such traffic. 291 Thus, the policy to apply for the processing of unprotected ICMP 292 error messages is left up to the implementation and administrator. 294 3. Constraints in the possible solutions 296 For ICMPv4, [RFC0792] states that the internet header plus the first 297 64 bits of the packet that elicited the ICMP message are to be 298 included in the payload of the ICMP error message. Thus, it is 299 assumed that all data needed to identify a transport protocol 300 instance and process the ICMP error message is contained in the first 301 64 bits of the transport protocol header. Section 3.2.2 of [RFC1122] 302 states that "the Internet header and at least the first 8 data octets 303 of the datagram that triggered the error" are to be included in the 304 payload of ICMP error messages, and that "more than 8 octets MAY be 305 sent", thus allowing implementations to include more data from the 306 original packet than those required by the original ICMP 307 specification. The Requirements for IP Version 4 Routers RFC 308 [RFC1812] states that ICMP error messages "SHOULD contain as much of 309 the original datagram as possible without the length of the ICMP 310 datagram exceeding 576 bytes". 312 Thus, for ICMP messages generated by hosts, we can only expect to get 313 the entire IP header of the original packet, plus the first 64 bits 314 of its payload. For TCP, this means that the only fields that will 315 be included in the ICMP payload are: the source port number, the 316 destination port number, and the 32-bit TCP sequence number. This 317 clearly imposes a constraint on the possible validation checks that 318 can be performed, as there is not much information avalable on which 319 to perform them. 321 This means, for example, that even if TCP were signing its segments 322 by means of the TCP MD5 signature option [RFC2385], this mechanism 323 could not be used as a counter-measure against ICMP-based attacks, 324 because, as ICMP messages include only a piece of the TCP segment 325 that elicited the error, the MD5 [RFC1321] signature could not be 326 recalculated. In the same way, even if the attacked peer were 327 authenticating its packets at the IP layer [RFC4301], because only a 328 part of the original IP packet would be available, the signature used 329 for authentication could not be recalculated, and thus the 330 authentication header in the original packet could not be used as a 331 counter-measure for ICMP-based attacks against TCP. 333 For IPv6, the payload of ICMPv6 error messages includes as many 334 octets from the IPv6 packet that elicited the ICMPv6 error message as 335 will fit without making the resulting ICMPv6 error message exceed the 336 minimum IPv6 MTU (1280 octets) [RFC4443]. Thus, more information is 337 available than in the IPv4 case. 339 Hosts could require ICMP error messages to be authenticated 340 [RFC4301], in order to act upon them. However, while this 341 requirement could make sense for those ICMP error messages sent by 342 hosts, it would not be feasible for those ICMP error messages 343 generated by routers, as this would imply either that the attacked 344 system should have a security association [RFC4301] with every 345 existing intermediate system, or that it should be able to establish 346 one dynamically. Current levels of deployment of protocols for 347 dynamic establishment of security associations makes this unfeasible. 348 Also, there may be some scenarios, such as embedded devices, in which 349 the processing power requirements of authentication might not allow 350 IPSec authentication to be implemented effectively. 352 4. General counter-measures against ICMP attacks 354 The following subsections describe a number of mitigation techniques 355 that help to eliminate or mitigate the impact of the attacks 356 discussed in this document. Rather than being alternative counter- 357 measures, they can be implemented together to increase the protection 358 against these attacks. 360 4.1. TCP sequence number checking 362 The current specifications do not impose any validity checks on the 363 TCP segment that is contained in the ICMP payload. For instance, no 364 checks are performed to verify that a received ICMP error message has 365 been elicited by a segment that was "in flight" to the destination. 366 Thus, even stale ICMP error messages will be acted upon. 368 Many TCP implementations have incorporated a validation check so 369 makes TCP react only to those ICMP error messages elicited by 370 segments that were "in-flight" to the destination system. These 371 implementations check that the TCP sequence number contained in the 372 payload of the ICMP error message is within the range SND.UNA =< 373 SEG.SEQ < SND.NXT. This means that they require that the sequence 374 number be within the range of the data already sent but not yet 375 acknowledged. If an ICMP error message does not pass this check, it 376 is discarded. 378 Even if an attacker were able to guess the four-tuple that identifies 379 the TCP connection, this additional check would reduce the 380 possibility of considering a spoofed ICMP packet as valid to 381 Flight_Size/2^^32 (where Flight_Size is the number of data bytes 382 already sent to the remote peer, but not yet acknowledged [RFC2581]). 383 For connections in the SYN-SENT or SYN-RECEIVED states, this would 384 reduce the possibility of considering a spoofed ICMP packet as valid 385 to 1/2^^32. For a TCP endpoint with no data "in flight", this would 386 completely eliminate the possibility of success of these attacks. 388 This validation check has been implemented in Linux [Linux] for many 389 years, in OpenBSD [OpenBSD] since 2004, and in FreeBSD [FreeBSD] and 390 NetBSD [NetBSD] since 2005. 392 It is important to note that while this check greatly increases the 393 number of packets required to perform any of the attacks discussed in 394 this document, this may not be enough in those scenarios in which 395 bandwidth is easily available, and/or large TCP windows [RFC1323] are 396 in use. Additionally, this validation check does not help to prevent 397 on-path attacks, that is, attacks performed in scenarios in which the 398 attacker can sniff the packets that correspond to the target TCP 399 connection. 401 4.2. Port randomization 403 As discussed in the previous sections, in order to perform any of the 404 attacks described in this document, an attacker would need to guess 405 (or know) the four-tuple that identifies the connection to be 406 attacked. Increasing the port number range used for outgoing TCP 407 connections, and randomizing the port number chosen for each outgoing 408 TCP conenctions would make it harder for an attacker to perform any 409 of the attacks discussed in this document. 411 [I-D.ietf-tsvwg-port-randomization] discusses a number of algorithms 412 to randomize the ephemeral ports used by clients. 414 4.3. Filtering ICMP error messages based on the ICMP payload 416 The source address of ICMP error messages does not need to be spoofed 417 to perform the attacks described in this document. Therefore, simple 418 filtering based on the source address of ICMP error messages does not 419 serve as a counter-measure against these attacks. However, a more 420 advanced packet filtering can be implemented in middlebox devices 421 such as firewalls and NATs. Middleboxes implementing such advanced 422 filtering look at the payload of the ICMP error messages, and perform 423 ingress and egress packet filtering based on the source IP address of 424 the IP header contained in the payload of the ICMP error message. As 425 the source IP address contained in the payload of the ICMP error 426 message does need to be spoofed to perform the attacks described in 427 this document, this kind of advanced filtering serves as a counter- 428 measure against these attacks. As with traditional egress filtering 429 [IP-filtering], egress filtering based on the ICMP payload can help 430 to prevent users of the network being protected by the firewall from 431 successfully performing ICMP attacks against TCP connections 432 established between external systems. Additionally, ingress 433 filtering based on the ICMP payload can prevent TCP connections 434 established between internal systems from attacks performed by 435 external systems. [ICMP-Filtering] provides examples of ICMP 436 filtering based on the ICMP payload. 438 This filtering technique has been implemented in OpenBSD's Packet 439 Filter [OpenBSD-PF], which has in turn been ported to a number of 440 systems, including FreeBSD [FreeBSD]. 442 5. Blind connection-reset attack 444 5.1. Description 446 When TCP is handed an ICMP error message, it will perform its fault 447 recovery function, as follows: 449 o If the network problem being reported is a hard error, TCP will 450 abort the corresponding connection. 452 o If the network problem being reported is a soft error, TCP will 453 just record this information, and repeatedly retransmit its data 454 until they either get acknowledged, or the connection times out. 456 The Host Requirements RFC [RFC1122] states (in Section 4.2.3.9) that 457 a host SHOULD abort the corresponding connection when receiving an 458 ICMP error message that indicates a "hard error", and states that 459 ICMP error messages of type 3 (Destination Unreachable) codes 2 460 (protocol unreachable), 3 (port unreachable), and 4 (fragmentation 461 needed and DF bit set) should be considered to indicate hard errors. 462 In the case of ICMP port unreachables, the specifications are 463 ambiguous, as Section 4.2.3.9 of [RFC1122] states that TCP SHOULD 464 abort the corresponding connection in response to them, but Section 465 3.2.2.1 of the same RFC ([RFC1122] states that TCP MUST abort the 466 connection in response to them. 468 While [RFC4443] did not exist when [RFC1122] was published, one could 469 extrapolate the concept of "hard errors" to ICMPv6 error messages of 470 type 1 (Destination unreachable) codes 1 (communication with 471 destination administratively prohibited), and 4 (port unreachable). 473 Thus, an attacker could use ICMP to perform a blind connection-reset 474 attack by sending any ICMP error message that indicates a "hard 475 error", to either of the two TCP endpoints of the connection. 476 Because of TCP's fault recovery policy, the connection would be 477 immediately aborted. 479 Some stacks are known to extrapolate ICMP hard errors across TCP 480 connections, increasing the impact of this attack, as a single ICMP 481 packet could bring down all the TCP connections between the 482 corresponding peers. 484 It is important to note that even if TCP itself were protected 485 against the blind connection-reset attack described in [Watson] and 486 [I-D.ietf-tcpm-tcpsecure], by means authentication at the network 487 layer [RFC4301], by means of the TCP MD5 signature option [RFC2385], 488 or by means of the mechanism proposed in [I-D.ietf-tcpm-tcpsecure], 489 the blind connection-reset attack described in this document would 490 still succeed. 492 5.2. Attack-specific counter-measures 494 This section describes a modification to TCP's reaction to ICMP hard 495 errors that has been incorporated in a large number of TCP 496 implementations. An analysis of each of the different ICMP "hard 497 error" messages is included in Appendix A. 499 TCPs implementing this modification treat all ICMP "hard errors" 500 received for connections in any of the synchronized states 501 (ESTABLISHED, FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, LAST-ACK 502 or TIME-WAIT)as "soft errors". Therefore, they do not abort the 503 corresponding connection upon receipt of them. Additionally, they do 504 not extrapolate ICMP errors across TCP connections. This policy is 505 based on the premise that TCP should be as robust as possible. 506 Aborting the connection would be to ignore the valuable feature of 507 the Internet that for many internal failures it reconstructs its 508 function without any disruption of the end points [RFC0816]. 510 It is interesting to note that, as ICMP error messages are 511 unreliable, transport protocols should not depend on them for correct 512 functioning. In the event one of these messages were legitimate, the 513 corresponding connection would eventually time out. Also, 514 applications may still be notified asynchronously about the error 515 contition, and thus may still abort their connections on their own if 516 they consider it appropriate. 518 In scenarios such as that in which an intermediate system sets the DF 519 bit in the segments transmitted by a TCP that does not implement 520 PMTUD, or the TCP at one of the endpoints of the connection is 521 dynamically disabled, TCP would only abort the connection after a 522 USER TIMEOUT [RFC0793], losing responsiveness. However, these 523 scenarios are very unlikely in production environments, and it is 524 probably preferebable to potentially lose responsiveness for the sake 525 of robustness. It should also be noted that applications may still 526 be notified asynchronously about the error condition, and thus may 527 still abort their connections on their own if they consider it 528 appropriate. 530 In scenarios of multipath routing or route changes, failures in some 531 (but not all) of the paths may elicit ICMP error messages that would 532 likely not cause a connection abort if any of the counter-measures 533 described in this section were implemented. However, aborting the 534 connection would be to ignore the valuable feature of the Internet 535 that for many internal failures it reconstructs its function without 536 any disruption of the end points [RFC0816]. That is, communication 537 should survive if there is still a working path to the destination 538 system [DClark]. Additionally, applications may still be notified 539 asynchronously about the error condition, and thus may still abort 540 their connections on their own if they consider it appropriate. 542 This counter-measure has been implemented in BSD-derived TCP/IP 543 implementations (e.g., [FreeBSD], [NetBSD], and [OpenBSD]) for more 544 than ten years [Wright][McKusick]. The Linux kernel has also 545 implemented this policy for more than ten years [Linux]. 547 6. Blind throughput-reduction attack 549 6.1. Description 551 The Host requirements RFC [RFC1122] states in Section 4.2.3.9 that 552 hosts MUST react to ICMP Source Quench messages by slowing 553 transmission on the connection. Thus, an attacker could send ICMP 554 Source Quench (type 4, code 0) messages to a TCP endpoint to make it 555 reduce the rate at which it sends data to the other end-point of the 556 connection. [RFC1122] further adds that the RECOMMENDED procedure is 557 to put the corresponding connection in the slow-start phase of TCP's 558 congestion control algorithm [RFC2581]. In the case of those 559 implementations that use an initial congestion window of one segment, 560 a sustained attack would reduce the throughput of the attacked 561 connection to about SMSS (Sender Maximum Segment Size) [RFC2581] 562 bytes per RTT (round-trip time). The throughput achieved during an 563 attack might be a little higher if a larger initial congestion window 564 is in use [RFC3390]. 566 6.2. Attack-specific counter-measures 568 As discussed in the Requirements for IP Version 4 Routers RFC 569 [RFC1812], research seems to suggest that ICMP Source Quench is an 570 ineffective (and unfair) antidote for congestion. [RFC1812] further 571 states that routers SHOULD NOT send ICMP Source Quench messages in 572 response to congestion. On the other hand, TCP implements its own 573 congestion control mechanisms [RFC2581] [RFC3168], that do not depend 574 on ICMP Source Quench messages. 576 Based on this reasoning, a large number of implementations completely 577 ignore ICMP Source Quench messages meant for TCP connections. This 578 behavior has been implemented in, at least, Linux [Linux] since 2004, 579 and in FreeBSD [FreeBSD], NetBSD [NetBSD], and OpenBSD [OpenBSD] 580 since 2005. However, it must be noted that this behaviour violates 581 the requirement in [RFC1122] to react to ICMP Source Quench messages 582 by slowing transmission on the connection. 584 7. Blind performance-degrading attack 586 7.1. Description 588 When one IP system has a large amount of data to send to another 589 system, the data will be transmitted as a series of IP datagrams. It 590 is usually preferable that these datagrams be of the largest size 591 that does not require fragmentation anywhere along the path from the 592 source to the destination. This datagram size is referred to as the 593 Path MTU (PMTU), and is equal to the minimum of the MTUs of each hop 594 in the path. A technique called "Path MTU Discovery" (PMTUD) lets IP 595 systems determine the Path MTU of an arbitrary internet path. 596 [RFC1191] and [RFC1981] specify the PMTUD mechanism for IPv4 and 597 IPv6, respectively. 599 The PMTUD mechanism for IPv4 uses the Don't Fragment (DF) bit in the 600 IP header to dynamically discover the Path MTU. The basic idea 601 behind the PMTUD mechanism is that a source system assumes that the 602 MTU of the path is that of the first hop, and sends all its datagrams 603 with the DF bit set. If any of the datagrams is too large to be 604 forwarded without fragmentation by some intermediate router, the 605 router will discard the corresponding datagram, and will return an 606 ICMP "Destination Unreachable" (type 3) "fragmentation neeed and DF 607 set" (code 4) error message to the sending system. This message will 608 report the MTU of the constricting hop, so that the sending system 609 can reduce the assumed Path-MTU accordingly. 611 For IPv6, intermediate systems do not fragment packets. Thus, 612 there's an "implicit" DF bit set in every packet sent on a network. 613 If any of the datagrams is too large to be forwarded without 614 fragmentation by some intermediate router, the router will discard 615 the corresponding datagram, and will return an ICMPv6 "Packet Too 616 Big" (type 2, code 0) error message to sending system. This message 617 will report the MTU of the constricting hop, so that the sending 618 system can reduce the assumed Path-MTU accordingly. 620 As discussed in both [RFC1191] and [RFC1981], the Path-MTU Discovery 621 mechanism can be used to attack TCP. An attacker could send a forged 622 ICMP "Destination Unreachable, fragmentation needed and DF set" 623 packet (or their ICMPv6 counterpart) to the sending system, 624 advertising a small Next-Hop MTU. As a result, the attacked system 625 would reduce the size of the packets it sends for the corresponding 626 connection accordingly. 628 The effect of this attack is two-fold. On one hand, it will increase 629 the headers/data ratio, thus increasing the overhead needed to send 630 data to the remote TCP end-point. On the other hand, if the attacked 631 system wanted to keep the same throughput it was achieving before 632 being attacked, it would have to increase the packet rate. On 633 virtually all systems this will lead to an increase in the IRQ 634 (Interrrupt ReQuest) rate and protocol processing time, thus 635 increasing processor utilization, and degrading the overall system 636 performance. 638 A particular scenario that may take place is that in which an 639 attacker reports a Next-Hop MTU smaller than or equal to the amount 640 of bytes needed for headers (IP header, plus TCP header). For 641 example, if the attacker reports a Next-Hop MTU of 68 bytes, and the 642 amount of bytes used for headers (IP header, plus TCP header) is 643 larger than 68 bytes, the assumed Path-MTU will not even allow the 644 attacked system to send a single byte of application data without 645 fragmentation. This particular scenario might lead to unpredictable 646 results. Another posible scenario is that in which a TCP connection 647 is being secured by means of IPSec. If the Next-Hop MTU reported by 648 the attacker is smaller than the amount of bytes needed for headers 649 (IP and IPSec, in this case), the assumed Path-MTU will not even 650 allow the attacked system to send a single byte of the TCP header 651 without fragmentation. This is another scenario that may lead to 652 unpredictable results. 654 For IPv4, the reported Next-Hop MTU could be as low as 68 octets, as 655 [RFC0791] requires every internet module to be able to forward a 656 datagram of 68 octets without further fragmentation. For IPv6, the 657 reported Next-Hop MTU could be as low as 1280 octets (the minimum 658 IPv6 MTU) [RFC2460]. 660 7.2. Attack-specific counter-measures 662 This section describes a modification to the PMTUD mechanism 663 specified in [RFC1191] and [RFC1981] that has been implemented in a 664 variety of TCP implementations to improve TCP's resistance to the 665 blind performance-degrading attack described in Section 7.1. The 666 described mechanism basically disregards ICMP messages when a 667 connection makes progress. This modification does not violate any of 668 the requirements stated in [RFC1191] and [RFC1981]. 670 Henceforth, we will refer to both ICMP "fragmentation needed and DF 671 bit set" and ICMPv6 "Packet Too Big" messages as "ICMP Packet Too 672 Big" messages. 674 In addition to the general validation check described in Section 4.1, 675 these implementations include a modification to TCP's reaction to 676 ICMP "Packet Too Big" error messages that disregards them when a 677 connection makes progress, and honors them only after the 678 corresponding data have been retransmitted a specified number of 679 times. This means that upon receipt of an ICMP "Packet Too Big" 680 error message, TCP just records this information, and honors it only 681 when the corresponding data have already been retransmitted a 682 specified number of times. 684 While this basic policy would greatly mitigate the impact of the 685 attack against the PMTUD mechanism, it would also mean that it might 686 take TCP more time to discover the Path-MTU for a TCP connection. 687 This would be particularly annoying for connections that have just 688 been established, as it might take TCP several transmission attempts 689 (and the corresponding timeouts) before it discovers the PMTU for the 690 corresponding connection. Thus, this policy would increase the time 691 it takes for data to begin to be received at the destination host. 693 In order to protect TCP from the attack against the PMTUD mechanism, 694 while still allowing TCP to quickly determine the initial Path-MTU 695 for a connection, the aforementioned implementations have divided the 696 traditional PMTUD mechanism into two stages: Initial Path-MTU 697 Discovery, and Path-MTU Update. 699 The Initial Path-MTU Discovery stage is when TCP tries to send 700 segments that are larger than the ones that have so far been sent and 701 acknowledged for this connection. That is, in the Initial Path-MTU 702 Discovery stage TCP has no record of these large segments getting to 703 the destination host, and thus these implementations believe the 704 network when it reports that these packets are too large to reach the 705 destination host without being fragmented. 707 The Path-MTU Update stage is when TCP tries to send segments that are 708 equal to or smaller than the ones that have already been sent and 709 acknowledged for this connection. During the Path-MTU Update stage, 710 TCP already has knowledge of the estimated Path-MTU for the given 711 connection. Thus, in this case these implementations are more 712 cautious with the errors being reported by the network. 714 In order to allow TCP to distinguish segments between those 715 performing Initial Path-MTU Discovery and those performing Path-MTU 716 Update, two new variables are introduced to TCP: maxsizeacked and 717 maxsizesent. 719 maxsizesent holds the size (in octets) of the largest packet that has 720 so far been sent for this connection. It is initialized to 68 (the 721 minimum IPv4 MTU) when the underlying internet protocol is IPv4, and 722 is initialized to 1280 (the minimum IPv6 MTU) when the underlying 723 internet protocol is IPv6. Whenever a packet larger than maxsizesent 724 octets is sent, maxsizesent is set to that value. 726 On the other hand, maxsizeacked holds the size (in octets) of the 727 largest packet that has so far been acknowledged for this connection. 728 It is initialized to 68 (the minimum IPv4 MTU) when the underlying 729 internet protocol is IPv4, and is initialized to 1280 (the minimum 730 IPv6 MTU) when the underlying internet protocol is IPv6. Whenever an 731 acknowledgement for a packet larger than maxsizeacked octets is 732 received, maxsizeacked is set to the size of that acknowledged 733 packet. 735 Upon receipt of an ICMP "Packet Too Big" error message, the Next-Hop 736 MTU claimed by the ICMP message (henceforth "claimedmtu") is compared 737 with maxsizesent. If claimedmtu is equal to or larger than 738 maxsizesent, then the ICMP error message is silently discarded. The 739 rationale for this is that the ICMP error message cannot be 740 legitimate if it claims to have been elicited by a packet larger than 741 the largest packet we have so far sent for this connection. 743 If this check is passed, claimedmtu is compared with maxsizeacked. 744 If claimedmtu is equal to or larger than maxsizeacked, TCP is 745 supposed to be at the Initial Path-MTU Discovery stage, and thus the 746 ICMP "Packet Too Big" error message is honored immediately. That is, 747 the assumed Path-MTU is updated according to the Next-Hop MTU claimed 748 in the ICMP error message. Also, maxsizesent is reset to the minimum 749 MTU of the internet protocol in use (68 for IPv4, and 1280 for IPv6). 751 On the other hand, if claimedmtu is smaller than maxsizeacked, TCP is 752 supposed to be in the Path-MTU Update stage. At this stage, these 753 implementations are more cautious with the errors being reported by 754 the network, and therefore just record the received error message, 755 and delay the update of the assumed Path-MTU. 757 To perform this delay, one new variable and one new parameter is 758 introduced to TCP: nsegrto and MAXSEGRTO. nsegrto holds the number of 759 times a specified segment has timed out. It is initialized to zero, 760 and is incremented by one every time the corresponding segment times 761 out. MAXSEGRRTO specifies the number of times a given segment must 762 timeout before an ICMP "Packet Too Big" error message can be honored, 763 and can be set, in principle, to any value greater than or equal to 764 0. 766 Thus, if nsegrto is greater than or equal to MAXSEGRTO, and there's a 767 pending ICMP "Packet Too Big" error message, the corresponding error 768 message is processed. At that point, maxsizeacked is set to 769 claimedmtu, and maxsizesent is set to 68 (for IPv4) or 1280 (for 770 IPv6). 772 If while there is a pending ICMP "Packet Too Big" error message the 773 TCP SEQ claimed by the pending message is acknowledged (i.e., an ACK 774 that acknowledges that sequence number is received), then the 775 "pending error" condition is cleared. 777 The rationale behind performing this delayed processing of ICMP 778 "Packet Too Big" messages is that if there is progress on the 779 connection, the ICMP "Packet Too Big" errors must be a false claim. 780 By checking for progress on the connection, rather than just for 781 staleness of the received ICMP messages, TCP is protected from attack 782 even if the offending ICMP messages are "in window", and as a 783 corollary, is made more robust to spurious ICMP messages elicited by, 784 for example, corrupted TCP segments. 786 MAXSEGRTO can be set, in principle, to any value greater than or 787 equal to 0. Setting MAXSEGRTO to 0 would make TCP perform the 788 traditional PMTUD mechanism defined in [RFC1191] and [RFC1981]. A 789 MAXSEGRTO of 1 provides enough protection for most cases. In any 790 case, implementations are free to choose higher values for this 791 constant. MAXSEGRTO could be a function of the Next-Hop MTU claimed 792 in the received ICMP "Packet Too Big" message. That is, higher 793 values for MAXSEGRTO could be imposed when the received ICMP "Packet 794 Too Big" message claims a Next-Hop MTU that is smaller than some 795 specified value. 797 In the event a higher level of protection is desired at the expense 798 of a higher delay in the discovery of the Path-MTU, an implementation 799 could consider TCP to always be in the Path-MTU Update stage, thus 800 always delaying the update of the assumed Path-MTU. 802 Section 7.3 shows the proposed counter-measure in action. 803 Section 7.4 shows the proposed counter-measure in pseudo-code. 805 This behavior has been implemented in NetBSD [NetBSD] and OpenBSD 806 [OpenBSD] since 2005. 808 It is important to note that the mechanism proposed in this section 809 is an improvement to the current Path-MTU discovery mechanism, to 810 mitigate its security implications. The current PMTUD mechanism, as 811 specified by [RFC1191] and [RFC1981], still suffers from some 812 functionality problems [RFC2923] that this document does not aim to 813 address. A mechanism that addresses those issues is described in 814 [RFC4821]. 816 7.3. The counter-measure for the PMTUD attack in action 818 This SECTION shows the proposed counter-measure for the ICMP attack 819 against the PMTUD mechanism in action. It shows both how the fix 820 protects TCP from being attacked and how the counter-measure works in 821 normal scenarios. As discussed in Section 7.2, this section assumes 822 the PMTUD-specific counter-measure is implemented in addition to the 823 TCP sequence number checking described in Section 4.1. 825 Figure 1 illustrates an hypothetical scenario in which two hosts are 826 connected by means of three intermediate routers. It also shows the 827 MTU of each hypothetical hop. All the following subsections assume 828 the network setup of this figure. 830 Also, for simplicity sake, all subsections assume an IP header of 20 831 octets and a TCP header of 20 octets. Thus, for example, when the 832 PMTU is assumed to be 1500 octets, TCP will send segments that 833 contain, at most, 1460 octets of data. 835 For simplicity sake, all the following subsections assume the TCP 836 implementation at Host 1 has chosen a a MAXSEGRTO of 1. 838 +----+ +----+ +----+ +----+ +----+ 839 | H1 |--------| R1 |--------| R2 |--------| R3 |--------| H2 | 840 +----+ +----+ +----+ +----+ +----+ 841 MTU=4464 MTU=2048 MTU=1500 MTU=4464 843 Figure 1: Hypothetical scenario 845 7.3.1. Normal operation for bulk transfers 847 This subsection shows the proposed counter-measure in normal 848 operation, when a TCP connection is used for bulk transfers. That 849 is, it shows how the proposed counter-measure works when there is no 850 attack taking place, and a TCP connection is used for transferring 851 large amounts of data. This section assumes that just after the 852 connection is established, one of the TCP endpoints begins to 853 transfer data in packets that are as large as possible. 855 Host 1 Host 2 857 1. --> --> 858 2. <-- <-- 859 3. --> --> 860 4. --> --> 861 5. <--- ICMP "Packet Too Big" MTU=2048, TCPseq#=101 <--- R1 862 6. --> --> 863 7. <--- ICMP "Packet Too Big" MTU=1500, TCPseq#=101 <--- R2 864 8. --> --> 865 9. <-- <-- 867 Figure 2: Normal operation for bulk transfers 869 nsegrto is initialized to zero. Both maxsizeacked and maxsizesent 870 are initialized to the minimum MTU for the internet protocol being 871 used (68 for IPv4, and 1280 for IPv6). 873 In lines 1 to 3 the three-way handshake takes place, and the 874 connection is established. In line 4, H1 tries to send a full-sized 875 TCP segment. As described by [RFC1191] and [RFC1981], in this case 876 TCP will try to send a segment with 4424 bytes of data, which will 877 result in an IP packet of 4464 octets. Therefore, maxsizesent is set 878 to 4464. When the packet reaches R1, it elicits an ICMP "Packet Too 879 Big" error message. 881 In line 5, H1 receives the ICMP error message, which reports a Next- 882 Hop MTU of 2048 octets. After performing the TCP sequence number 883 check described in Section 4.1, the Next-Hop MTU reported by the ICMP 884 error message (claimedmtu) is compared with maxsizesent. As it is 885 smaller than maxsizesent, it passes the check, and thus is then 886 compared with maxsizeacked. As claimedmtu is larger than 887 maxsizeacked, TCP assumes that the corresponding TCP segment was 888 performing the Initial PMTU Discovery. Therefore, the TCP at H1 889 honors the ICMP message by updating the assumed Path-MTU. maxsizesent 890 is reset to the minimum MTU of the internet protocol in use (68 for 891 IPv4, and 1280 for IPv6). 893 In line 6, the TCP at H1 sends a segment with 2008 bytes of data, 894 which results in an IP packet of 2048 octets. maxsizesent is thus set 895 to 2008 bytes. When the packet reaches R2, it elicits an ICMP 896 "Packet Too Big" error message. 898 In line 7, H1 receives the ICMP error message, which reports a Next- 899 Hop MTU of 1500 octets. After performing the TCP sequence number 900 check, the Next-Hop MTU reported by the ICMP error message 901 (claimedmtu) is compared with maxsizesent. As it is smaller than 902 maxsizesent, it passes the check, and thus is then compared with 903 maxsizeacked. As claimedmtu is larger than maxsizeacked, TCP assumes 904 that the corresponding TCP segment was performing the Initial PMTU 905 Discovery. Therefore, the TCP at H1 honors the ICMP message by 906 updating the assumed Path-MTU. maxsizesent is reset to the minimum 907 MTU of the internet protocol in use. 909 In line 8, the TCP at H1 sends a segment with 1460 bytes of data, 910 which results in an IP packet of 1500 octets. maxsizesent is thus set 911 to 1500. This packet reaches H2, where it elicits an acknowledgement 912 (ACK) segment. 914 In line 9, H1 finally gets the acknowledgement for the data segment. 915 As the corresponding packet was larger than maxsizeacked, TCP updates 916 maxsizeacked, setting it to 1500. At this point TCP has discovered 917 the Path-MTU for this TCP connection. 919 7.3.2. Operation during Path-MTU changes 921 Let us suppose a TCP connection between H1 and H2 has already been 922 established, and that the PMTU for the connection has already been 923 discovered to be 1500. At this point, both maxsizesent and 924 maxsizeacked are equal to 1500, and nsegrto is equal to 0. Suppose 925 some time later the PMTU decreases to 1492. For simplicity, let us 926 suppose that the Path-MTU has decreased because the MTU of the link 927 between R2 and R3 has decreased from 1500 to 1492. Figure 3 928 illustrates how the proposed counter-measure would work in this 929 scenario. 931 Host 1 Host 2 933 1. (Path-MTU decreases) 934 2. --> --> 935 3. <--- ICMP "Packet Too Big" MTU=1492, TCPseq#=100 <--- R2 936 4. (Segment times out) 937 5. --> --> 938 6. <-- <-- 940 Figure 3: Operation during Path-MTU changes 942 In line 1, the Path-MTU for this connection decreases from 1500 to 943 1492. In line 2, the TCP at H1, without being aware of the Path-MTU 944 change, sends a 1500-byte packet to H2. When the packet reaches R2, 945 it elicits an ICMP "Packet Too Big" error message. 947 In line 3, H1 receives the ICMP error message, which reports a Next- 948 Hop MTU of 1492 octets. After performing the TCP sequence number 949 check, the Next-Hop MTU reported by the ICMP error message 950 (claimedmtu) is compared with maxsizesent. As claimedmtu is smaller 951 than maxsizesent, it is then compared with maxsizeacked. As 952 claimedmtu is smaller than maxsizeacked (full-sized packets were 953 getting to the remote end-point), this packet is assumed to be 954 performing Path-MTU Update. And a "pending error" condition is 955 recorded. 957 In line 4, the segment times out. Thus, nsegrto is incremented by 1. 958 As nsegrto is greater than or equal to MAXSEGRTO, the assumed Path- 959 MTU is updated. nsegrto is reset to 0, and maxsizeacked is set to 960 claimedmtu, and maxsizesent is set to the minimum MTU of the internet 961 protocol in use. 963 In line 5, H1 retransmits the data using the updated PMTU, and thus 964 maxsizesent is set to 1492. The resulting packet reaches H2, where 965 it elicits an acknowledgement (ACK) segment. 967 In line 6, H1 finally gets the acknowledgement for the data segment. 968 At this point TCP has discovered the new Path-MTU for this TCP 969 connection. 971 7.3.3. Idle connection being attacked 973 Let us suppose a TCP connection between H1 and H2 has already been 974 established, and the PMTU for the connection has already been 975 discovered to be 1500. Figure 4 shows a sample time-line diagram 976 that illustrates an idle connection being attacked. 978 Host 1 Host 2 980 1. --> --> 981 2. <-- <-- 982 3. <--- ICMP "Packet Too Big" MTU=68, TCPseq#=100 <--- 983 4. <--- ICMP "Packet Too Big" MTU=68, TCPseq#=100 <--- 984 5. <--- ICMP "Packet Too Big" MTU=68, TCPseq#=100 <--- 986 Figure 4: Idle connection being attacked 988 In line 1, H1 sends its last bunch of data. At line 2, H2 989 acknowledges the receipt of these data. Then the connection becomes 990 idle. In lines 3, 4, and 5, an attacker sends forged ICMP "Packet 991 Too Big" error messages to H1. Regardless of how many packets it 992 sends and the TCP sequence number each ICMP packet includes, none of 993 these ICMP error messages will pass the TCP sequence number check 994 described in Section 4.1, as H1 has no unacknowledged data in flight 995 to H2. Therefore, the attack does not succeed. 997 7.3.4. Active connection being attacked after discovery of the Path-MTU 999 Let us suppose an attacker attacks a TCP connection for which the 1000 PMTU has already been discovered. In this case, as illustrated in 1001 Figure 1, the PMTU would be found to be 1500 bytes. Figure 5 shows a 1002 possible packet exchange. 1004 Host 1 Host 2 1006 1. --> --> 1007 2. --> --> 1008 3. --> --> 1009 4. --> --> 1010 5. <--- ICMP "Packet Too Big" MTU=68, TCPseq#=100 <--- 1011 6. <-- <-- 1013 Figure 5: Active connection being attacked after discovery of PMTU 1015 As we assume the PMTU has already been discovered, we also assume 1016 both maxsizesent and maxsizeacked are equal to 1500. We assume 1017 nsegrto is equal to zero, as there have been no segment timeouts. 1019 In lines 1, 2, 3, and 4, H1 sends four data segments to H2. In line 1020 5, an attacker sends a forged ICMP packet to H1. We assume the 1021 attacker is lucky enough to guess both the four-tuple that identifies 1022 the connection and a valid TCP sequence number. As the Next-Hop MTU 1023 claimed in the ICMP "Packet Too Big" message (claimedmtu) is smaller 1024 than maxsizeacked, this packet is assumed to be performing Path-MTU 1025 Update. Thus, the error message is recorded. 1027 In line 6, H1 receives an acknowledgement for the segment sent in 1028 line 1, before it times out. At this point, the "pending error" 1029 condition is cleared, and the recorded ICMP "Packet Too Big" error 1030 message is ignored. Therefore, the attack does not succeed. 1032 7.3.5. TCP peer attacked when sending small packets just after the 1033 three-way handshake 1035 This section analyzes an scenario in which a TCP peer that is sending 1036 small segments just after the connection has been established, is 1037 attacked. The connection could be being used by protocols such as 1038 SMTP [RFC2821] and HTTP [RFC2616], for example, which usually behave 1039 like this. 1041 Figure 6 shows a possible packet exchange for such scenario. 1043 Host 1 Host 2 1045 1. --> --> 1046 2. <-- <-- 1047 3. --> --> 1048 4. --> --> 1049 5. <-- <-- 1050 6. --> --> 1051 7. --> --> 1052 8. <--- ICMP "Packet Too Big" MTU=150, TCPseq#=101 <--- 1054 Figure 6: TCP peer attacked when sending small packets just after the 1055 three-way handshake 1057 nsegrto is initialized to zero. Both maxsizesent and maxsizeacked 1058 are initialized to the minimum MTU for the internet protocol being 1059 used (68 for IPv4, and 1280 for IPv6). 1061 In lines 1 to 3 the three-way handshake takes place, and the 1062 connection is established. At this point, the assumed Path-MTU for 1063 this connection is 4464. In line 4, H1 sends a small segment (which 1064 results in a 140-byte packet) to H2. maxsizesent is thus set to 140. 1065 In line 5 this segment is acknowledged, and thus maxsizeacked is set 1066 to 140. 1068 In lines 6 and 7, H1 sends two small segments to H2. In line 8, 1069 while the segments from lines 6 and 7 are still in flight to H2, an 1070 attacker sends a forged ICMP "Packet Too Big" error message to H1. 1071 Assuming the attacker is lucky enough to guess a valid TCP sequence 1072 number, this ICMP message will pass the TCP sequence number check. 1073 The Next-Hop MTU reported by the ICMP error message (claimedmtu) is 1074 then compared with maxsizesent. As claimedmtu is larger than 1075 maxsizesent, the ICMP error message is silently discarded. 1076 Therefore, the attack does not succeed. 1078 7.4. Pseudo-code for the counter-measure for the blind performance- 1079 degrading attack 1081 This section contains a pseudo-code version of the counter-measure 1082 described in Section 7.2 for the blind performance-degrading attack 1083 described in Section 7. It is meant as guidance for developers on 1084 how to implement this counter-measure. 1086 The pseudo-code makes use of the following variables, constants, and 1087 functions: 1089 ack 1090 Variable holding the acknowledgement number contained in the TCP 1091 segment that has just been received. 1093 acked_packet_size 1094 Variable holding the packet size (data, plus headers) the ACK that 1095 has just been received is acknowledging. 1097 adjust_mtu() 1098 Function that adjusts the MTU for this connection, according to 1099 the ICMP "Packet Too Big" that was last received. 1101 claimedmtu 1102 Variable holding the Next-Hop MTU advertised by the ICMP "Packet 1103 Too Big" error message. 1105 claimedtcpseq 1106 Variable holding the TCP sequence number contained in the payload 1107 of the ICMP "Packet Too Big" message that has just been received 1108 or was last recorded. 1110 current_mtu 1111 Variable holding the assumed Path-MTU for this connection. 1113 drop_message() 1114 Function that performs the necessary actions to drop the ICMP 1115 message being processed. 1117 initial_mtu 1118 Variable holding the MTU for new connections, as explained in 1119 [RFC1191] and [RFC1981]. 1121 maxsizeacked 1122 Variable holding the largest packet size (data, plus headers) that 1123 has so far been acked for this connection, as explained in 1124 Section 7.2. 1126 maxsizesent 1127 Variable holding the largest packet size (data, plus headers) that 1128 has so far been sent for this connection, as explained in 1129 Section 7.2. 1131 nsegrto 1132 Variable holding the number of times this segment has timed out, 1133 as explained in Section 7.2. 1135 packet_size 1136 Variable holding the size of the IP datagram being sent. 1138 pending_message 1139 Variable (flag) that indicates whether there is a pending ICMP 1140 "Packet Too Big" message to be processed. 1142 save_message() 1143 Function that records the ICMP "Packet Too Big" message that has 1144 just been received. 1146 MINIMUM_MTU 1147 Constant holding the minimum MTU for the internet protocol in use 1148 (68 for IPv4, and 1280 for IPv6). 1150 MAXSEGRTO 1151 Constant holding the number of times a given segment must timeout 1152 before an ICMP "Packet Too Big" error message can be honored. 1154 EVENT: New TCP connection 1156 current_mtu = initial_mtu; 1157 maxsizesent = MINIMUM_MTU; 1158 maxsizeacked = MINIMUM_MTU; 1159 nsegrto = 0; 1160 pending_message = 0; 1162 EVENT: Segment is sent 1163 if (packet_size > maxsizesent) 1164 maxsizesent = packet_size; 1166 EVENT: Segment is received 1168 if (acked_packet_size > maxsizeacked) 1169 maxsizeacked = acked_packet_size; 1171 if (pending_message) 1172 if (ack > claimedtcpseq){ 1173 pending_message = 0; 1174 nsegrto = 0; 1175 } 1177 EVENT: ICMP "Packet Too Big" message is received 1178 if (claimedtcpseq < SND.UNA || claimed_TCP_SEQ >= SND.NXT){ 1179 drop_message(); 1180 } 1182 else { 1183 if (claimedmtu >= maxsizesent || claimedmtu >= current_mtu) 1184 drop_message(); 1186 else { 1187 if (claimedmtu > maxsizeacked){ 1188 adjust_mtu(); 1189 current_mtu = claimedmtu; 1190 maxsizesent = MINIMUM_MTU; 1191 } 1193 else { 1194 pending_message = 1; 1195 save_message(); 1196 } 1197 } 1198 } 1200 EVENT: Segment times out 1202 nsegrto++; 1204 if (pending_message && nsegrto >= MAXSEGRTO){ 1205 adjust_mtu(); 1206 nsegrto = 0; 1207 pending_message = 0; 1208 maxsizeacked = claimedmtu; 1209 maxsizesent = MINIMUM_MTU; 1210 current_mtu = claimedmtu; 1211 } 1213 Notes: 1214 All comparisions between sequence numbers must be performed using 1215 sequence number arithmethic. 1216 The pseudo-code implements the mechanism described in Section 7.2, 1217 the TCP sequence number checking described in Section 4.1, and the 1218 validation check on the advertised Next-Hop MTU described in 1219 [RFC1191] and [RFC1981]. 1221 8. Security Considerations 1223 This document describes the use of ICMP error messages to perform a 1224 number of attacks against the TCP protocol, and describes a number of 1225 widely-implemented counter-measures that either eliminate or reduce 1226 the impact of these attacks when they are performed by off-path 1227 attackers. 1229 9. Acknowledgements 1231 This document was inspired by Mika Liljeberg, while discussing some 1232 issues related to [I-D.ietf-tcpm-tcp-soft-errors] by private e-mail. 1233 The author would like to thank (in alphabetical order): Bora Akyol, 1234 Mark Allman, Ran Atkinson, James Carlson, Alan Cox, Theo de Raadt, 1235 Ted Faber, Juan Fraschini, Markus Friedl, Guillermo Gont, John 1236 Heffner, Alfred Hoenes, Vivek Kakkar, Michael Kerrisk, Mika 1237 Liljeberg, Matt Mathis, David Miller, Miles Nordin, Eloy Paris, 1238 Kacheong Poon, Andrew Powell, Pekka Savola, Pyda Srisuresh, Fred 1239 Templin, and Joe Touch for contributing many valuable comments. 1241 Juan Fraschini and the author of this document implemented freely- 1242 available audit tools to help vendors audit their systems by 1243 reproducing the attacks discussed in this document. This tools are 1244 available at http://www.gont.com.ar/tools/index.html . 1246 Markus Friedl, Chad Loder, and the author of this document, produced 1247 and tested in OpenBSD [OpenBSD] the first implementation of the 1248 counter-measure described in Section 7.2. This first implementation 1249 helped to test the effectiveness of the ideas introduced in this 1250 document, and has served as a reference implementation for other 1251 operating systems. 1253 The author would like to thank the UK's National Infrastructure 1254 Security Co-ordination Centre (NISCC) for coordinating the disclosure 1255 of these issues with a large number of vendors and CSIRTs (Computer 1256 Security Incident Response Teams). 1258 The author wishes to express deep and heartfelt gratitude to Jorge 1259 Oscar Gont and Nelida Garcia, for their precious motivation and 1260 guidance. 1262 10. References 1263 10.1. Normative References 1265 [RFC0791] Postel, J., "Internet Protocol", STD 5, RFC 791, 1266 September 1981. 1268 [RFC0792] Postel, J., "Internet Control Message Protocol", STD 5, 1269 RFC 792, September 1981. 1271 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 1272 RFC 793, September 1981. 1274 [RFC1122] Braden, R., "Requirements for Internet Hosts - 1275 Communication Layers", STD 3, RFC 1122, October 1989. 1277 [RFC1191] Mogul, J. and S. Deering, "Path MTU discovery", RFC 1191, 1278 November 1990. 1280 [RFC1812] Baker, F., "Requirements for IP Version 4 Routers", 1281 RFC 1812, June 1995. 1283 [RFC1981] McCann, J., Deering, S., and J. Mogul, "Path MTU Discovery 1284 for IP version 6", RFC 1981, August 1996. 1286 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1287 Requirement Levels", BCP 14, RFC 2119, March 1997. 1289 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 1290 (IPv6) Specification", RFC 2460, December 1998. 1292 [RFC4301] Kent, S. and K. Seo, "Security Architecture for the 1293 Internet Protocol", RFC 4301, December 2005. 1295 [RFC4443] Conta, A., Deering, S., and M. Gupta, "Internet Control 1296 Message Protocol (ICMPv6) for the Internet Protocol 1297 Version 6 (IPv6) Specification", RFC 4443, March 2006. 1299 10.2. Informative References 1301 [DClark] Clark, D., "The Design Philosophy of the DARPA Internet 1302 Protocols", Computer Communication Review Vol. 18, No. 4, 1303 1988. 1305 [FreeBSD] The FreeBSD Project, "http://www.freebsd.org". 1307 [I-D.ietf-tcpm-tcp-soft-errors] 1308 Gont, F., "TCP's Reaction to Soft Errors", 1309 draft-ietf-tcpm-tcp-soft-errors-07 (work in progress), 1310 December 2007. 1312 [I-D.ietf-tcpm-tcpsecure] 1313 Ramaiah, A., "Improving TCP's Robustness to Blind In- 1314 Window Attacks", draft-ietf-tcpm-tcpsecure-09 (work in 1315 progress), January 2008. 1317 [I-D.ietf-tsvwg-port-randomization] 1318 Larsen, M. and F. Gont, "Port Randomization", 1319 draft-ietf-tsvwg-port-randomization-01 (work in progress), 1320 February 2008. 1322 [ICMP-Filtering] 1323 Gont, F., "Filtering of ICMP error messages", http:// 1324 www.gont.com.ar/papers/ 1325 filtering-of-icmp-error-messages.pdf. 1327 [IP-filtering] 1328 NISCC, "NISCC Technical Note 01/2006: Egress and Ingress 1329 Filtering", http://www.niscc.gov.uk/niscc/docs/ 1330 re-20060420-00294.pdf?lang=en, 2006. 1332 [Linux] The Linux Project, "http://www.kernel.org". 1334 [McKusick] 1335 McKusick, M., Bostic, K., Karels, M., and J. Quarterman, 1336 "The Design and Implementation of the 4.4BSD Operating 1337 System", Addison-Wesley , 1996. 1339 [NISCC] NISCC, "NISCC Vulnerability Advisory 532967/NISCC/ICMP: 1340 Vulnerability Issues in ICMP packets with TCP payloads", 1341 http://www.niscc.gov.uk/niscc/docs/ 1342 al-20050412-00308.html?lang=en, 2005. 1344 [NetBSD] The NetBSD Project, "http://www.netbsd.org". 1346 [OpenBSD] The OpenBSD Project, "http://www.openbsd.org". 1348 [OpenBSD-PF] 1349 The OpenBSD Packet Filter, 1350 "http://www.openbsd.org/faq/pf/". 1352 [RFC0816] Clark, D., "Fault isolation and recovery", RFC 816, 1353 July 1982. 1355 [RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, 1356 April 1992. 1358 [RFC1323] Jacobson, V., Braden, B., and D. Borman, "TCP Extensions 1359 for High Performance", RFC 1323, May 1992. 1361 [RFC2385] Heffernan, A., "Protection of BGP Sessions via the TCP MD5 1362 Signature Option", RFC 2385, August 1998. 1364 [RFC2581] Allman, M., Paxson, V., and W. Stevens, "TCP Congestion 1365 Control", RFC 2581, April 1999. 1367 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 1368 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 1369 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 1371 [RFC2821] Klensin, J., "Simple Mail Transfer Protocol", RFC 2821, 1372 April 2001. 1374 [RFC2923] Lahey, K., "TCP Problems with Path MTU Discovery", 1375 RFC 2923, September 2000. 1377 [RFC3168] Ramakrishnan, K., Floyd, S., and D. Black, "The Addition 1378 of Explicit Congestion Notification (ECN) to IP", 1379 RFC 3168, September 2001. 1381 [RFC3390] Allman, M., Floyd, S., and C. Partridge, "Increasing TCP's 1382 Initial Window", RFC 3390, October 2002. 1384 [RFC4271] Rekhter, Y., Li, T., and S. Hares, "A Border Gateway 1385 Protocol 4 (BGP-4)", RFC 4271, January 2006. 1387 [RFC4821] Mathis, M. and J. Heffner, "Packetization Layer Path MTU 1388 Discovery", RFC 4821, March 2007. 1390 [RFC4907] Aboba, B., "Architectural Implications of Link 1391 Indications", RFC 4907, June 2007. 1393 [RFC4953] Touch, J., "Defending TCP Against Spoofing Attacks", 1394 RFC 4953, July 2007. 1396 [US-CERT] US-CERT, "US-CERT Vulnerability Note VU#222750: TCP/IP 1397 Implementations do not adequately validate ICMP error 1398 messages", http://www.kb.cert.org/vuls/id/222750, 2005. 1400 [Watson] Watson, P., "Slipping in the Window: TCP Reset Attacks", 1401 2004 CanSecWest Conference , 2004. 1403 [Wright] Wright, G. and W. Stevens, "TCP/IP Illustrated, Volume 2: 1404 The Implementation", Addison-Wesley , 1994. 1406 Appendix A. An analysis of ICMP hard errors 1408 This appendix contains an analysis of ICMP hard errors. 1410 ICMP type 3 (Destination Unreachable), code 2 (protocol unreachable) 1412 This ICMP error message indicates that the host sending the ICMP 1413 error message received a packet meant for a transport protocol it 1414 does not support. For connection-oriented protocols such as TCP, 1415 one could expect to receive such an error as the result of a 1416 connection-establishment attempt. However, it would be strange to 1417 get such an error during the life of a connection, as this would 1418 indicate that support for that transport protocol has been removed 1419 from the system sending the error message during the life of the 1420 corresponding connection. 1422 ICMP type 3 (Destination Unreachable), code 3 (port unreachable) 1424 This error message indicates that the system sending the ICMP 1425 error message received a packet meant for a socket (IP address, 1426 port number) on which there is no process listening. Those 1427 transport protocols which have their own mechanisms for notifying 1428 this condition should not be receiving these error messages, as 1429 the protocol would signal the port unreachable condition by means 1430 of its own messages. Assuming that once a connection is 1431 established it is not usual for the transport protocol to change 1432 (or be reloaded), it should be unusual to get these error 1433 messages. 1435 ICMP type 3 (Destination Unreachable), code 4 (fragmentation needed 1436 and DF bit set) 1438 This error message indicates that an intermediate node needed to 1439 fragment a datagram, but the DF (Don't Fragment) bit in the IP 1440 header was set. It is considered a soft error when TCP implements 1441 PMTUD, and a hard error if TCP does not implement PMTUD. Those 1442 TCPs that do not implement the PMTUD mechanism should not be 1443 sending their IP packets with the DF bit set, and thus should not 1444 be receiving these ICMP error messages. 1446 ICMPv6 type 1 (Destination Unreachable), code 1 (communication with 1447 destination administratively prohibited) 1449 This error message indicates that the destination is unreachable 1450 because of an administrative policy. For connection-oriented 1451 protocols such as TCP, one could expect to receive such an error 1452 as the result of a connection-establishment attempt. Receiving 1453 such an error for a connection in any of the synchronized states 1454 would mean that the administrative policy changed during the life 1455 of the connection. However, in the same way this error condition 1456 (which was not present when the conenction was established) 1457 appeared, it could get solved solved in the near term. 1459 ICMPv6 type 1 (Destination Unreachable), code 4 (port unreachable) 1461 This error message is analogous to the ICMP type 3 (Destination 1462 Unreachable), code 3 (Port unreachable) error message discussed 1463 above. Therefore, the same considerations apply. 1465 The Host Requirements RFC [RFC1122] states in Section 4.2.3.9 that 1466 TCP SHOULD abort the corresponding connection in response to ICMP 1467 messages of type 3, codes 2 (protocol unreachable), 3 (port 1468 unreachable), and 4 (fragmentation needed and DF bit set). However, 1469 Section 3.2.2.1 states that TCP MUST accept an ICMP port unreachable 1470 (type 3, code 3) for the same purpose as an RST. Therefore, for ICMP 1471 messages of type 3 codes 2 and 4 there is room to go against the 1472 advice provided in the existing specifications, while in the case of 1473 ICMP messages of type 3 code 3 there is ambiguity in the 1474 specifications that may or may not provide some room to go against 1475 that advice. 1477 Appendix B. Advice and guidance to vendors 1479 Vendors are urged to contact CPNI (vulteam@cpni.gsi.gov.uk) if they 1480 think they may be affected by the issues described in this document. 1481 As the lead coordination center for these issues, CPNI is well placed 1482 to give advice and guidance as required. 1484 CPNI works extensively with government departments and agencies, 1485 commercial organizations and the academic community to research 1486 vulnerabilities and potential threats to IT systems especially where 1487 they may have an impact on Critical National Infrastructure's (CNI). 1489 Other ways to contact CPNI, plus CPNI's PGP public key, are available 1490 at http://www.cpni.gov.uk . 1492 Appendix C. Changes from previous versions of the draft (to be removed 1493 by the RFC Editor before publishing this document as an 1494 RFC) 1496 C.1. Changes from draft-ietf-tcpm-icmp-attacks-02 1497 o Added a disclaimer to indicate that this document does not update 1498 the current specifications. 1500 o Addresses feedback sent off-list by Alfred Hoenes. 1502 o The text (particulary that which describes the counter-measures) 1503 was reworded to document what current implementations are doing, 1504 rather than "proposing" the implementation of the counter- 1505 measures. 1507 o Some text has been removed: we're just documenting the problem, 1508 and what existing implementations have done. 1510 o Miscelaneous editorial changes. 1512 C.2. Changes from draft-ietf-tcpm-icmp-attacks-01 1514 o Fixed references to the antispoof documents (were hardcoded and 1515 missing in the References Section). 1517 o The draft had expired and thus is resubmitted with no further 1518 changes. 1520 C.3. Changes from draft-ietf-tcpm-icmp-attacks-00 1522 o Added references to the specific sections of each of the 1523 referenced specifications 1525 o Corrected the threat analysys 1527 o Added clarification about whether the counter-measures violate the 1528 current specifications or not. 1530 o Changed text so that the document fits better in the Informational 1531 path 1533 o Added a specific section on IPsec (Section 2.3) 1535 o Added clarification and references on the use of ICMP filtering 1536 based on the ICMP payload 1538 o Updated references to obsoleted RFCs 1540 o Added a discussion of multipath scenarios, and possible lose in 1541 responsiveness resulting from the reaction to hard errors as soft 1542 errors 1544 o Miscellaneous editorial changes 1546 C.4. Changes from draft-gont-tcpm-icmp-attacks-05 1548 o Removed RFC 2119 wording to make the draft suitable for 1549 publication as an Informational RFC. 1551 o Added additional checks that should be performed on ICMP error 1552 messages (checksum of the IP header in the ICMP payload, and 1553 others). 1555 o Added clarification of the rationale behind each the TCP SEQ check 1557 o Miscellaneous editorial changes 1559 C.5. Changes from draft-gont-tcpm-icmp-attacks-04 1561 o Added section on additional considerations for validating ICMP 1562 error messages 1564 o Added reference to (draft) [RFC4907] 1566 o Added stress on the fact that ICMP error messages are unreliable 1568 o Miscellaneous editorial changes 1570 C.6. Changes from draft-gont-tcpm-icmp-attacks-03 1572 o Added references to existing implementations of the proposed 1573 counter-measures 1575 o The discussion in Section 4 was improved 1577 o The discussion of the blind connection-reset vulnerability was 1578 expanded and improved 1580 o The proposed counter-measure for the attack against the PMTUD was 1581 improved and simplified 1583 o Section 7.4 was added 1585 o Miscellaneous editorial changes 1587 C.7. Changes from draft-gont-tcpm-icmp-attacks-02 1589 o Fixed errors in in the discussion of the blind connection-reset 1590 attack 1592 o The proposed counter-measure for the attack against the PMTUD 1593 mechanism was refined to allow quick discovery of the Path-MTU 1595 o Section 7.3 was added so as to clarify the operation of the 1596 counter-measure for the attack against the PMTUD mechanism 1598 o Added Appendix B 1600 o Miscellaneous editorial changes 1602 C.8. Changes from draft-gont-tcpm-icmp-attacks-01 1604 o The document was restructured for easier reading 1606 o A discussion of ICMPv6 was added in several sections of the 1607 document 1609 o Added Section on Acknowledgement number checking 1611 o Added Section 4.3 1613 o Added Section 7 1615 o Fixed typo in the ICMP types, in several places 1617 o Fixed typo in the TCP sequence number check formula 1619 o Miscellaneous editorial changes 1621 C.9. Changes from draft-gont-tcpm-icmp-attacks-00 1623 o Added a proposal to change the handling of the so-called ICMP hard 1624 errors during the synchronized states 1626 o Added a summary of the relevant RFCs in several sections 1628 o Miscellaneous editorial changes 1630 Author's Address 1632 Fernando Gont 1633 Universidad Tecnologica Nacional / Facultad Regional Haedo 1634 Evaristo Carriego 2644 1635 Haedo, Provincia de Buenos Aires 1706 1636 Argentina 1638 Phone: +54 11 4650 8472 1639 Email: fernando@gont.com.ar 1640 URI: http://www.gont.com.ar 1642 Full Copyright Statement 1644 Copyright (C) The IETF Trust (2008). 1646 This document is subject to the rights, licenses and restrictions 1647 contained in BCP 78, and except as set forth therein, the authors 1648 retain all their rights. 1650 This document and the information contained herein are provided on an 1651 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 1652 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 1653 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 1654 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 1655 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 1656 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1658 Intellectual Property 1660 The IETF takes no position regarding the validity or scope of any 1661 Intellectual Property Rights or other rights that might be claimed to 1662 pertain to the implementation or use of the technology described in 1663 this document or the extent to which any license under such rights 1664 might or might not be available; nor does it represent that it has 1665 made any independent effort to identify any such rights. Information 1666 on the procedures with respect to rights in RFC documents can be 1667 found in BCP 78 and BCP 79. 1669 Copies of IPR disclosures made to the IETF Secretariat and any 1670 assurances of licenses to be made available, or the result of an 1671 attempt made to obtain a general license or permission for the use of 1672 such proprietary rights by implementers or users of this 1673 specification can be obtained from the IETF on-line IPR repository at 1674 http://www.ietf.org/ipr. 1676 The IETF invites any interested party to bring to its attention any 1677 copyrights, patents or patent applications, or other proprietary 1678 rights that may cover technology that may be required to implement 1679 this standard. Please address the information to the IETF at 1680 ietf-ipr@ietf.org.