<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.39 (Ruby 3.4.9) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-sury-dnsop-tsig-clarify-00" category="std" consensus="true" submissionType="IETF" updates="RFC8945" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.34.0 -->
  <front>
    <title>Handling Verification Failures of TSIG-Signed DNS Messages</title>
    <seriesInfo name="Internet-Draft" value="draft-sury-dnsop-tsig-clarify-00"/>
    <author fullname="Ondrej Sury">
      <organization>ISC</organization>
      <address>
        <email>ondrej@isc.org</email>
      </address>
    </author>
    <author fullname="Joe Abley">
      <organization>Cloudflare</organization>
      <address>
        <email>jabley@cloudflare.com</email>
      </address>
    </author>
    <date year="2026" month="June" day="25"/>
    <area>Operations and Management</area>
    <workgroup>Domain Name System Operations</workgroup>
    <keyword>transaction signatures</keyword>
    <keyword>tsig</keyword>
    <keyword>dns</keyword>
    <abstract>
      <?line 41?>

<t>Transation Signatures (TSIG) provide a standard mechanism to sign
DNS messages, so that the authenticity of messages can be verified
by the system that receives them. This document updates the required
behaviour of a system that receives a signed message that fails
verification.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://ableyjoe.github.io/draft-sury-dnsop-tsig-clarify/draft-sury-dnsop-tsig-clarify.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-sury-dnsop-tsig-clarify/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Domain Name System Operations Working Group mailing list (<eref target="mailto:dnsop@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/dnsop/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/dnsop/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/ableyjoe/draft-sury-dnsop-tsig-clarify"/>.</t>
    </note>
  </front>
  <middle>
    <?line 49?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>Transaction Signatures are specified in <xref target="RFC8945"/> and provides
a mechanism for transaction-level authentication of DNS messages
using shared secrets and one-way hash functions. It can be used to
authenticate messages exchanged between DNS clients and servers,
e.g. in cases where message integrity and authorisation are important,
such as DNS Update <xref target="RFC2136"/> and the DNS Zone Transfer Protocol
<xref target="RFC5936"/>.</t>
    </section>
    <section anchor="terminology">
      <name>Terminology</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 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

<t>This document assumes familiarity with terminology specific to the
Domain Name System (DNS) as described in <xref target="RFC9499"/>.</t>
    </section>
    <section anchor="processing-of-signed-responses">
      <name>Processing of Signed Responses</name>
      <t>The processing of a signed response by a DNS client is described
in section 5.4 of <xref target="RFC8945"/>, which includes the following in the
case of signed messages that fail verification:</t>
      <ul empty="true">
        <li>
          <t>Regardless of the RCODE, a message containing a TSIG RR that is
unsigned as specified in Section 5.3.2 or that fails verification
<bcp14>SHOULD NOT</bcp14> be considered an acceptable response, as it may have
been spoofed or manipulated. Instead, the client <bcp14>SHOULD</bcp14> log an
error and continue to wait for a signed response until the request
times out.</t>
        </li>
      </ul>
      <t>There are basically two scenarios how such a message can be received
by client.  Either the server is misconfigured or the client is
under attack.</t>
      <t>If we assume that such a response has been sent by misconfigured server,
e.g. server that doesn't have the correct TSIG keys or isn't configured
to use TSIG keys to sign messages to this particular client then no amount
of waiting will allow the DNS communication to recover as the server will
never send a correct message back.</t>
      <t>If we assume that such a response is malicious, then the possible
attacks can be categorised as on-path or off-path.</t>
      <t>In the case of an off-path attack, the specified behaviour is not
ideal since it provides an increased window of opportunity for an
attacker that has correctly guessed parameters such as source port
and query id to continue sending responses with different signatures.
In the case of an on-path attack, there is even less value in waiting
for a valid response, since the attacker can be assumed to have
full control over what messages are and are not allowed to reach
the client, and once again waiting only provides the attacker with
more opportunity to conduct their attack.</t>
      <t>This document updates the specification in this case to clarify
that clients that receive responses that fit the description quoted
above <bcp14>SHOULD</bcp14> log an error and <bcp14>MUST</bcp14> treat the message as corrupt,
<bcp14>MUST</bcp14> discard it immediately and <bcp14>MUST NOT</bcp14> continue to wait.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>This document updates <xref target="RFC8945"/> and provides new guidance in
order to mitigate on-path and off-path attacks on signed DNS
responses.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC8945">
          <front>
            <title>Secret Key Transaction Authentication for DNS (TSIG)</title>
            <author fullname="F. Dupont" initials="F." surname="Dupont"/>
            <author fullname="S. Morris" initials="S." surname="Morris"/>
            <author fullname="P. Vixie" initials="P." surname="Vixie"/>
            <author fullname="D. Eastlake 3rd" initials="D." surname="Eastlake 3rd"/>
            <author fullname="O. Gudmundsson" initials="O." surname="Gudmundsson"/>
            <author fullname="B. Wellington" initials="B." surname="Wellington"/>
            <date month="November" year="2020"/>
            <abstract>
              <t>This document describes a protocol for transaction-level authentication using shared secrets and one-way hashing. It can be used to authenticate dynamic updates to a DNS zone as coming from an approved client or to authenticate responses as coming from an approved name server.</t>
              <t>No recommendation is made here for distributing the shared secrets; it is expected that a network administrator will statically configure name servers and clients using some out-of-band mechanism.</t>
              <t>This document obsoletes RFCs 2845 and 4635.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="93"/>
          <seriesInfo name="RFC" value="8945"/>
          <seriesInfo name="DOI" value="10.17487/RFC8945"/>
        </reference>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC9499">
          <front>
            <title>DNS Terminology</title>
            <author fullname="P. Hoffman" initials="P." surname="Hoffman"/>
            <author fullname="K. Fujiwara" initials="K." surname="Fujiwara"/>
            <date month="March" year="2024"/>
            <abstract>
              <t>The Domain Name System (DNS) is defined in literally dozens of different RFCs. The terminology used by implementers and developers of DNS protocols, and by operators of DNS systems, has changed in the decades since the DNS was first defined. This document gives current definitions for many of the terms used in the DNS in a single document.</t>
              <t>This document updates RFC 2308 by clarifying the definitions of "forwarder" and "QNAME". It obsoletes RFC 8499 by adding multiple terms and clarifications. Comprehensive lists of changed and new definitions can be found in Appendices A and B.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="219"/>
          <seriesInfo name="RFC" value="9499"/>
          <seriesInfo name="DOI" value="10.17487/RFC9499"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="RFC2136">
          <front>
            <title>Dynamic Updates in the Domain Name System (DNS UPDATE)</title>
            <author fullname="P. Vixie" initials="P." role="editor" surname="Vixie"/>
            <author fullname="S. Thomson" initials="S." surname="Thomson"/>
            <author fullname="Y. Rekhter" initials="Y." surname="Rekhter"/>
            <author fullname="J. Bound" initials="J." surname="Bound"/>
            <date month="April" year="1997"/>
            <abstract>
              <t>Using this specification of the UPDATE opcode, it is possible to add or delete RRs or RRsets from a specified zone. Prerequisites are specified separately from update operations, and can specify a dependency upon either the previous existence or nonexistence of an RRset, or the existence of a single RR. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="2136"/>
          <seriesInfo name="DOI" value="10.17487/RFC2136"/>
        </reference>
        <reference anchor="RFC5936">
          <front>
            <title>DNS Zone Transfer Protocol (AXFR)</title>
            <author fullname="E. Lewis" initials="E." surname="Lewis"/>
            <author fullname="A. Hoenes" initials="A." role="editor" surname="Hoenes"/>
            <date month="June" year="2010"/>
            <abstract>
              <t>The standard means within the Domain Name System protocol for maintaining coherence among a zone's authoritative name servers consists of three mechanisms. Authoritative Transfer (AXFR) is one of the mechanisms and is defined in RFC 1034 and RFC 1035.</t>
              <t>The definition of AXFR has proven insufficient in detail, thereby forcing implementations intended to be compliant to make assumptions, impeding interoperability. Yet today we have a satisfactory set of implementations that do interoperate. This document is a new definition of AXFR -- new in the sense that it records an accurate definition of an interoperable AXFR mechanism. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5936"/>
          <seriesInfo name="DOI" value="10.17487/RFC5936"/>
        </reference>
      </references>
    </references>
    <?line 137?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>TODO acknowledge.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA41YXXcbtxF9x6+Y0g9NekQqsuU24kltM5Icq8cSHVFOT9rT
B3AXJGHvAhsAS4b18X/Jb8kv6x1gv2jJbl7EXXzMDO7cuZjVeDwWQYdCTWn0
Spq80GZNPymnVzqTQVtDL6Uuaqc82RXdLa5+GC/02qicLm4WdK28l2vlR+KR
XC6d2sLK3fxiTmOaxXcdbYwEbKm1dfsp+ZALkdvMyBI+cydXYexrtx/nxttq
HLxej7NCIoD9+JtvhK+XpfYeRsK+woary7uXRI9IFt7CmTa5qhT+mDA6opHK
dbBOy4Jfrmbf48c6PN3evRwJU5dL5aYiRyxTkVnjlfG1n1JwtRII/YmQTklY
nVfKxcA9ARK6lgaHLNmH2Fn3fu1sXWHZhS2lNnSDk9Bi74Mqqd85Eu/VHqvz
qQAawUnjZRYBxQmNDAxpnMEr/+L4YqtMjdCI/qAHogTK6J+IihP3A+/jcWwr
MB4xfaFVWE2sW/OEdNkGE5sQKj89PuZ1PKS3atIuO+aB46WzO6+Oo4Vj3rnW
YVMvsVcuC7V/ZzH3peTxlgJI+zBw126dJGMTbb9s5Muzk00oi5GoK84o8nj7
8vzbs9OnQsg6bKxj4BEE0aouikS3ucmdekcL2IszOK00+r8RT3BrcR5HVULP
xsUvtM8YlfvG/mEVWI4DPWDqvLB1vkKYamjxXTz/i6ybnGS2FMJYV2LfFqkX
2qwGb+PxmOTSgz1ZEOIukihyaNFxiL7iovyaKme3OlckUWEgrXQ5lSrbICZf
UrCRdYJrtmxq9oi8pbCRAX+wDZCB4DrTYc+V3q6iTBpaKtpGSVC5WO7jep/Y
GPc7lSnE63minNDdRntChddcMdRkJ25y6pdaOzaiNnKrbe3YlXzYmIwhq7wN
JU2vACQXSi9QkwRT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