idnits 2.17.1 draft-ietf-idr-error-handling-10.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 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 29, 2014) is 3613 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 (==), 7 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, J. Scudder, Ed. 5 5701 (if approved) Juniper Networks 6 Intended status: Standards Track P. Mohapatra 7 Expires: November 30, 2014 Sproute Networks 8 K. Patel 9 Cisco Systems, Inc. 10 May 29, 2014 12 Revised Error Handling for BGP UPDATE Messages 13 draft-ietf-idr-error-handling-10 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 30, 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. Attribute Length Fields . . . . . . . . . . . . . . . . . . . 6 81 5. Parsing of NLRI Fields . . . . . . . . . . . . . . . . . . . 7 82 5.1. Encoding NLRI . . . . . . . . . . . . . . . . . . . . . . 7 83 5.2. Missing NLRI . . . . . . . . . . . . . . . . . . . . . . 7 84 5.3. Syntactic Correctness of NLRI Fields . . . . . . . . . . 8 85 5.4. Typed NLRI . . . . . . . . . . . . . . . . . . . . . . . 8 86 6. Operational Considerations . . . . . . . . . . . . . . . . . 9 87 7. Error Handling Procedures for Existing Attributes . . . . . . 9 88 7.1. ORIGIN . . . . . . . . . . . . . . . . . . . . . . . . . 10 89 7.2. AS_PATH . . . . . . . . . . . . . . . . . . . . . . . . . 10 90 7.3. NEXT_HOP . . . . . . . . . . . . . . . . . . . . . . . . 10 91 7.4. MULTI_EXIT_DISC . . . . . . . . . . . . . . . . . . . . . 11 92 7.5. LOCAL_PREF . . . . . . . . . . . . . . . . . . . . . . . 11 93 7.6. ATOMIC_AGGREGATE . . . . . . . . . . . . . . . . . . . . 11 94 7.7. AGGREGATOR . . . . . . . . . . . . . . . . . . . . . . . 11 95 7.8. Community . . . . . . . . . . . . . . . . . . . . . . . . 12 96 7.9. Extended Community . . . . . . . . . . . . . . . . . . . 12 97 7.10. IPv6 Address Specific BGP Extended Community Attribute . 12 98 7.11. ORIGINATOR_ID . . . . . . . . . . . . . . . . . . . . . . 12 99 7.12. CLUSTER_LIST . . . . . . . . . . . . . . . . . . . . . . 13 100 7.13. MP_REACH_NLRI and MP_UNREACH_NLRI . . . . . . . . . . . . 13 101 8. Guidance for Authors of BGP Specifications . . . . . . . . . 13 102 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 103 10. Security Considerations . . . . . . . . . . . . . . . . . . . 13 104 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 14 105 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 14 106 12.1. Normative References . . . . . . . . . . . . . . . . . . 14 107 12.2. Informative References . . . . . . . . . . . . . . . . . 15 108 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 15 110 1. Introduction 112 According to the base BGP specification [RFC4271], a BGP speaker that 113 receives an UPDATE message containing a malformed attribute is 114 required to reset the session over which the offending attribute was 115 received. This behavior is undesirable as a session reset would 116 impact not only routes with the offending attribute, but also other 117 valid routes exchanged over the session. In the case of optional 118 transitive attributes, the behavior is especially troublesome and may 119 present a potential security vulnerability. The reason is that such 120 attributes may have been propagated without being checked by 121 intermediate routers that do not recognize the attributes -- in 122 effect the attribute may have been tunneled, and when they do reach a 123 router that recognizes and checks them, the session that is reset may 124 not be associated with the router that is at fault. To make matters 125 worse, in such cases although the problematic attributes may have 126 originated with a single update transmitted by a single BGP speaker, 127 by the time they encounter a router that checks them they may have 128 been replicated many times, and thus may cause the reset of many 129 peering sessions. Thus the damage inflicted may be multiplied 130 manyfold. 132 The goal for revising the error handling for UPDATE messages is to 133 minimize the impact on routing by a malformed UPDATE message, while 134 maintaining protocol correctness to the extent possible. This can be 135 achieved largely by maintaining the established session and keeping 136 the valid routes exchanged, but removing the routes carried in the 137 malformed UPDATE from the routing system. 139 This document partially revises the error handling for UPDATE 140 messages, and provides guidelines for the authors of documents 141 defining new attributes. Finally, it revises the error handling 142 procedures for a number of existing attributes. Specifically, the 143 error handling procedures of [RFC1997], [RFC4271], [RFC4360], 144 [RFC4456], [RFC4760] and [RFC5701] are revised. 146 1.1. Requirements Language 148 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 149 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 150 document are to be interpreted as described in RFC 2119 [RFC2119]. 152 2. Error-Handling Approaches 154 In this document we refer to four different approaches to handling 155 errors found in BGP path attributes. They are as follows (listed in 156 order, from the one with the "strongest" action to the one with the 157 "weakest" action): 159 o Session reset: This is the approach used throughout the base BGP 160 specification [RFC4271], where a NOTIFICATION is sent and the 161 session terminated. 163 o AFI/SAFI disable: [RFC4760] specifies a procedure for disabling a 164 particular AFI/SAFI. 166 o Treat-as-withdraw: In this approach, the UPDATE message containing 167 the path attribute in question MUST be treated as though all 168 contained routes had been withdrawn just as if they had been 169 listed in the WITHDRAWN ROUTES field (or in the MP_UNREACH_NLRI 170 attribute if appropriate) of the UPDATE message, thus causing them 171 to be removed from the Adj-RIB-In according to the procedures of 172 [RFC4271]. 174 o Attribute discard: In this approach the malformed attribute MUST 175 be discarded and the UPDATE message continues to be processed. 176 This approach MUST NOT be used except in the case of an attribute 177 that has no effect on route selection or installation. 179 3. Revision to BGP UPDATE Message Error Handling 181 This specification amends [RFC4271] Section 6.3 in a number of ways. 182 See also Section 7 for treatment of specific path attributes. 184 a. The first paragraph is revised as follows: 186 Old Text: 188 All errors detected while processing the UPDATE message 189 MUST be indicated by sending the NOTIFICATION message with 190 the Error Code UPDATE Message Error. The error subcode 191 elaborates on the specific nature of the error. 193 New text: 195 An error detected while processing the UPDATE message for 196 which a session reset is specified MUST be indicated by 197 sending the NOTIFICATION message with the Error Code UPDATE 198 Message Error. The error subcode elaborates on the 199 specific nature of the error. 201 b. Error handling for the following case remains unchanged: 203 If the Withdrawn Routes Length or Total Attribute Length is 204 too large (i.e., if Withdrawn Routes Length + Total 205 Attribute Length + 23 exceeds the message Length), then the 206 Error Subcode MUST be set to Malformed Attribute List. 208 c. Attribute Flag error handling is revised as follows: 210 Old Text: 212 If any recognized attribute has Attribute Flags that 213 conflict with the Attribute Type Code, then the Error 214 Subcode MUST be set to Attribute Flags Error. The Data 215 field MUST contain the erroneous attribute (type, length, 216 and value). 218 New Text: 220 If the value of either the Optional or Transitive bits in 221 the Attribute Flags is in conflict with their specified 222 values, then the attribute MUST be treated as malformed and 223 the treat-as-withdraw approach used, unless the 224 specification for the attribute mandates different handling 225 for incorrect Attribute Flags. 227 d. If any of the well-known mandatory attributes are not present in 228 an UPDATE message, then "treat-as-withdraw" MUST be used. (Note 229 that [RFC4760] reclassifies NEXT_HOP as what is effectively 230 discretionary.) 232 e. "Treat-as-withdraw" MUST be used for the cases that specify a 233 session reset and involve any of the attributes ORIGIN, AS_PATH, 234 NEXT_HOP, MULTI_EXIT_DISC, or LOCAL_PREF. 236 f. "Attribute discard" MUST be used for any of the cases that 237 specify a session reset and involve ATOMIC_AGGREGATE or 238 AGGREGATOR. 240 g. If the MP_REACH_NLRI attribute or the MP_UNREACH_NLRI [RFC4760] 241 attribute appears more than once in the UPDATE message, then a 242 NOTIFICATION message MUST be sent with the Error Subcode 243 "Malformed Attribute List". If any other attribute (whether 244 recognized or unrecognized) appears more than once in an UPDATE 245 message, then all the occurrences of the attribute other than the 246 first one SHALL be discarded and the UPDATE message continue to 247 be processed. 249 h. When multiple attribute errors exist in an UPDATE message, if the 250 same approach (either "session reset", "treat-as-withdraw" or 251 "attribute discard") is specified for the handling of these 252 malformed attributes, then the specified approach MUST be used. 253 Otherwise the approach with the strongest action MUST be used. 255 i. The Withdrawn Routes field MUST be checked for syntactic 256 correctness in the same manner as the NLRI field. This is 257 discussed further below, and in Section 5.3. 259 j. Finally, we observe that in order to use the approach of "treat- 260 as-withdraw", the entire NLRI field and/or the MP_REACH_NLRI and 261 MP_UNREACH_NLRI attributes need to be successfully parsed -- what 262 this entails is discussed in more detail in Section 5. If this 263 is not possible, the procedures of [RFC4271] and/or [RFC4760] 264 continue to apply, meaning that the "session reset" approach (or 265 the "AFI/SAFI disable" approach) MUST be followed. 267 4. Attribute Length Fields 269 There are two error cases in which the Total Attribute Length value 270 can be in conflict with the enclosed path attributes, which 271 themselves carry length values. In the "overrun" case, as the 272 enclosed path attributes are parsed, the length of the last 273 encountered path attribute would cause the Total Attribute Length to 274 be exceeded. In the "underrun" case, as the enclosed path attributes 275 are parsed, after the last successfully-parsed attribute, fewer than 276 three octets remain, or fewer than four octets, if the Attribute 277 Flags field has the Extended Length bit set -- that is, there remains 278 unconsumed data in the path attributes but yet insufficient data to 279 encode a single minimum-sized path attribute. In either of these 280 cases an error condition exists and the treat-as-withdraw approach 281 MUST be used (unless some other, more severe error is encountered 282 dictating a stronger approach), and the Total Attribute Length MUST 283 be relied upon to enable the beginning of the NLRI field to be 284 located. 286 For all path attributes other than those specified as having an 287 attribute length that may be zero it SHALL be considered a syntax 288 error for the attribute to have a length of zero. (Of the path 289 attributes considered in this specification, only AS_PATH and 290 ATOMIC_AGGREGATE may validly have an attribute length of zero.) 292 5. Parsing of NLRI Fields 294 5.1. Encoding NLRI 296 To facilitate the determination of the NLRI field in an UPDATE with a 297 malformed attribute: 299 o The MP_REACH_NLRI or MP_UNREACH_NLRI attribute (if present) SHALL 300 be encoded as the very first path attribute in an UPDATE. 302 o An UPDATE message MUST NOT contain more than one of the following: 303 non-empty Withdrawn Routes field, non-empty Network Layer 304 Reachability Information field, MP_REACH_NLRI attribute, and 305 MP_UNREACH_NLRI attribute. 307 Since older BGP speakers may not implement these restrictions, an 308 implementation MUST still be prepared to receive these fields in any 309 position or combination. 311 If the encoding of [RFC4271] is used, the NLRI field for the IPv4 312 unicast address family is carried immediately following all the 313 attributes in an UPDATE. When such an UPDATE is received, we observe 314 that the NLRI field can be determined using the "Message Length", 315 "Withdrawn Route Length" and "Total Attribute Length" (when they are 316 consistent) carried in the message instead of relying on the length 317 of individual attributes in the message. 319 5.2. Missing NLRI 321 [RFC4724] specifies an End-of-RIB message ("EoR") that can be encoded 322 as an UPDATE message that contains only a MP_UNREACH_NLRI attribute 323 that encodes no NLRI (it can also be a completely empty UPDATE 324 message in the case of the "legacy" encoding). In all other well- 325 specified cases, an UPDATE either carries only withdrawn routes 326 (either in the Withdrawn Routes field, or the MP_UNREACH_NLRI 327 attribute), or it advertises reachable routes (either in the Network 328 Layer Reachability Information field, or the MP_REACH_NLRI 329 attribute). 331 Thus, if an UPDATE message is encountered that does contain path 332 attributes other than MP_UNREACH_NLRI and doesn't encode any 333 reachable NLRI, we cannot be confident that the NLRI have been 334 successfully parsed as Section 3 (j) requires. For this reason, if 335 any path attribute errors are encountered in such an UPDATE message, 336 and if any encountered error specifies an error-handling approach 337 other than "attribute discard", then the "session reset" approach 338 MUST be used. 340 5.3. Syntactic Correctness of NLRI Fields 342 The NLRI field or Withdrawn Routes field SHALL be considered 343 "syntactically incorrect" if either of the following are true: 345 o The length of any of the included NLRI is greater than 32, 347 o When parsing NLRI contained in the field, the length of the last 348 NLRI found exceeds the amount of unconsumed data remaining in the 349 field. 351 Similarly, the MP_REACH_NLRI or MP_UNREACH_NLRI attribute of an 352 update SHALL be considered to be incorrect if any of the following 353 are true: 355 o The length of any of the included NLRI is inconsistent with the 356 given AFI/SAFI (for example, if an IPv4 NLRI has a length greater 357 than 32 or an IPv6 NLRI has a length greater than 128), 359 o When parsing NLRI contained in the attribute, the length of the 360 last NLRI found exceeds the amount of unconsumed data remaining in 361 the attribute. 363 o The attribute flags of the attribute are inconsistent with those 364 specified in [RFC4760]. 366 o The length of the MP_UNREACH_NLRI attribute is less than 3, or the 367 length of the MP_REACH_NLRI attribute is less than 5. 369 5.4. Typed NLRI 371 Certain address families, for example MVPN [RFC7117] and EVPN 372 [I-D.ietf-l2vpn-evpn] have NLRI that are typed. Since supported type 373 values within the address family are not expressed in the MP-BGP 374 capability [RFC4760], it is possible for a BGP speaker to advertise 375 support for the given address family and sub-address family while 376 still not supporting a particular type of NLRI within that AFI/SAFI. 378 A BGP speaker advertising support for such a typed address family 379 MUST handle routes with unrecognized NLRI types within that address 380 family by discarding them, unless the relevant specification for that 381 address family specifies otherwise. 383 6. Operational Considerations 385 Although the "treat-as-withdraw" error-handling behavior defined in 386 Section 2 makes every effort to preserve BGP's correctness, we note 387 that if an UPDATE received on an IBGP session is subjected to this 388 treatment, inconsistent routing within the affected Autonomous System 389 may result. The consequences of inconsistent routing can include 390 long-lived forwarding loops and black holes. While lamentable, this 391 issue is expected to be rare in practice, and more importantly is 392 seen as less problematic than the session-reset behavior it replaces. 394 When a malformed attribute is indeed detected over an IBGP session, 395 we RECOMMEND that routes with the malformed attribute be identified 396 and traced back to the ingress router in the network where the routes 397 were sourced or received externally, and then a filter be applied on 398 the ingress router to prevent the routes from being sourced or 399 received. This will help maintain routing consistency in the 400 network. 402 Even if inconsistent routing does not arise, the "treat-as-withdraw" 403 behavior can cause either complete unreachability or sub-optimal 404 routing for the destinations whose routes are carried in the affected 405 UPDATE message. 407 Note that "treat-as-withdraw" is different from discarding an UPDATE 408 message. The latter violates the basic BGP principle of incremental 409 update, and could cause invalid routes to be kept. 411 Because of these potential issues, a BGP speaker MUST provide 412 debugging facilities to permit issues caused by a malformed attribute 413 to be diagnosed. At a minimum, such facilities MUST include logging 414 an error listing the NLRI involved, and containing the entire 415 malformed UPDATE message when such an attribute is detected. The 416 malformed UPDATE message SHOULD be analyzed, and the root cause 417 SHOULD be investigated. 419 7. Error Handling Procedures for Existing Attributes 421 In the following subsections, we elaborate on the conditions for 422 error-checking various path attributes, and specify what approach(es) 423 should be used to handle malformations. It is possible that 424 implementations may apply other error checks not contemplated here. 426 If so, the error handling approach given here should generally be 427 applied. 429 7.1. ORIGIN 431 The attribute is considered malformed if its length is not 1, or it 432 has an undefined value [RFC4271]. 434 An UPDATE message with a malformed ORIGIN attribute SHALL be handled 435 using the approach of "treat-as-withdraw". 437 7.2. AS_PATH 439 An AS_PATH is considered malformed if an unrecognized segment type is 440 encountered, or if it contains a malformed segment. A segment is 441 considered malformed if any of the following obtains: 443 o There is an overrun, where the path segment length field of the 444 last segment encountered would cause the Attribute Length to be 445 exceeded. 447 o There is an underrun, where after the last successfully-parsed 448 segment, there is only a single octet remaining (that is, there is 449 not enough unconsumed data to provide even an empty segment 450 header). 452 o It has a path segment length field of zero. 454 An UPDATE message with a malformed AS_PATH attribute SHALL be handled 455 using the approach of "treat-as-withdraw". 457 [RFC4271] also says that an implementation optionally "MAY check 458 whether the leftmost ... AS in the AS_PATH attribute is equal to the 459 autonomous system number of the peer that sent the message". A BGP 460 implementation SHOULD also handle routes that violate this check 461 using "treat-as-withdraw", but MAY follow the session reset behavior 462 if configured to do so. 464 7.3. NEXT_HOP 466 The attribute is considered malformed if it is syntactically 467 incorrect according to [RFC4271]. 469 An UPDATE message with a malformed NEXT_HOP attribute SHALL be 470 handled using the approach of "treat-as-withdraw". 472 7.4. MULTI_EXIT_DISC 474 The attribute is considered malformed if its length is not 4 475 [RFC4271]. 477 An UPDATE message with a malformed MULTI_EXIT_DISC attribute SHALL be 478 handled using the approach of "treat-as-withdraw". 480 7.5. LOCAL_PREF 482 The error handling of [RFC4271] is revised as follows. 484 o If the LOCAL_PREF attribute is received from an external neighbor, 485 it SHALL be discarded using the approach of "attribute discard", 486 or 488 o if received from an internal neighbor, it SHALL be considered 489 malformed if its length is not equal to 4. If malformed, the 490 UPDATE SHALL be handled using the approach of "treat-as-withdraw". 492 7.6. ATOMIC_AGGREGATE 494 The attribute SHALL be considered malformed if its length is not 0 495 [RFC4271]. 497 An UPDATE message with a malformed ATOMIC_AGGREGATE attribute SHALL 498 be handled using the approach of "attribute discard". 500 7.7. AGGREGATOR 502 The error conditions specified in [RFC4271] for the attribute are 503 revised as follows: 505 The AGGREGATOR attribute SHALL be considered malformed if any of the 506 following applies: 508 o Its length is not 6 (when the "4-octet AS number capability" is 509 not advertised to, or not received from the peer [RFC6793]). 511 o Its length is not 8 (when the "4-octet AS number capability" is 512 both advertised to, and received from the peer). 514 An UPDATE message with a malformed AGGREGATOR attribute SHALL be 515 handled using the approach of "attribute discard". 517 7.8. Community 519 The error handling of [RFC1997] is revised as follows: 521 The Community attribute SHALL be considered malformed if its length 522 is not a nonzero multiple of 4. 524 An UPDATE message with a malformed Community attribute SHALL be 525 handled using the approach of "treat-as-withdraw". 527 7.9. Extended Community 529 The error handling of [RFC4360] is revised as follows: 531 The Extended Community attribute SHALL be considered malformed if its 532 length is not a nonzero multiple of 8. 534 An UPDATE message with a malformed Extended Community attribute SHALL 535 be handled using the approach of "treat-as-withdraw". 537 Note that a BGP speaker MUST NOT treat an unrecognized Extended 538 Community Type or Sub-Type as an error. 540 7.10. IPv6 Address Specific BGP Extended Community Attribute 542 The error handling of [RFC5701] is revised as follows: 544 The IPv6 Address Specific Extended Community attribute SHALL be 545 considered malformed if its length is not a nonzero multiple of 20. 547 An UPDATE message with a malformed IPv6 Address Specific Extended 548 Community attribute SHALL be handled using the approach of "treat-as- 549 withdraw". 551 Note that a BGP speaker MUST NOT treat an unrecognized IPv6 Address 552 Specific Extended Community Type or Sub-Type as an error. 554 7.11. ORIGINATOR_ID 556 The error handling of [RFC4456] is revised as follows. 558 o If the ORIGINATOR_ID attribute is received from an external 559 neighbor, it SHALL be discarded using the approach of "attribute 560 discard", or 562 o if received from an internal neighbor, it SHALL be considered 563 malformed if its length is not equal to 4. If malformed, the 564 UPDATE SHALL be handled using the approach of "treat-as-withdraw". 566 7.12. CLUSTER_LIST 568 The error handling of [RFC4456] is revised as follows. 570 o If the CLUSTER_LIST attribute is received from an external 571 neighbor, it SHALL be discarded using the approach of "attribute 572 discard", or 574 o if received from an internal neighbor, it SHALL be considered 575 malformed if its length is not a nonzero multiple of 4. If 576 malformed, the UPDATE SHALL be handled using the approach of 577 "treat-as-withdraw". 579 7.13. MP_REACH_NLRI and MP_UNREACH_NLRI 581 The handling of these attributes is discussed in Section 3 and 582 Section 5. 584 8. Guidance for Authors of BGP Specifications 586 A document that specifies a new BGP attribute MUST provide specifics 587 regarding what constitutes an error for that attribute and how that 588 error is to be handled. Allowable error-handling approaches are 589 detailed in Section 2. The treat-as-withdraw approach is generally 590 preferred. The document SHOULD also provide consideration of what 591 debugging facilities may be required to permit issues caused by a 592 malformed attribute to be diagnosed. 594 For any malformed attribute that is handled by the "attribute 595 discard" instead of the "treat-as-withdraw" approach, it is critical 596 to consider the potential impact of doing so. In particular, if the 597 attribute in question has or may have an effect on route selection or 598 installation, the presumption is that discarding it is unsafe, unless 599 careful analysis proves otherwise. The analysis should take into 600 account the tradeoff between preserving connectivity and potential 601 side effects. 603 9. IANA Considerations 605 This document makes no request of IANA. 607 10. Security Considerations 609 This specification addresses the vulnerability of a BGP speaker to a 610 potential attack whereby a distant attacker can generate a malformed 611 optional transitive attribute that is not recognized by intervening 612 routers (which thus propagate the attribute unchecked) but that 613 causes session resets when it reaches routers that do recognize the 614 given attribute type. 616 In other respects, this specification does not change BGP's security 617 characteristics. 619 11. Acknowledgements 621 The authors wish to thank Juan Alcaide, Deniz Bahadir, Ron Bonica, 622 Mach Chen, Andy Davidson, Bruno Decraene, Rex Fernando, Jeff Haas, 623 Chris Hall, Joel Halpern, Dong Jie, Akira Kato, Miya Kohno, Tony Li, 624 Alton Lo, Shin Miyakawa, Tamas Mondal, Jonathan Oddy, Tony 625 Przygienda, Robert Raszuk, Yakov Rekhter, Eric Rosen, Shyam Sethuram, 626 Rob Shakir, Naiming Shen, Adam Simpson, Ananth Suryanarayana, Kaliraj 627 Vairavakkalai, Lili Wang and Ondrej Zajicek for their observations 628 and discussion of this topic, and review of this document. 630 12. References 632 12.1. Normative References 634 [RFC1997] Chandrasekeran, R., Traina, P., and T. Li, "BGP 635 Communities Attribute", RFC 1997, August 1996. 637 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 638 Requirement Levels", BCP 14, RFC 2119, March 1997. 640 [RFC4271] Rekhter, Y., Li, T., and S. Hares, "A Border Gateway 641 Protocol 4 (BGP-4)", RFC 4271, January 2006. 643 [RFC4360] Sangli, S., Tappan, D., and Y. Rekhter, "BGP Extended 644 Communities Attribute", RFC 4360, February 2006. 646 [RFC4456] Bates, T., Chen, E., and R. Chandra, "BGP Route 647 Reflection: An Alternative to Full Mesh Internal BGP 648 (IBGP)", RFC 4456, April 2006. 650 [RFC4724] Sangli, S., Chen, E., Fernando, R., Scudder, J., and Y. 651 Rekhter, "Graceful Restart Mechanism for BGP", RFC 4724, 652 January 2007. 654 [RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter, 655 "Multiprotocol Extensions for BGP-4", RFC 4760, January 656 2007. 658 [RFC5701] Rekhter, Y., "IPv6 Address Specific BGP Extended Community 659 Attribute", RFC 5701, November 2009. 661 [RFC6793] Vohra, Q. and E. Chen, "BGP Support for Four-Octet 662 Autonomous System (AS) Number Space", RFC 6793, December 663 2012. 665 12.2. Informative References 667 [I-D.ietf-l2vpn-evpn] 668 Sajassi, A., Aggarwal, R., Bitar, N., Isaac, A., and J. 669 Uttaro, "BGP MPLS Based Ethernet VPN", draft-ietf-l2vpn- 670 evpn-07 (work in progress), May 2014. 672 [RFC7117] Aggarwal, R., Kamite, Y., Fang, L., Rekhter, Y., and C. 673 Kodeboniya, "Multicast in Virtual Private LAN Service 674 (VPLS)", RFC 7117, February 2014. 676 Authors' Addresses 678 Enke Chen (editor) 679 Cisco Systems, Inc. 681 Email: enkechen@cisco.com 683 John G. Scudder (editor) 684 Juniper Networks 686 Email: jgs@juniper.net 688 Pradosh Mohapatra 689 Sproute Networks 691 Email: mpradosh@yahoo.com 693 Keyur Patel 694 Cisco Systems, Inc. 696 Email: keyupate@cisco.com