One document matched: draft-ietf-idr-error-handling-08.xml
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
There has to be one entity for each item to be referenced.
An alternate method (rfc include) is described in the references. -->
<!ENTITY RFC1997 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1997.xml">
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC4271 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4271.xml">
<!ENTITY RFC4360 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4360.xml">
<!ENTITY RFC4456 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4456.xml">
<!ENTITY RFC4760 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4760.xml">
<!ENTITY RFC6793 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6793.xml">
<!ENTITY RFC5701 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5701.xml">
<!ENTITY RFC7117 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7117.xml">
<!ENTITY I-D.ietf-l2vpn-evpn SYSTEM
"http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-l2vpn-evpn.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc category="std" docName="draft-ietf-idr-error-handling-08" ipr="pre5378Trust200902"
updates="1997, 4271, 4360, 4456, 4760, 5701">
<front>
<title abbrev="Revised Error Handling for BGP">Revised Error Handling
for BGP UPDATE Messages</title>
<author fullname="Enke Chen" initials="E." role="editor"
surname="Chen">
<organization>Cisco Systems, Inc.</organization>
<address>
<email>enkechen@cisco.com</email>
</address>
</author>
<author fullname="John G. Scudder" initials="J.G." role="editor"
surname="Scudder">
<organization>Juniper Networks</organization>
<address>
<email>jgs@juniper.net</email>
</address>
</author>
<author fullname="Pradosh Mohapatra" initials="P."
surname="Mohapatra">
<organization>Sproute Networks</organization>
<address>
<email>mpradosh@yahoo.com</email>
</address>
</author>
<author fullname="Keyur Patel" initials="K."
surname="Patel">
<organization>Cisco Systems, Inc.</organization>
<address>
<email>keyupate@cisco.com</email>
</address>
</author>
<date year="2014" />
<area>General</area>
<workgroup>Internet Engineering Task Force</workgroup>
<keyword>BGP</keyword>
<abstract>
<t>
According to the base BGP specification, a BGP speaker that receives
an UPDATE message containing a malformed attribute is required to
reset the session over which the offending attribute was received.
This behavior is undesirable as a session reset would impact not only
routes with the offending attribute, but also other valid routes
exchanged over the session. This document partially revises the
error handling for UPDATE messages, and provides guidelines for the
authors of documents defining new attributes. Finally, it revises
the error handling procedures for a number of existing attributes.
</t>
<t>
This document updates error handling for RFCs 1997, 4271, 4360, 4456,
4760 and 5701.
</t>
</abstract>
</front>
<middle>
<section title="Introduction">
<t>
According to the base BGP specification <xref target="RFC4271"/>, a BGP speaker that
receives an UPDATE message containing a malformed attribute is
required to reset the session over which the offending attribute was
received. This behavior is undesirable as a session reset would
impact not only routes with the offending attribute, but also other
valid routes exchanged over the session. In the case of optional
transitive attributes, the behavior is especially troublesome and may
present a potential security vulnerability. The reason is that such
attributes may have been propagated without being checked by
intermediate routers that do not recognize the attributes -- in
effect the attribute may have been tunneled, and when they do reach a
router that recognizes and checks them, the session that is reset may
not be associated with the router that is at fault. To make matters worse,
in such cases although the problematic attributes may have originated with
a single update transmitted by a single BGP speaker, by the time they
encounter a router that checks them they may have been replicated many
times, and thus may cause the reset of many peering sessions. Thus the
damage inflicted may be multiplied manyfold.
</t>
<t>
The goal for revising the error handling for UPDATE messages is to
minimize the impact on routing by a malformed UPDATE message, while
maintaining protocol correctness to the extent possible. This can be
achieved largely by maintaining the established session and keeping
the valid routes exchanged, but removing the routes carried in the
malformed UPDATE from the routing system.
</t>
<t>
This document partially revises the error handling for UPDATE
messages, and provides guidelines for the authors of documents
defining new attributes. Finally, it revises the error handling
procedures for a number of existing attributes. Specifically, the
error handling procedures of <xref target="RFC1997"/>,
<xref target="RFC4271"/>, <xref target="RFC4360"/>,
<xref target="RFC4456"/>, <xref target="RFC4760"/> and
<xref target="RFC5701"/> are revised.
</t>
<section title="Requirements Language">
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in <xref
target="RFC2119">RFC 2119</xref>.</t>
</section>
</section>
<section anchor="approaches" title="Error-Handling Approaches">
<t>
In this document we refer to three different approaches to
handling errors found in BGP path attributes. They are as follows
(listed in order, from the one with the "strongest" action to the
one with the "weakest" action):
</t>
<t><list style="symbols">
<t>
Session reset: This is the approach used throughout the
<xref target="RFC4271">base BGP specification</xref>, where
a NOTIFICATION is sent and the session terminated.
</t>
<t>
Treat-as-withdraw: In this approach, the UPDATE message containing
the path attribute in question MUST be treated as though all contained routes had
been withdrawn just as if they had been listed in the WITHDRAWN
ROUTES field (or in the MP_UNREACH_NLRI attribute if appropriate) of
the UPDATE message, thus causing them to be removed from the Adj-RIB-In
according to the procedures of <xref target="RFC4271"/>.
</t>
<t>
Attribute discard: In this approach the
malformed attribute MUST be discarded and the UPDATE message
continues to be processed. This approach MUST NOT be used except in the case of an
attribute that has no effect on route selection or installation.
</t>
</list></t>
</section>
<section anchor="revision" title="Revision to BGP UPDATE Message Error Handling">
<t>
This specification amends <xref target="RFC4271"/> Section 6.3 in a number of
ways. See also <xref target="existing_attributes"/> for treatment of
specific path attributes.
</t>
<t>
<list style="letters">
<t>
The first paragraph is revised as follows:
<list style="empty">
<t>
Old Text:
<list>
<t>
All errors detected while processing the UPDATE message MUST be
indicated by sending the NOTIFICATION message with the Error Code
UPDATE Message Error. The error subcode elaborates on the specific
nature of the error.
</t>
</list>
</t>
<t>
New text:
<list>
<t>
An error detected while processing the UPDATE message for which a
session reset is specified MUST be indicated by sending the
NOTIFICATION message with the Error Code UPDATE Message Error.
The error subcode elaborates on the specific nature of the error.
</t>
</list>
</t>
</list>
</t>
<t>
Error handling for the following case remains unchanged:
<list style="hanging" hangIndent="6">
<t>
If the Withdrawn Routes Length or Total Attribute Length
is too large (i.e., if Withdrawn Routes Length + Total Attribute
Length + 23 exceeds the message Length), then the Error Subcode
MUST be set to Malformed Attribute List.
</t>
</list>
</t>
<t>
Attribute Flag error handling is revised as follows:
<list style="empty">
<t>
Old Text:
<list>
<t>
If any recognized attribute has Attribute Flags that conflict with
the Attribute Type Code, then the Error Subcode MUST be set to
Attribute Flags Error. The Data field MUST contain the erroneous
attribute (type, length, and value).
</t>
</list>
</t>
<t>
New Text:
<list>
<t>
If any recognized attribute has Attribute Flags that conflict
with the Attribute Type Code, then the attribute MUST be
treated as malformed and the treat-as-withdraw approach
used, unless the specification for the attribute
mandates different handling for incorrect Attribute Flags.
</t>
</list>
</t>
</list>
</t>
<t>
If any of the well-known mandatory attributes are not present in an
UPDATE message, then "treat-as-withdraw" MUST be used.
</t>
<t>
"Treat-as-withdraw" MUST be used for the cases that specify a
session reset and involve any of the attributes ORIGIN, AS_PATH,
NEXT_HOP, MULTI_EXIT_DISC, or LOCAL_PREF.
</t>
<t>
"Attribute discard" MUST be used for any of the cases that specify a
session reset and involve ATOMIC_AGGREGATE or AGGREGATOR.
</t>
<t>
If the MP_REACH_NLRI attribute or the MP_UNREACH_NLRI <xref
target="RFC4760"/> attribute appears more than once in the UPDATE
message, then a NOTIFICATION message MUST be sent with the Error
Subcode "Malformed Attribute List". If any other attribute
appears more than once in an UPDATE message, then all the
occurrences of the attribute other than the first one SHALL be
discarded and the UPDATE message continue to be processed.
</t>
<t>
When multiple attribute errors exist in an UPDATE message, if the
same approach (either "session reset", "treat-as-withdraw" or
"attribute discard") is specified for the handling of these malformed
attributes, then the specified approach MUST be used. Otherwise the
approach with the strongest action MUST be used.
</t>
<t>
The Withdrawn Routes field MUST be checked for syntactic correctness
in the same manner as the NLRI field. This is discussed further
below, and in <xref target="nlri_syntax"/>.
</t>
<t>
Finally, we observe that in order to use the approach of
"treat-as-withdraw", the entire NLRI field and/or the
MP_REACH_NLRI and MP_UNREACH_NLRI attributes need to be
successfully parsed. If this is not possible, the procedures of
<xref target="RFC4271"/> continue to apply, meaning that the
"session reset" approach SHOULD be followed. Alternatively the
error handling procedures specified in <xref target="RFC4760"/>
for disabling a particular AFI/SAFI MAY be followed.
</t>
</list>
</t>
<t><list style="format "><t>
One notable case
where it would be not possible to successfully parse the NLRI is if
the NLRI field is found to be "syntactically incorrect" (see
<xref target="nlri_syntax"/>). It can be seen that therefore, this part of
<xref target="RFC4271"/> Section 6.3 necessarily continues to apply:
</t></list></t>
<t><list style="format "><t>
The NLRI field in the UPDATE message is checked for syntactic
validity. If the field is syntactically incorrect, then the Error
Subcode MUST be set to Invalid Network Field.
</t></list></t>
</section>
<section anchor="parsing_nlri" title="Parsing of NLRI Fields">
<t>
To facilitate the determination of the NLRI field in an UPDATE
with a malformed attribute, the following restrictions on encoding
NLRI MUST be followed:
</t>
<t><list style="symbols"><t>
The MP_REACH_NLRI or MP_UNREACH_NLRI
attribute (if present) SHALL be encoded as the very first path
attribute in an UPDATE.
</t>
<t>
The MP_REACH_NLRI or MP_UNREACH_NLRI SHALL NOT be combined in the
same UPDATE message.
</t>
<t>
The MP_REACH_NLRI and MP_UNREACH_NLRI attributes MUST NOT be used
in an UPDATE that also contains a non-empty Withdrawn Routes or
Network Layer Reachability Information field.
</t></list></t>
<t>
In all these cases, however, an implementation MUST still be
prepared to receive these fields in any position or combination.
</t>
<t>
If the encoding of <xref target="RFC4271"/> is used, the NLRI field for the IPv4
unicast address family is carried immediately following all the
attributes in an UPDATE. When such an UPDATE is received, we observe
that the NLRI field can be determined using the "Message Length",
"Withdrawn Route Length" and "Total Attribute Length" (when they are
consistent) carried in the message instead of relying on the length
of individual attributes in the message.
</t>
<section title="Attribute Length Fields">
<t>
There are two error cases in which the Total Attribute Length value
can be in conflict with the enclosed path attributes, which
themselves carry length values. In the "overrun" case, as the
enclosed path attributes are parsed, the length of the last
encountered path attribute would cause the Total Attribute Length to
be exceeded. In the "underrun" case, as the enclosed path attributes
are parsed, after the last successfully-parsed attribute, fewer than
three octets remain, or fewer than four octets, if the Attribute Flags
field has the Extended Length bit set -- that is, there remains
unconsumed data in the path attributes but yet insufficient data to
encode a single minimum-sized path attribute. In either of these
cases an error condition exists and the treat-as-withdraw approach
MUST be used (unless some other, more severe error is encountered
dictating a stronger approach), and the Total Attribute Length MUST
be relied upon to enable the beginning of the NLRI field to be
located.
</t>
<t>
For all path attributes other than those specified as having an
attribute length that may be zero it SHALL be considered a syntax
error for the attribute to have a length of zero. (Of the path
attributes considered in this specification, only AS_PATH and
ATOMIC_AGGREGATE may validly have an attribute length of zero.)
</t>
</section>
<section anchor="nlri_syntax"
title="Syntactic Correctness of NLRI Fields">
<t>
The NLRI field or Withdrawn Routes field SHALL be considered
"syntactically incorrect" if either of the following are true:
<list style="symbols">
<t>
The length of any of the included NLRI is greater than 32,
</t>
<t>
When parsing NLRI contained in the field, the length of the
last NLRI found exceeds the amount of unconsumed data
remaining in the field.
</t></list></t>
<t>
Similarly, the MP_REACH or MP_UNREACH attribute of an update SHALL be
considered to be incorrect if any of the following are true:
<list style="symbols">
<t>
The length of any of the included NLRI is inconsistent with the
given AFI/SAFI (for example, if an IPv4 NLRI has a length
greater than 32 or an IPv6 NLRI has a length greater than 128),
</t>
<t>
When parsing NLRI contained in the attribute, the length of the
last NLRI found exceeds the amount of unconsumed data
remaining in the attribute.
</t>
<t>
The attribute flags of the attribute are inconsistent with those
specified in <xref target="RFC4760"/>.
</t>
<t>
The length of the MP_UNREACH attribute is less than 3, or the
length of the MP_REACH attribute is less than 5.
</t></list></t>
</section>
<section anchor="typed_nlri"
title="Typed NLRI">
<t>
Certain address families, for example <xref
target="RFC7117">MVPN</xref> and <xref
target="I-D.ietf-l2vpn-evpn">EVPN</xref> have NLRI that are
typed. Since supported type values within the address
family are not expressed in the <xref
target="RFC4760">MP-BGP capability</xref>, it is possible for a
BGP speaker to advertise support for the given address family
and sub-address family while still not supporting a particular
type of NLRI within that AFI/SAFI.
</t>
<t>
A BGP speaker advertising support for such a typed address
family MUST handle routes with unrecognized NLRI types within that
address family by discarding them, unless the relevant specification
for that address family specifies otherwise.
</t>
</section>
</section>
<section title="Operational Considerations">
<t>
Although the "treat-as-withdraw" error-handling behavior defined in
Section 2 makes every effort to preserve BGP's correctness, we note
that if an UPDATE received on an IBGP session is subjected to this
treatment, inconsistent routing within the affected Autonomous System
may result. The consequences of inconsistent routing can include
long-lived forwarding loops and black holes. While lamentable, this
issue is expected to be rare in practice, and more importantly is
seen as less problematic than the session-reset behavior it replaces.
</t>
<t>
When a malformed attribute is indeed detected over an IBGP session,
we RECOMMEND that routes with the malformed attribute be identified
and traced back to the ingress router in the network where the routes
were sourced or received externally, and then a filter be applied on
the ingress router to prevent the routes from being sourced or
received. This will help maintain routing consistency in the
network.
</t>
<t>
Even if inconsistent routing does not arise, the "treat-as-withdraw"
behavior can cause either complete unreachability or sub-optimal
routing for the destinations whose routes are carried in the affected
UPDATE message.
</t>
<t>
Note that "treat-as-withdraw" is different from discarding an UPDATE
message. The latter violates the basic BGP principle of incremental
update, and could cause invalid routes to be kept. <!-- (See also
Appendix A.)-->
</t>
<t>
Because of these potential issues, a BGP speaker MUST provide
debugging facilities to permit issues caused by a malformed attribute
to be diagnosed. At a minimum, such facilities MUST include logging
an error listing the NLRI involved, and containing the entire
malformed UPDATE message when such an attribute is detected. The
malformed UPDATE message SHOULD be analyzed, and the root cause
SHOULD be investigated.
</t>
</section>
<section anchor="existing_attributes"
title="Error Handling Procedures for Existing Attributes">
<t>
In the following subsections, we elaborate on the conditions for
error-checking various path attributes, and specify what approach(es)
should be used to handle malformations. It is possible that implementations
may apply other error checks not contemplated here. If so, the error
handling approach given here should generally be applied.
</t>
<section title="ORIGIN">
<t>
The attribute is considered malformed if its length is not 1, or it
has an undefined value <xref target="RFC4271"/>.
</t>
<t>
An UPDATE message with a malformed ORIGIN attribute SHALL be handled
using the approach of "treat-as-withdraw".
</t>
</section>
<section title="AS_PATH">
<t>
An AS_PATH is considered malformed if an unrecognized segment
type is encountered, or if it contains a malformed segment. A
segment is considered malformed if any of the following obtains:
</t>
<t><list style="symbols">
<t>
There is an overrun, where the path segment length field of the last
segment encountered would cause the Attribute Length to be exceeded.
</t>
<t>
There is an underrun, where after the last successfully-parsed segment,
there is only a single octet remaining (that is, there is not enough
unconsumed data to provide even an empty segment header).
</t>
<t>
It has a path segment length field of zero.
</t>
</list></t>
<t>
An UPDATE message with a malformed AS_PATH attribute SHALL be handled
using the approach of "treat-as-withdraw".
</t>
<t>
<xref target="RFC4271"/> also says that an implementation
optionally "MAY check whether the leftmost ... AS in the AS_PATH
attribute is equal to the autonomous system number of the peer
that sent the message". A BGP implementation SHOULD also handle
routes that violate this check using "treat-as-withdraw", but
MAY follow the session reset behavior if configured to do so.
</t>
</section>
<section title="NEXT_HOP">
<t>
The attribute is considered malformed if it is syntactically
incorrect according to <xref target="RFC4271"/>.
</t>
<t>
An UPDATE message with a malformed NEXT_HOP attribute SHALL be
handled using the approach of "treat-as-withdraw".
</t>
</section>
<section title="MULTI_EXIT_DISC">
<t>
The attribute is considered malformed if its length is not 4
<xref target="RFC4271"/>.
</t>
<t>
An UPDATE message with a malformed MULTI_EXIT_DESC attribute SHALL be
handled using the approach of "treat-as-withdraw".
</t>
</section>
<section title="LOCAL_PREF">
<t>
The error handling of <xref target="RFC4271"/> is revised as follows.
<list style="symbols">
<t>
If the LOCAL_PREF attribute is received from an external
neighbor, it SHALL be discarded using the approach of "attribute
discard", or
</t>
<t>
if received from an internal neighbor, it SHALL be considered
malformed if its length is not equal to 4. If malformed, the
UPDATE SHALL be handled using the approach of "treat-as-withdraw".
</t>
</list>
</t>
</section>
<section title="ATOMIC_AGGREGATE">
<t>
The attribute SHALL be considered malformed if its length is not 0
<xref target="RFC4271"/>.
</t>
<t>
An UPDATE message with a malformed ATOMIC_AGGREGATE attribute SHALL
be handled using the approach of "attribute discard".
</t>
</section>
<section title="AGGREGATOR">
<t>
The error conditions specified in <xref target="RFC4271"/> for the attribute are
revised as follows:
</t>
<t>
The AGGREGATOR attribute SHALL be considered malformed if any of the
following applies:
<list style="symbols"><t>
Its length is not 6 (when the "4-octet AS number capability" is
not advertised to, or not received from the peer <xref target="RFC6793"/>).
</t>
<t>
Its length is not 8 (when the "4-octet AS number capability" is
both advertised to, and received from the peer).
</t></list></t>
<t>
An UPDATE message with a malformed AGGREGATOR attribute SHALL be
handled using the approach of "attribute discard".
</t>
</section>
<section title="Community">
<t>
The error handling of <xref target="RFC1997"/> is revised as follows:
</t>
<t>
The Community attribute SHALL be considered malformed if its length
is not a nonzero multiple of 4.
</t>
<t>
An UPDATE message with a malformed Community attribute SHALL be
handled using the approach of "treat-as-withdraw".
</t>
</section>
<section title="Extended Community">
<t>
The error handling of <xref target="RFC4360"/> is revised as follows:
</t>
<t>
The Extended Community attribute SHALL be considered malformed if its
length is not a nonzero multiple of 8.
</t>
<t>
An UPDATE message with a malformed Extended Community attribute SHALL
be handled using the approach of "treat-as-withdraw".
</t>
<t>
Note that a BGP speaker MUST NOT treat an unrecognized Extended
Community Type or Sub-Type as an error.
</t>
</section>
<section title="IPv6 Address Specific BGP Extended Community Attribute">
<t>
The error handling of <xref target="RFC5701"/> is revised as follows:
</t>
<t>
The IPv6 Address Specific Extended Community attribute SHALL be
considered malformed if its length is not a nonzero multiple
of 20.
</t>
<t>
An UPDATE message with a malformed IPv6 Address Specific Extended
Community attribute SHALL be handled using the approach of "treat-as-
withdraw".
</t>
<t>
Note that a BGP speaker MUST NOT treat an unrecognized IPv6 Address
Specific Extended Community Type or Sub-Type as an error.
</t>
</section>
<section title="ORIGINATOR_ID">
<t>
The error handling of <xref target="RFC4456"/> is revised as follows.
<list style="symbols"><t>
If the ORIGINATOR_ID attribute is received from an external neighbor,
it SHALL be discarded using the approach of "attribute discard", or
</t>
<t>
if received from an internal neighbor, it SHALL be considered
malformed if its length is not equal to 4. If
malformed, the UPDATE SHALL be handled using the approach of
"treat-as-withdraw".
</t></list></t>
</section>
<section title="CLUSTER_LIST">
<t>
The error handling of <xref target="RFC4456"/> is revised as follows.
<list style="symbols"><t>
If the CLUSTER_LIST attribute is received from an external neighbor,
it SHALL be discarded using the approach of "attribute discard", or
</t>
<t>
if received from an internal neighbor, it SHALL be considered
malformed if its length is not a nonzero multiple of 4.
If malformed, the UPDATE SHALL be handled using the approach of
"treat-as-withdraw".
</t></list></t>
</section>
<section title="MP_REACH_NLRI and MP_UNREACH_NLRI">
<t>
The handling of these attributes is discussed in <xref target="revision"/>
and <xref target="parsing_nlri"/>.
</t>
</section>
</section>
<section title="Guidance for Authors of BGP Specifications">
<t>
A document that specifies a new BGP attribute MUST provide specifics
regarding what constitutes an error for that attribute and how that
error is to be handled. Allowable error-handling approaches are
detailed in <xref target="approaches"/>. The
treat-as-withdraw approach is generally preferred. The document
SHOULD also provide consideration of what debugging facilities may
be required to permit issues caused by a malformed attribute to be
diagnosed.
</t>
<t>
For any malformed attribute that is handled by the "attribute
discard" instead of the "treat-as-withdraw" approach, it is critical
to consider the potential impact of doing so. In particular, if the
attribute in question has or may have an effect on route selection or
installation, the presumption is that discarding it is unsafe, unless
careful analysis proves otherwise. The analysis should take into
account the tradeoff between preserving connectivity and potential
side effects.
</t>
</section>
<section anchor="IANA" title="IANA Considerations">
<t>This document makes no request of IANA.</t>
</section>
<section title="Security Considerations">
<t>
This specification addresses the vulnerability of a BGP speaker to a
potential attack whereby a distant attacker can generate a malformed
optional transitive attribute that is not recognized by intervening
routers (which thus propagate the attribute unchecked) but that
causes session resets when it reaches routers that do recognize the
given attribute type.
</t>
<t>
In other respects, this specification does not change BGP's security
characteristics.
</t>
</section>
<section title="Acknowledgements">
<t>
The authors wish to thank Juan Alcaide, Ron Bonica, Mach Chen,
Andy Davidson, Bruno Decraene, Rex Fernando, Jeff Haas, Chris Hall, Joel Halpern, Dong
Jie, Akira Kato, Miya Kohno, Tony Li, Alton Lo, Shin Miyakawa,
Tamas Mondal, Jonathan Oddy, Tony Przygienda, Robert Raszuk,
Yakov Rekhter, Eric Rosen, Shyam Sethuram, Rob Shakir, Naiming
Shen, Adam Simpson, Ananth Suryanarayana, Kaliraj Vairavakkalai,
Lili Wang and Ondrej Zajicek for their observations and discussion of this
topic, and review of this document.
</t>
</section>
</middle>
<back>
<references title="Normative References">
&RFC1997;
&RFC2119;
&RFC4271;
&RFC4360;
&RFC4456;
&RFC4760;
&RFC6793;
&RFC5701;
</references>
<references title="Informative References">
&RFC7117;
&I-D.ietf-l2vpn-evpn;
</references>
<!-- <section title="Why not discard UPDATE messages?">
<t>
A commonly asked question is "why not simply discard the UPDATE
message instead of treating it like a withdraw? Isn't that safer and
easier?" The answer is that it might be easier, but it would
compromise BGP's correctness so is unsafe. Consider the following
example of what might happen if UPDATE messages carrying bad
attributes were simply discarded:
</t>
<figure align="center" anchor="xml_happy">
<artwork align="left"><![CDATA[
AS1 - - - - AS2
\ /
\ /
\ /
AS3
]]></artwork>
</figure>
<t><list style="symbols">
<t>
AS1 prefers to reach AS3 directly, and advertises its route to
AS2.
</t>
<t>
AS2 prefers to reach AS3 directly, and advertises its route to
AS1.
</t>
<t>
Connections AS3-AS1 and AS3-AS2 fail simultaneously.
</t>
<t>
AS1 switches to prefer AS2's route, and sends an update message
which includes a withdraw of its previous announcement. The
withdraw is bundled with some advertisements. It includes a bad
attribute. As a result, AS2 ignores the message.
</t>
<t>
AS2 switches to prefer AS1's route, and sends an update message
which includes a withdraw of its previous announcement. The
withdraw is bundled with some advertisements. It includes a bad
attribute. As a result, AS1 ignores the message.
</t></list></t>
<t>
The end result is that AS1 forwards traffic for AS3 towards AS2, and
AS2 forwards traffic for AS3 towards AS1. This is a permanent (until
corrected) forwarding loop.
</t>
<t>
Although the example above discusses route withdraws, we observe that
in BGP the announcement of a route also withdraws the route
previously advertised. The implicit withdraw can be converted into a
real withdraw in a number of ways; for example, the previously-
announced route might have been accepted by policy, but the new
announcement might be rejected by policy. For this reason, the same
concerns apply even if explicit withdraws are removed from
consideration.
</t>
</section>-->
<!-- <section title="Discussion of Safety of the Proposed Approach">
<t>
A commonly asked question is "how can it possibly be safe to
maintain the BGP session if an error is detected? Isn't it
impossible to rely on anything else found in the UPDATE, once
it's found to contain an error?"
</t>
<t>
A short form of the answer is that this document allows for the
session to be maintained only in certain circumscribed cases, and
that truly egregious malformation will almost inevitably lead to
a non-recoverable parse error.
</t>
<t>
To expand on this answer, we observe that most of the length
checks mandated in this document amount to semantic, not
syntactic, checking. As such, they cover cases where two
implementations are having what amounts to a polite disagreement
regarding how a given attribute should be formatted or used. Put
differently, when considering each attribute as a (Type, Length,
Value), if an unexpected TLV combination is seen, we take the
default of guessing that the value and not the length is bogus.
Further checks specified herein mitigate against the possibility
that this guess is wrong, for example that an implementation has
encoded a length field of 1 but has actually placed four octets in
the value portion. In such cases, a length field inconsistency
will often be detected - - this will always be the case for
"overruns" but not always for "underruns", as in the example
given. In the latter case, an attribute error will often be
found, except in the case that the data placed erroneously in the
attribute just happens to exactly match the format of a valid
path attribute. In an "overrun" case, a risk is created by
mandating that the Total Attribute Length field be relied upon to
locate the beginning of the NLRI field. This decision implicitly
assumes that it is the individual attribute length field that is
in error. If this assumption is wrong, and attribute data has been
encoded past the point indicated by the Total Attribute Length
field, then the likely outcome is either an NLRI syntax error
(if the inferred NLRI field size is non-zero), or a BGP Header
Error, either one of which will lead to a session reset.
</t>
<t>
It must be admitted however, that some residual increase in risk
remains, be it ever so small. The judgement of the authors (and
of the working group, in advancing this document) is that the
potential harm represented by this residual risk is outweighed by
the potential harm of continuing to follow the traditional
session reset approach.
</t>
</section>-->
</back>
</rfc>
| PAFTECH AB 2003-2026 | 2026-04-22 22:47:47 |