idnits 2.17.1 draft-ietf-idr-error-handling-08.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The draft header indicates that this document updates RFC4360, but the abstract doesn't seem to mention this, which it should. -- The draft header indicates that this document updates RFC5701(if, but the abstract doesn't seem to mention this, which it should. -- The draft header indicates that this document updates RFC4760, but the abstract doesn't seem to mention this, which it should. -- The draft header indicates that this document updates RFC1997, but the abstract doesn't seem to mention this, which it should. -- The draft header indicates that this document updates RFC4456, but the abstract doesn't seem to mention this, which it should. -- The draft header indicates that this document updates RFC4271, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC1997, updated by this document, for RFC5378 checks: 1996-04-10) -- The document seems to contain a disclaimer for pre-RFC5378 work, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, you can and should remove the disclaimer; otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (May 14, 2014) is 3635 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-11) exists of draft-ietf-l2vpn-evpn-07 Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 8 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force E. Chen, Ed. 3 Internet-Draft Cisco Systems, Inc. 4 Updates: 1997, 4271, 4360, 4456, 4760, 5701(if approved) J. Scudder, Ed. 5 Intended status: Standards Track Juniper Networks 6 Expires: November 15, 2014 P. Mohapatra 7 Sproute Networks 8 K. Patel 9 Cisco Systems, Inc. 10 May 14, 2014 12 Revised Error Handling for BGP UPDATE Messages 13 draft-ietf-idr-error-handling-08 15 Abstract 17 According to the base BGP specification, a BGP speaker that receives 18 an UPDATE message containing a malformed attribute is required to 19 reset the session over which the offending attribute was received. 20 This behavior is undesirable as a session reset would impact not only 21 routes with the offending attribute, but also other valid routes 22 exchanged over the session. This document partially revises the 23 error handling for UPDATE messages, and provides guidelines for the 24 authors of documents defining new attributes. Finally, it revises 25 the error handling procedures for a number of existing attributes. 27 This document updates error handling for RFCs 1997, 4271, 4360, 4456, 28 4760 and 5701. 30 Status of This Memo 32 This Internet-Draft is submitted in full conformance with the 33 provisions of BCP 78 and BCP 79. 35 Internet-Drafts are working documents of the Internet Engineering 36 Task Force (IETF). Note that other groups may also distribute 37 working documents as Internet-Drafts. The list of current Internet- 38 Drafts is at http://datatracker.ietf.org/drafts/current/. 40 Internet-Drafts are draft documents valid for a maximum of six months 41 and may be updated, replaced, or obsoleted by other documents at any 42 time. It is inappropriate to use Internet-Drafts as reference 43 material or to cite them other than as "work in progress." 45 This Internet-Draft will expire on November 15, 2014. 47 Copyright Notice 49 Copyright (c) 2014 IETF Trust and the persons identified as the 50 document authors. All rights reserved. 52 This document is subject to BCP 78 and the IETF Trust's Legal 53 Provisions Relating to IETF Documents 54 (http://trustee.ietf.org/license-info) in effect on the date of 55 publication of this document. Please review these documents 56 carefully, as they describe your rights and restrictions with respect 57 to this document. Code Components extracted from this document must 58 include Simplified BSD License text as described in Section 4.e of 59 the Trust Legal Provisions and are provided without warranty as 60 described in the Simplified BSD License. 62 This document may contain material from IETF Documents or IETF 63 Contributions published or made publicly available before November 64 10, 2008. The person(s) controlling the copyright in some of this 65 material may not have granted the IETF Trust the right to allow 66 modifications of such material outside the IETF Standards Process. 67 Without obtaining an adequate license from the person(s) controlling 68 the copyright in such materials, this document may not be modified 69 outside the IETF Standards Process, and derivative works of it may 70 not be created outside the IETF Standards Process, except to format 71 it for publication as an RFC or to translate it into languages other 72 than English. 74 Table of Contents 76 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 77 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4 78 2. Error-Handling Approaches . . . . . . . . . . . . . . . . . . 4 79 3. Revision to BGP UPDATE Message Error Handling . . . . . . . . 4 80 4. Parsing of NLRI Fields . . . . . . . . . . . . . . . . . . . 6 81 4.1. Attribute Length Fields . . . . . . . . . . . . . . . . . 7 82 4.2. Syntactic Correctness of NLRI Fields . . . . . . . . . . 7 83 4.3. Typed NLRI . . . . . . . . . . . . . . . . . . . . . . . 8 84 5. Operational Considerations . . . . . . . . . . . . . . . . . 8 85 6. Error Handling Procedures for Existing Attributes . . . . . . 9 86 6.1. ORIGIN . . . . . . . . . . . . . . . . . . . . . . . . . 9 87 6.2. AS_PATH . . . . . . . . . . . . . . . . . . . . . . . . . 9 88 6.3. NEXT_HOP . . . . . . . . . . . . . . . . . . . . . . . . 10 89 6.4. MULTI_EXIT_DISC . . . . . . . . . . . . . . . . . . . . . 10 90 6.5. LOCAL_PREF . . . . . . . . . . . . . . . . . . . . . . . 10 91 6.6. ATOMIC_AGGREGATE . . . . . . . . . . . . . . . . . . . . 10 92 6.7. AGGREGATOR . . . . . . . . . . . . . . . . . . . . . . . 11 93 6.8. Community . . . . . . . . . . . . . . . . . . . . . . . . 11 94 6.9. Extended Community . . . . . . . . . . . . . . . . . . . 11 95 6.10. IPv6 Address Specific BGP Extended Community Attribute . 11 96 6.11. ORIGINATOR_ID . . . . . . . . . . . . . . . . . . . . . . 12 97 6.12. CLUSTER_LIST . . . . . . . . . . . . . . . . . . . . . . 12 98 6.13. MP_REACH_NLRI and MP_UNREACH_NLRI . . . . . . . . . . . . 12 99 7. Guidance for Authors of BGP Specifications . . . . . . . . . 12 100 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 101 9. Security Considerations . . . . . . . . . . . . . . . . . . . 13 102 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 13 103 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 13 104 11.1. Normative References . . . . . . . . . . . . . . . . . . 13 105 11.2. Informative References . . . . . . . . . . . . . . . . . 14 106 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 14 108 1. Introduction 110 According to the base BGP specification [RFC4271], a BGP speaker that 111 receives an UPDATE message containing a malformed attribute is 112 required to reset the session over which the offending attribute was 113 received. This behavior is undesirable as a session reset would 114 impact not only routes with the offending attribute, but also other 115 valid routes exchanged over the session. In the case of optional 116 transitive attributes, the behavior is especially troublesome and may 117 present a potential security vulnerability. The reason is that such 118 attributes may have been propagated without being checked by 119 intermediate routers that do not recognize the attributes -- in 120 effect the attribute may have been tunneled, and when they do reach a 121 router that recognizes and checks them, the session that is reset may 122 not be associated with the router that is at fault. To make matters 123 worse, in such cases although the problematic attributes may have 124 originated with a single update transmitted by a single BGP speaker, 125 by the time they encounter a router that checks them they may have 126 been replicated many times, and thus may cause the reset of many 127 peering sessions. Thus the damage inflicted may be multiplied 128 manyfold. 130 The goal for revising the error handling for UPDATE messages is to 131 minimize the impact on routing by a malformed UPDATE message, while 132 maintaining protocol correctness to the extent possible. This can be 133 achieved largely by maintaining the established session and keeping 134 the valid routes exchanged, but removing the routes carried in the 135 malformed UPDATE from the routing system. 137 This document partially revises the error handling for UPDATE 138 messages, and provides guidelines for the authors of documents 139 defining new attributes. Finally, it revises the error handling 140 procedures for a number of existing attributes. Specifically, the 141 error handling procedures of [RFC1997], [RFC4271], [RFC4360], 142 [RFC4456], [RFC4760] and [RFC5701] are revised. 144 1.1. Requirements Language 146 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 147 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 148 document are to be interpreted as described in RFC 2119 [RFC2119]. 150 2. Error-Handling Approaches 152 In this document we refer to three different approaches to handling 153 errors found in BGP path attributes. They are as follows (listed in 154 order, from the one with the "strongest" action to the one with the 155 "weakest" action): 157 o Session reset: This is the approach used throughout the base BGP 158 specification [RFC4271], where a NOTIFICATION is sent and the 159 session terminated. 161 o Treat-as-withdraw: In this approach, the UPDATE message containing 162 the path attribute in question MUST be treated as though all 163 contained routes had been withdrawn just as if they had been 164 listed in the WITHDRAWN ROUTES field (or in the MP_UNREACH_NLRI 165 attribute if appropriate) of the UPDATE message, thus causing them 166 to be removed from the Adj-RIB-In according to the procedures of 167 [RFC4271]. 169 o Attribute discard: In this approach the malformed attribute MUST 170 be discarded and the UPDATE message continues to be processed. 171 This approach MUST NOT be used except in the case of an attribute 172 that has no effect on route selection or installation. 174 3. Revision to BGP UPDATE Message Error Handling 176 This specification amends [RFC4271] Section 6.3 in a number of ways. 177 See also Section 6 for treatment of specific path attributes. 179 a. The first paragraph is revised as follows: 181 Old Text: 183 All errors detected while processing the UPDATE message 184 MUST be indicated by sending the NOTIFICATION message with 185 the Error Code UPDATE Message Error. The error subcode 186 elaborates on the specific nature of the error. 188 New text: 190 An error detected while processing the UPDATE message for 191 which a session reset is specified MUST be indicated by 192 sending the NOTIFICATION message with the Error Code UPDATE 193 Message Error. The error subcode elaborates on the 194 specific nature of the error. 196 b. Error handling for the following case remains unchanged: 198 If the Withdrawn Routes Length or Total Attribute Length is 199 too large (i.e., if Withdrawn Routes Length + Total 200 Attribute Length + 23 exceeds the message Length), then the 201 Error Subcode MUST be set to Malformed Attribute List. 203 c. Attribute Flag error handling is revised as follows: 205 Old Text: 207 If any recognized attribute has Attribute Flags that 208 conflict with the Attribute Type Code, then the Error 209 Subcode MUST be set to Attribute Flags Error. The Data 210 field MUST contain the erroneous attribute (type, length, 211 and value). 213 New Text: 215 If any recognized attribute has Attribute Flags that 216 conflict with the Attribute Type Code, then the attribute 217 MUST be treated as malformed and the treat-as-withdraw 218 approach used, unless the specification for the attribute 219 mandates different handling for incorrect Attribute Flags. 221 d. If any of the well-known mandatory attributes are not present in 222 an UPDATE message, then "treat-as-withdraw" MUST be used. 224 e. "Treat-as-withdraw" MUST be used for the cases that specify a 225 session reset and involve any of the attributes ORIGIN, AS_PATH, 226 NEXT_HOP, MULTI_EXIT_DISC, or LOCAL_PREF. 228 f. "Attribute discard" MUST be used for any of the cases that 229 specify a session reset and involve ATOMIC_AGGREGATE or 230 AGGREGATOR. 232 g. If the MP_REACH_NLRI attribute or the MP_UNREACH_NLRI [RFC4760] 233 attribute appears more than once in the UPDATE message, then a 234 NOTIFICATION message MUST be sent with the Error Subcode 235 "Malformed Attribute List". If any other attribute appears more 236 than once in an UPDATE message, then all the occurrences of the 237 attribute other than the first one SHALL be discarded and the 238 UPDATE message continue to be processed. 240 h. When multiple attribute errors exist in an UPDATE message, if the 241 same approach (either "session reset", "treat-as-withdraw" or 242 "attribute discard") is specified for the handling of these 243 malformed attributes, then the specified approach MUST be used. 244 Otherwise the approach with the strongest action MUST be used. 246 i. The Withdrawn Routes field MUST be checked for syntactic 247 correctness in the same manner as the NLRI field. This is 248 discussed further below, and in Section 4.2. 250 j. Finally, we observe that in order to use the approach of "treat- 251 as-withdraw", the entire NLRI field and/or the MP_REACH_NLRI and 252 MP_UNREACH_NLRI attributes need to be successfully parsed. If 253 this is not possible, the procedures of [RFC4271] continue to 254 apply, meaning that the "session reset" approach SHOULD be 255 followed. Alternatively the error handling procedures specified 256 in [RFC4760] for disabling a particular AFI/SAFI MAY be followed. 258 One notable case where it would be not possible to successfully 259 parse the NLRI is if the NLRI field is found to be "syntactically 260 incorrect" (see Section 4.2). It can be seen that therefore, 261 this part of [RFC4271] Section 6.3 necessarily continues to 262 apply: 264 The NLRI field in the UPDATE message is checked for syntactic 265 validity. If the field is syntactically incorrect, then the 266 Error Subcode MUST be set to Invalid Network Field. 268 4. Parsing of NLRI Fields 270 To facilitate the determination of the NLRI field in an UPDATE with a 271 malformed attribute, the following restrictions on encoding NLRI MUST 272 be followed: 274 o The MP_REACH_NLRI or MP_UNREACH_NLRI attribute (if present) SHALL 275 be encoded as the very first path attribute in an UPDATE. 277 o The MP_REACH_NLRI or MP_UNREACH_NLRI SHALL NOT be combined in the 278 same UPDATE message. 280 o The MP_REACH_NLRI and MP_UNREACH_NLRI attributes MUST NOT be used 281 in an UPDATE that also contains a non-empty Withdrawn Routes or 282 Network Layer Reachability Information field. 284 In all these cases, however, an implementation MUST still be prepared 285 to receive these fields in any position or combination. 287 If the encoding of [RFC4271] is used, the NLRI field for the IPv4 288 unicast address family is carried immediately following all the 289 attributes in an UPDATE. When such an UPDATE is received, we observe 290 that the NLRI field can be determined using the "Message Length", 291 "Withdrawn Route Length" and "Total Attribute Length" (when they are 292 consistent) carried in the message instead of relying on the length 293 of individual attributes in the message. 295 4.1. Attribute Length Fields 297 There are two error cases in which the Total Attribute Length value 298 can be in conflict with the enclosed path attributes, which 299 themselves carry length values. In the "overrun" case, as the 300 enclosed path attributes are parsed, the length of the last 301 encountered path attribute would cause the Total Attribute Length to 302 be exceeded. In the "underrun" case, as the enclosed path attributes 303 are parsed, after the last successfully-parsed attribute, fewer than 304 three octets remain, or fewer than four octets, if the Attribute 305 Flags field has the Extended Length bit set -- that is, there remains 306 unconsumed data in the path attributes but yet insufficient data to 307 encode a single minimum-sized path attribute. In either of these 308 cases an error condition exists and the treat-as-withdraw approach 309 MUST be used (unless some other, more severe error is encountered 310 dictating a stronger approach), and the Total Attribute Length MUST 311 be relied upon to enable the beginning of the NLRI field to be 312 located. 314 For all path attributes other than those specified as having an 315 attribute length that may be zero it SHALL be considered a syntax 316 error for the attribute to have a length of zero. (Of the path 317 attributes considered in this specification, only AS_PATH and 318 ATOMIC_AGGREGATE may validly have an attribute length of zero.) 320 4.2. Syntactic Correctness of NLRI Fields 322 The NLRI field or Withdrawn Routes field SHALL be considered 323 "syntactically incorrect" if either of the following are true: 325 o The length of any of the included NLRI is greater than 32, 327 o When parsing NLRI contained in the field, the length of the last 328 NLRI found exceeds the amount of unconsumed data remaining in the 329 field. 331 Similarly, the MP_REACH or MP_UNREACH attribute of an update SHALL be 332 considered to be incorrect if any of the following are true: 334 o The length of any of the included NLRI is inconsistent with the 335 given AFI/SAFI (for example, if an IPv4 NLRI has a length greater 336 than 32 or an IPv6 NLRI has a length greater than 128), 338 o When parsing NLRI contained in the attribute, the length of the 339 last NLRI found exceeds the amount of unconsumed data remaining in 340 the attribute. 342 o The attribute flags of the attribute are inconsistent with those 343 specified in [RFC4760]. 345 o The length of the MP_UNREACH attribute is less than 3, or the 346 length of the MP_REACH attribute is less than 5. 348 4.3. Typed NLRI 350 Certain address families, for example MVPN [RFC7117] and EVPN 351 [I-D.ietf-l2vpn-evpn] have NLRI that are typed. Since supported type 352 values within the address family are not expressed in the MP-BGP 353 capability [RFC4760], it is possible for a BGP speaker to advertise 354 support for the given address family and sub-address family while 355 still not supporting a particular type of NLRI within that AFI/SAFI. 357 A BGP speaker advertising support for such a typed address family 358 MUST handle routes with unrecognized NLRI types within that address 359 family by discarding them, unless the relevant specification for that 360 address family specifies otherwise. 362 5. Operational Considerations 364 Although the "treat-as-withdraw" error-handling behavior defined in 365 Section 2 makes every effort to preserve BGP's correctness, we note 366 that if an UPDATE received on an IBGP session is subjected to this 367 treatment, inconsistent routing within the affected Autonomous System 368 may result. The consequences of inconsistent routing can include 369 long-lived forwarding loops and black holes. While lamentable, this 370 issue is expected to be rare in practice, and more importantly is 371 seen as less problematic than the session-reset behavior it replaces. 373 When a malformed attribute is indeed detected over an IBGP session, 374 we RECOMMEND that routes with the malformed attribute be identified 375 and traced back to the ingress router in the network where the routes 376 were sourced or received externally, and then a filter be applied on 377 the ingress router to prevent the routes from being sourced or 378 received. This will help maintain routing consistency in the 379 network. 381 Even if inconsistent routing does not arise, the "treat-as-withdraw" 382 behavior can cause either complete unreachability or sub-optimal 383 routing for the destinations whose routes are carried in the affected 384 UPDATE message. 386 Note that "treat-as-withdraw" is different from discarding an UPDATE 387 message. The latter violates the basic BGP principle of incremental 388 update, and could cause invalid routes to be kept. 390 Because of these potential issues, a BGP speaker MUST provide 391 debugging facilities to permit issues caused by a malformed attribute 392 to be diagnosed. At a minimum, such facilities MUST include logging 393 an error listing the NLRI involved, and containing the entire 394 malformed UPDATE message when such an attribute is detected. The 395 malformed UPDATE message SHOULD be analyzed, and the root cause 396 SHOULD be investigated. 398 6. Error Handling Procedures for Existing Attributes 400 In the following subsections, we elaborate on the conditions for 401 error-checking various path attributes, and specify what approach(es) 402 should be used to handle malformations. It is possible that 403 implementations may apply other error checks not contemplated here. 404 If so, the error handling approach given here should generally be 405 applied. 407 6.1. ORIGIN 409 The attribute is considered malformed if its length is not 1, or it 410 has an undefined value [RFC4271]. 412 An UPDATE message with a malformed ORIGIN attribute SHALL be handled 413 using the approach of "treat-as-withdraw". 415 6.2. AS_PATH 417 An AS_PATH is considered malformed if an unrecognized segment type is 418 encountered, or if it contains a malformed segment. A segment is 419 considered malformed if any of the following obtains: 421 o There is an overrun, where the path segment length field of the 422 last segment encountered would cause the Attribute Length to be 423 exceeded. 425 o There is an underrun, where after the last successfully-parsed 426 segment, there is only a single octet remaining (that is, there is 427 not enough unconsumed data to provide even an empty segment 428 header). 430 o It has a path segment length field of zero. 432 An UPDATE message with a malformed AS_PATH attribute SHALL be handled 433 using the approach of "treat-as-withdraw". 435 [RFC4271] also says that an implementation optionally "MAY check 436 whether the leftmost ... AS in the AS_PATH attribute is equal to the 437 autonomous system number of the peer that sent the message". A BGP 438 implementation SHOULD also handle routes that violate this check 439 using "treat-as-withdraw", but MAY follow the session reset behavior 440 if configured to do so. 442 6.3. NEXT_HOP 444 The attribute is considered malformed if it is syntactically 445 incorrect according to [RFC4271]. 447 An UPDATE message with a malformed NEXT_HOP attribute SHALL be 448 handled using the approach of "treat-as-withdraw". 450 6.4. MULTI_EXIT_DISC 452 The attribute is considered malformed if its length is not 4 453 [RFC4271]. 455 An UPDATE message with a malformed MULTI_EXIT_DESC attribute SHALL be 456 handled using the approach of "treat-as-withdraw". 458 6.5. LOCAL_PREF 460 The error handling of [RFC4271] is revised as follows. 462 o If the LOCAL_PREF attribute is received from an external neighbor, 463 it SHALL be discarded using the approach of "attribute discard", 464 or 466 o if received from an internal neighbor, it SHALL be considered 467 malformed if its length is not equal to 4. If malformed, the 468 UPDATE SHALL be handled using the approach of "treat-as-withdraw". 470 6.6. ATOMIC_AGGREGATE 472 The attribute SHALL be considered malformed if its length is not 0 473 [RFC4271]. 475 An UPDATE message with a malformed ATOMIC_AGGREGATE attribute SHALL 476 be handled using the approach of "attribute discard". 478 6.7. AGGREGATOR 480 The error conditions specified in [RFC4271] for the attribute are 481 revised as follows: 483 The AGGREGATOR attribute SHALL be considered malformed if any of the 484 following applies: 486 o Its length is not 6 (when the "4-octet AS number capability" is 487 not advertised to, or not received from the peer [RFC6793]). 489 o Its length is not 8 (when the "4-octet AS number capability" is 490 both advertised to, and received from the peer). 492 An UPDATE message with a malformed AGGREGATOR attribute SHALL be 493 handled using the approach of "attribute discard". 495 6.8. Community 497 The error handling of [RFC1997] is revised as follows: 499 The Community attribute SHALL be considered malformed if its length 500 is not a nonzero multiple of 4. 502 An UPDATE message with a malformed Community attribute SHALL be 503 handled using the approach of "treat-as-withdraw". 505 6.9. Extended Community 507 The error handling of [RFC4360] is revised as follows: 509 The Extended Community attribute SHALL be considered malformed if its 510 length is not a nonzero multiple of 8. 512 An UPDATE message with a malformed Extended Community attribute SHALL 513 be handled using the approach of "treat-as-withdraw". 515 Note that a BGP speaker MUST NOT treat an unrecognized Extended 516 Community Type or Sub-Type as an error. 518 6.10. IPv6 Address Specific BGP Extended Community Attribute 520 The error handling of [RFC5701] is revised as follows: 522 The IPv6 Address Specific Extended Community attribute SHALL be 523 considered malformed if its length is not a nonzero multiple of 20. 525 An UPDATE message with a malformed IPv6 Address Specific Extended 526 Community attribute SHALL be handled using the approach of "treat-as- 527 withdraw". 529 Note that a BGP speaker MUST NOT treat an unrecognized IPv6 Address 530 Specific Extended Community Type or Sub-Type as an error. 532 6.11. ORIGINATOR_ID 534 The error handling of [RFC4456] is revised as follows. 536 o If the ORIGINATOR_ID attribute is received from an external 537 neighbor, it SHALL be discarded using the approach of "attribute 538 discard", or 540 o if received from an internal neighbor, it SHALL be considered 541 malformed if its length is not equal to 4. If malformed, the 542 UPDATE SHALL be handled using the approach of "treat-as-withdraw". 544 6.12. CLUSTER_LIST 546 The error handling of [RFC4456] is revised as follows. 548 o If the CLUSTER_LIST attribute is received from an external 549 neighbor, it SHALL be discarded using the approach of "attribute 550 discard", or 552 o if received from an internal neighbor, it SHALL be considered 553 malformed if its length is not a nonzero multiple of 4. If 554 malformed, the UPDATE SHALL be handled using the approach of 555 "treat-as-withdraw". 557 6.13. MP_REACH_NLRI and MP_UNREACH_NLRI 559 The handling of these attributes is discussed in Section 3 and 560 Section 4. 562 7. Guidance for Authors of BGP Specifications 564 A document that specifies a new BGP attribute MUST provide specifics 565 regarding what constitutes an error for that attribute and how that 566 error is to be handled. Allowable error-handling approaches are 567 detailed in Section 2. The treat-as-withdraw approach is generally 568 preferred. The document SHOULD also provide consideration of what 569 debugging facilities may be required to permit issues caused by a 570 malformed attribute to be diagnosed. 572 For any malformed attribute that is handled by the "attribute 573 discard" instead of the "treat-as-withdraw" approach, it is critical 574 to consider the potential impact of doing so. In particular, if the 575 attribute in question has or may have an effect on route selection or 576 installation, the presumption is that discarding it is unsafe, unless 577 careful analysis proves otherwise. The analysis should take into 578 account the tradeoff between preserving connectivity and potential 579 side effects. 581 8. IANA Considerations 583 This document makes no request of IANA. 585 9. Security Considerations 587 This specification addresses the vulnerability of a BGP speaker to a 588 potential attack whereby a distant attacker can generate a malformed 589 optional transitive attribute that is not recognized by intervening 590 routers (which thus propagate the attribute unchecked) but that 591 causes session resets when it reaches routers that do recognize the 592 given attribute type. 594 In other respects, this specification does not change BGP's security 595 characteristics. 597 10. Acknowledgements 599 The authors wish to thank Juan Alcaide, Ron Bonica, Mach Chen, Andy 600 Davidson, Bruno Decraene, Rex Fernando, Jeff Haas, Chris Hall, Joel 601 Halpern, Dong Jie, Akira Kato, Miya Kohno, Tony Li, Alton Lo, Shin 602 Miyakawa, Tamas Mondal, Jonathan Oddy, Tony Przygienda, Robert 603 Raszuk, Yakov Rekhter, Eric Rosen, Shyam Sethuram, Rob Shakir, 604 Naiming Shen, Adam Simpson, Ananth Suryanarayana, Kaliraj 605 Vairavakkalai, Lili Wang and Ondrej Zajicek for their observations 606 and discussion of this topic, and review of this document. 608 11. References 610 11.1. Normative References 612 [RFC1997] Chandrasekeran, R., Traina, P., and T. Li, "BGP 613 Communities Attribute", RFC 1997, August 1996. 615 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 616 Requirement Levels", BCP 14, RFC 2119, March 1997. 618 [RFC4271] Rekhter, Y., Li, T., and S. Hares, "A Border Gateway 619 Protocol 4 (BGP-4)", RFC 4271, January 2006. 621 [RFC4360] Sangli, S., Tappan, D., and Y. Rekhter, "BGP Extended 622 Communities Attribute", RFC 4360, February 2006. 624 [RFC4456] Bates, T., Chen, E., and R. Chandra, "BGP Route 625 Reflection: An Alternative to Full Mesh Internal BGP 626 (IBGP)", RFC 4456, April 2006. 628 [RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter, 629 "Multiprotocol Extensions for BGP-4", RFC 4760, January 630 2007. 632 [RFC5701] Rekhter, Y., "IPv6 Address Specific BGP Extended Community 633 Attribute", RFC 5701, November 2009. 635 [RFC6793] Vohra, Q. and E. Chen, "BGP Support for Four-Octet 636 Autonomous System (AS) Number Space", RFC 6793, December 637 2012. 639 11.2. Informative References 641 [I-D.ietf-l2vpn-evpn] 642 Sajassi, A., Aggarwal, R., Bitar, N., Isaac, A., and J. 643 Uttaro, "BGP MPLS Based Ethernet VPN", draft-ietf-l2vpn- 644 evpn-07 (work in progress), May 2014. 646 [RFC7117] Aggarwal, R., Kamite, Y., Fang, L., Rekhter, Y., and C. 647 Kodeboniya, "Multicast in Virtual Private LAN Service 648 (VPLS)", RFC 7117, February 2014. 650 Authors' Addresses 652 Enke Chen (editor) 653 Cisco Systems, Inc. 655 Email: enkechen@cisco.com 657 John G. Scudder (editor) 658 Juniper Networks 660 Email: jgs@juniper.net 662 Pradosh Mohapatra 663 Sproute Networks 665 Email: mpradosh@yahoo.com 666 Keyur Patel 667 Cisco Systems, Inc. 669 Email: keyupate@cisco.com