<?xml version="1.0" encoding="UTF-8"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
    which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">

<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     docName="draft-ietf-lsr-isis-invalid-tlv-03" number="0000"
     ipr="trust200902" updates="5305 6232" obsoletes="" submissionType="IETF"
     category="std" consensus="true" xml:lang="en" tocInclude="true"
     tocDepth="4" symRefs="true" sortRefs="true" version="3"> 

  <!-- xml2rfc v2v3 conversion 2.47.0 -->
  <front>
    <title abbrev="draft-ietf-lsr-isis-invalid-tlv">Invalid TLV Handling in
    IS-IS</title>
    <seriesInfo name="RFC" value="0000"/>
    <author fullname="Les Ginsberg" initials="L." surname="Ginsberg">
      <organization>Cisco Systems</organization>
      <address>
        <email>ginsberg@cisco.com</email>
      </address>
    </author>
    <author fullname="Paul Wells" initials="P." surname="Wells">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street/>
          <city/>
          <region/>
          <code/>
          <country/>
        </postal>
        <phone/>
        <email>pauwells@cisco.com</email>
        <uri/>
      </address>
    </author>
    <author fullname="Tony Li" initials="T" surname="Li">
      <organization>Arista Networks</organization>
      <address>
        <postal>
          <street>5453 Great America Parkway</street>
          <city>Santa Clara</city>
          <region>California</region>
          <code>95054</code>
          <country>USA</country>
        </postal>
        <phone/>
        <email>tony.li@tony.li</email>
        <uri/>
      </address>
    </author>
    <author fullname="Tony Przygienda" initials="T" surname="Przygienda">
      <organization>Juniper Networks, Inc.</organization>
      <address>
        <postal>
          <street>1194 N. Matilda Ave</street>
          <city>Sunnyvale</city>
          <region>California</region>
          <code>94089</code>
          <country>USA</country>
        </postal>
        <phone/>
        <email>prz@juniper.net</email>
        <uri/>
      </address>
    </author>
    <author fullname="Shraddha Hegde" initials="S" surname="Hegde">
      <organization>Juniper Networks, Inc.</organization>
      <address>
        <postal>
          <street>Embassy Business Park</street>
          <city>Bangalore</city>
          <region>KA</region>
          <code>560093</code>
          <country>India</country>
        </postal>
        <phone/>
        <email>shraddha@juniper.net</email>
        <uri/>
      </address>
    </author>
    <date year="2020" month="August"/>
    <area>Routing</area>
    <workgroup>LSR Working Group</workgroup>
    <keyword>TLV</keyword>
    <keyword>IS-IS</keyword>
    <abstract>
      <t>Key to the extensibility of the Intermediate System to Intermediate
      System (IS-IS) protocol has been the handling of unsupported and/or
      invalid Type/Length/Value (TLV) tuples. Although there are explicit
      statements in existing specifications, deployment experience has shown
      that there are inconsistencies in the behavior when a TLV which is
      disallowed in a particular Protocol Data Unit (PDU) is received.</t>
      <t>This document discusses such cases and makes the correct behavior
      explicit in order to ensure that interoperability is maximized.</t>
      <t>This document updates RFC5305 and RFC6232.</t>
    </abstract>
    <note>
      <name>Requirements Language</name>
        <t>
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
    "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL 
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
    "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", 
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are
    to be interpreted as 
    described in BCP&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
    </note>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
      <t>The Intermediate System to Intermediate System (IS-IS) protocol <xref
      target="ISO10589" format="default"/> utilizes Type/Length/Value (TLV)
      encoding for all content in the body of Protocol Data Units (PDUs). New
      extensions to the protocol are supported by defining new TLVs. In order
      to allow protocol extensions to be deployed in a backwards compatible
      way an implementation is required to ignore TLVs that it does not
      understand. This behavior is also applied to sub-TLVs <xref
      target="RFC5305" format="default"/>, which are contained within
      TLVs.</t> 
      <t>Also essential to the correct operation of the protocol is having the
      validation of PDUs be independent from the validation of the TLVs
      contained in the PDU. PDUs which are valid must be accepted <xref
      target="ISO10589" format="default"/> even if an individual TLV contained
      within that PDU is not understood or is invalid in some way (e.g.,
      incorrect syntax, data value out of range, etc.).</t> 
      <t>The set of TLVs (and sub-TLVs) which are allowed in each PDU type is
      documented in the TLV Codepoints Registry established by <xref
      target="RFC3563" format="default"/> and updated by <xref
      target="RFC6233" format="default"/> and <xref target="RFC7356"
      format="default"/>.</t> 
      <t>This document is intended to clarify some aspects of existing
      specifications and thereby reduce the occurrence of non-conformant
      behavior seen in real world deployments. Although behaviors specified in
      existing protocol specifications are not changed, the clarifications
      contained in this document serve as updates to <xref target="RFC5305"/>
      (see Section <xref target="RFC5305" section="3.3"
      sectionFormat="bare"/>) and <xref target="RFC6232" format="default"/>
      (see Section <xref target="RFC6232" section="3.4"
      sectionFormat="bare"/>).</t> 
    </section>
    <section numbered="true" toc="default">
      <name>TLV Codepoints Registry</name>
      <t><xref target="RFC3563" format="default"/> established the
      IANA-managed IS-IS TLV Codepoints Registry for recording assigned TLV
      code points <xref target="TLV_CODEPOINTS" format="default"/>. The
      initial contents of this registry were based on <xref target="RFC3359"
      format="default"/>.</t>  
      <t>The registry includes a set of columns indicating in which PDU types
      a given TLV is allowed:</t>
      <dl newline="false" spacing="normal" indent="6">
      <dt>IIH - </dt>
      <dd>TLV is allowed in Intermediate System to Intermediate System
      Hello (IIH) PDUs (Point-to-point and LAN)</dd>
      <dt>LSP - </dt>
      <dd>TLV is allowed in Link State PDUs (LSP)</dd>
      <dt>SNP - </dt>
      <dd>TLV is allowed in Sequence Number PDUs (SNP) (Partial Sequence
      Number PDUs (PSNP) and Complete Sequence Number PDUS (CSNP))</dd>
      <dt>Purge - </dt>
      <dd>TLV is allowed in LSP Purges <xref target="RFC6233"
      format="default"/></dd>
      </dl>
      <t>If "Y" is entered in a column it means the TLV is allowed in the
      corresponding PDU type.</t>
      <t>If "N" is entered in a column it means the TLV is not allowed in the
      corresponding PDU type.</t>
    </section>
    <section anchor="TLV-Acceptance" numbered="true" toc="default">
      <name>TLV Acceptance in PDUs</name>
      <t>This section describes the correct behavior when a PDU is received
      which contains a TLV which is specified as disallowed in the TLV
      Codepoints Registry.</t>
      <section numbered="true" toc="default">
        <name>Handling of Disallowed TLVs in Received PDUs other than LSP
	Purges</name> 
        <t><xref target="ISO10589" format="default"/> defines the behavior
	required when a PDU is received containing a TLV which is "not
	recognised". It states (see Sections 9.5 - 9.13):</t> 
<blockquote>
  "Any codes in a received PDU that are not recognised shall be ignored."
</blockquote>
        <t>This is the model to be followed when a TLV is received which is
        disallowed. Therefore TLVs in a PDU (other than LSP purges) which are
        disallowed <bcp14>MUST</bcp14> be ignored and <bcp14>MUST NOT</bcp14>
	cause the PDU itself to be rejected by the receiving IS.</t> 
      </section>
      <section numbered="true" toc="default">
        <name>Special Handling of  Disallowed TLVs in Received LSP Purges</name>
        <t>When purging LSPs, <xref target="ISO10589" format="default"/>
	recommends (but does not require) the body of the LSP (i.e., all TLVs)
	be removed before generating the purge. LSP purges which have TLVs in
	the body are accepted though any TLVs which are present are
	ignored.</t> 
        <t>When cryptographic authentication <xref target="RFC5304"
	format="default"/> was introduced, this looseness when processing
	received purges had to be addressed in order to prevent attackers from
	being able to initiate a purge without having access to the
	authentication key. <xref target="RFC5304" format="default"/>
	therefore imposed strict requirements on what TLVs were allowed in a
	purge (authentication only) and specified that:</t> 
<blockquote>
  "ISes <bcp14>MUST NOT</bcp14> accept purges that contain TLVs other than the
  authentication TLV". 
</blockquote>
        <t>This behavior was extended by <xref target="RFC6232"
	format="default"/> which introduced the Purge Originator
	Identification (POI) TLV and <xref target="RFC6233" format="default"/>
	which added the "Purge" column to the TLV Codepoints registry to
	identify all the TLVs which are allowed in purges.</t> 
        <t>The behavior specified in <xref target="RFC5304" format="default"/>
	is not backwards compatible with the behavior defined by <xref
	target="ISO10589" format="default"/> and therefore can only be safely
	enabled when all nodes support cryptographic
	authentication. Similarly, the extensions defined by <xref
	target="RFC6232" format="default"/> are not compatible with the
	behavior defined in <xref target="RFC5304" format="default"/>,
	therefore can only be safely enabled when all nodes support the
	extensions.</t> 
        <t>When new protocol behaviors are specified that are not backwards
	compatible, it is <bcp14>RECOMMENDED</bcp14> that implementations
	provide controls for their enablement. This serves to prevent
	interoperability issues and allow for non-disruptive introduction of
	the new functionality into an existing network.</t> 
      </section>
      <section numbered="true" toc="default">
        <name>Applicability to sub-TLVs</name>
        <t><xref target="RFC5305" format="default"/> introduced sub-TLVs,
	which are TLV tuples advertised within the body of a parent
	TLV. Registries associated with sub-TLVs are associated with the TLV
	Codepoints Registry and specify in which TLVs a given sub-TLV is
	allowed. <xref target="RFC5305" sectionFormat="of" section="2"/> is
	updated by the following sentence:</t> 
<blockquote>
  "As with TLVs, it is required that sub-TLVs which are disallowed
  <bcp14>MUST</bcp14> be ignored on receipt.". 
</blockquote>
        <t>The existing sentence in <xref target="RFC5305"
	sectionFormat="of" section="2"/> :</t>
<blockquote>
  "Unknown sub-TLVs are to be ignored and skipped upon receipt."
</blockquote>
        <t>is replaced by:</t>
<blockquote>
  "Unknown sub-TLVs <bcp14>MUST</bcp14> be ignored and skipped upon receipt."
</blockquote>
      </section>
      <section numbered="true" toc="default">
        <name>Correction to POI TLV Registry Entry</name>
        <t>An error was introduced by <xref target="RFC6232"
	format="default"/> when specifying in which PDUs the POI TLV is
	allowed. <xref target="RFC6232" sectionFormat="of" section="3"/>
	stated:</t> 
<blockquote>
  "The POI TLV <bcp14>SHOULD</bcp14> be found in all purges and <bcp14>MUST
  NOT</bcp14> be found in LSPs with a non-zero Remaining Lifetime."
</blockquote>
        <t>However, the IANA section of the same document stated:</t>
<blockquote>
  "The additional values for this TLV should be IIH:n, LSP:y, SNP:n, and
  Purge:y."
</blockquote>
        <t>The correct setting for "LSP" is "n". This document updates <xref
	target="RFC6232" format="default"/> by correcting that error.</t> 
        <t>This document also updates the previously quoted text from <xref
	target="RFC6232" sectionFormat="of" section="3"/> to be:</t> 
<blockquote>
  "The POI TLV <bcp14>SHOULD</bcp14> be sent in all purges and <bcp14>MUST
  NOT</bcp14> be sent in LSPs with a non-zero Remaining Lifetime." 
</blockquote>
      </section>
    </section>
    <section anchor="LSP_ACCEPTANCE" numbered="true" toc="default">
      <name>TLV Validation and LSP Acceptance</name>
      <t>The correct format of a TLV and its associated sub-TLVs, if
      applicable, are defined in the document(s) which introduce each
      codepoint. The definition <bcp14>MUST</bcp14> include what action to
      take when the format/content of the TLV does not conform to the
      specification (e.g., "<bcp14>MUST</bcp14> be ignored on receipt"). When
      making use of the information encoded in a given TLV (or sub-TLV)
      receiving nodes <bcp14>MUST</bcp14> verify that the TLV conforms to the
      standard definition. This includes cases where the length of a
      TLV/sub-TLV is incorrect and/or cases where the value field does not
      conform to the defined restrictions.</t> 
      <t>However, the unit of flooding for the IS-IS Update process is an
      LSP. The presence of a TLV (or sub-TLV) with content which does not
      conform to the relevant specification <bcp14>MUST NOT</bcp14> cause the
      LSP itself to be rejected. Failure to follow this requirement will
      result in inconsistent LSP Databases on different nodes in the network
      which will compromise the correct operation of the protocol.</t> 
      <t>LSP Acceptance rules are specified in <xref target="ISO10589"
      format="default"/> . Acceptance rules for LSP purges are extended by
      <xref target="RFC5304" format="default"/> <xref target="RFC5310"
      format="default"> and </xref> and are further extended by <xref
      target="RFC6233" format="default"/>.</t> 
      <t><xref target="ISO10589" format="default"/> also specifies the
      behavior when an LSP is not accepted. This behavior is NOT altered by
      extensions to the LSP Acceptance rules i.e., regardless of the reason
      for the rejection of an LSP the Update process on the receiving router
      takes the same action.</t> 
    </section>
    <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>IANA is requested to add this document as a reference for the TLV
      Codepoints Registry.</t>
      <t>IANA is also requested to modify the entry for the Purge Originator
      Identification TLV in the TLV Codepoints Registry to be:</t>
      <t>IIH:n, LSP:n, SNP:n, and Purge:y.</t>
      <t>The reference field should be updated to point to this document.</t>
    </section>
    <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>As this document makes no changes to the protocol there are no new
      security issues introduced.</t>
      <t>The clarifications discussed in this document are intended to make it
      less likely that implementations will incorrectly process received LSPs,
      thereby also making it less likely that a bad actor could exploit a
      faulty implementation.</t>
      <t>Security concerns for IS-IS are discussed in <xref target="ISO10589"
      format="default"/>, <xref target="RFC5304" format="default"/>, and <xref
      target="RFC5310" format="default"/>.</t> 
    </section>
    <section anchor="Acknowledgements" numbered="true" toc="default">
      <name>Acknowledgements</name>
      <t>The authors would like to thank <contact fullname="Alvaro
      Retana"/>.</t> 
      <!---->
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>

<!-- [rfced] [ISO10589] URL https://www.iso.org/standard/30932.html -->

        <reference anchor="ISO10589">
          <front>
            <title>Intermediate system to Intermediate system intra-domain
          routeing information exchange protocol for use in conjunction with
          the protocol for providing the connectionless-mode Network Service
          (ISO 8473)</title>
            <seriesInfo name="ISO/IEC" value="10589:2002, Second Edition"/>
            <author>
              <organization abbrev="ISO">International Organization for
            Standardization</organization>
            </author>
            <date month="Nov" year="2002"/>
          </front>
        </reference>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3563.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5304.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5305.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5310.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6232.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6233.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>

<!-- [rfced] [TLV_CODEPOINTS] The URL below is correct -->

        <reference anchor="TLV_CODEPOINTS">
          <front>
            <title>IS-IS TLV Codepoints web page
          (https://www.iana.org/assignments/isis-tlv-codepoints/isis-tlv-codepoints.xhtml)</title>
            <author>
              <organization>IANA</organization>
            </author>
            <date/>
          </front>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3359.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7356.xml"/>
      </references>
    </references>
  </back>
</rfc>
