<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC '' 
  'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
]>

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no"?>
<?rfc strict="yes"?>
<?rfc compact="yes" ?> 
<?rfc subcompact="yes" ?>

<rfc category="bcp" ipr="trust200902" docName="draft-avoid-large-wildcard-records-00">

<front>
<title abbrev="">Avoid Large Records with a Wildcard Owner Name</title>

<author fullname="Peng Zuo" initials="P." surname="Zuo"> 
<organization>CNNIC</organization> 
<address> 
  <postal> 
    <street>No.4, Yard 9, Qiche Museum West Road, Fengtai District</street> 
    <code>100190</code> 
    <city>Beijing</city> 
    <country>China</country> 
  </postal> 
  <email>zuopeng@cnnic.cn</email> 
</address> 
</author>

<author fullname="Joe Abley" initials="J." surname="Abley"> 
<organization>Cloudflare</organization> 
<address> 
  <postal> 
    <city>Amsterdam</city> 
    <country>Netherlands</country> 
  </postal> 
  <email>jabley@cloudflare.com</email> 
</address> 
</author>

<author fullname="Zhiwei Yan" initials="Z." surname="Yan"> 
<organization>CNNIC</organization> 
<address> 
  <postal> 
    <street>No.4, Yard 9, Qiche Museum West Road, Fengtai District</street> 
    <code>100190</code> 
    <city>Beijing</city> 
    <country>China</country> 
  </postal> 
  <email>yanzhiwei@cnnic.cn</email> 
</address> 
</author>

<date month="January" year="2026"/> 
<area>Internet Area</area> 
<workgroup>DNS Operation Group</workgroup>

<abstract>
<t>
As DNS hosting becomes increasingly centralized, with multiple zones hosted on shared authoritative name servers, the risk of DNS amplification attacks has grown. By crafting large DNS records with wildcard owner names, attackers can exploit these shared servers to launch high-volume DDoS amplification attacks.
</t>
<t>
This document provides operational guidance for DNS hosting providers to mitigate DDoS risks arising from amplification of responses derived from wildcard owner names.
</t>
</abstract>
</front>

<middle>

<section title="Introduction">
<t>
The DNS system exhibits a small-query, large-response characteristic, which can lead to high amplification towards targeted victims. Both recursive and authoritative DNS servers can be abused as amplifiers. Previous work [RFC5358] recommends restricting recursive lookup services to intended clients to prevent unintended amplification. Additionally, [RFC8482] recommends returning minimal-sized responses for queries with QTYPE=ANY.
</t>

<t>
However, the risk of DNS amplification remains critical. The centralization of DNS hosting and the increasing number of open recursive resolvers worldwide have heightened the potential for DDoS amplification attacks. On one hand ，exploitation of a single hosted zone may affect all zones on the same name server.On the other hand, the large and globally distributed population of open resolvers provides attackers with an extensive amplification surface.
</t>

<t>
This document provides guidance for DNS hosting providers to mitigate DDoS risks arising from maliciously crafted DNS records.
</t>
</section>

<section title="Problem Description">
<t>
A DNS amplification attack typically requires the following conditions:
</t>

<ol spacing="compact">
  <li>Very large responses to DNS queries.</li>
  <li>Queries that consistently bypass recursive DNS caches.</li>
  <li>Low operational cost or effort for the attacker.</li>
</ol>

<t>
These conditions can be easily satisfied by configuring oversized DNS records such as large TXT records with wildcard owner names on shared DNS hosting platforms. An attacker can then issue small queries with randomized labels, discard the replies, and trigger excessive traffic between recursive resolvers and authoritative servers. Because wildcard expansion forces each random name to bypass resolver caches, the queries are repeatedly forwarded upstream to authoritative DNS servers. The attack is highly efficient because an originating stub resolver using UDP without EDNS(0) will trigger a truncated response from the open resolver, which prevents large authoritative answers from reaching the originating host. As a result, bandwidth consumption is confined to the path between open resolvers and authoritative servers. The lack of EDNS(0) also provides only a weak signal, making it difficult to develop effective mitigations based solely on this behavior.
</t>

<t>
The following illustrates a scenario where an attacker could exhaust the outbound capacity of a victim authoritative server:
</t>

<ol>
  <li>
    <t>Identify the authoritative name server for the victim domain.</t>
  </li>
  <li>
    <t>Register a domain controlled by the attacker on the same name server.</t>
  </li>
  <li>
    <t>Create oversized records with a wildcard owner name, such as TXT records.</t>
  </li>
  <li>
    <t>Identify open recursive resolvers by scanning the IP space.</t>
  </li>
  <li>
    <t>Use automated tools to send DNS queries for random subdomains (e.g., <tt>{random}.attack TXT</tt>) to open recursive resolvers.</t>
  </li>
  <li>
    <t>The outbound capacity from the authoritative server hosting the victim domain will be  exhausted.</t>
  </li>
</ol>

<t>
Attackers can also leverage compromised hosts, for example systems within a botnet that rely on their configured recursive resolvers, to initiate the attack. In this case, DNS queries can be triggered indirectly by other application protocols. Examples include a web advertisement that embeds a URL containing the target domain and a randomized sublabel, or a minor compromise of a popular web page that inserts an equivalent invisible reference. These mechanisms allow large volumes of queries to be generated without requiring direct control of the DNS client software.
</t>
</section>

<section title="Recommendations">
<t>
This section provides best practices for maintaining DNS data at reasonable sizes and reducing the risk that a shared authoritative server may be abused. Recommendations primarily target DNS hosting providers.
</t>

<t>
Operators should enforce size limits for large records, particularly those with wildcard owner names, and apply restrictive controls when records have very short TTLs. Thresholds should be determined based on the operational environment and risk tolerance.
</t>

<t>Recommended practices:</t>

<ol>
  <li>
    <t><strong>Apply size limits to records with wildcard owner names.</strong></t>
    <t>Enforce maximum size thresholds for DNS records defined under wildcard owner names to prevent amplification through oversized responses.</t>
  </li>
  <li>
    <t><strong>Apply size limits to records with very small TTLs.</strong></t>
    <t>Short TTL values increase cache-miss frequency, which amplifies the number of forwarded queries.</t>
  </li>
  <li>
    <t><strong>Monitor for abnormal traffic patterns.</strong></t>
    <t>Implement logging and real-time alerting to detect unusually high query volumes or other indicators of potential attack activity.</t>
  </li>
  <li>
    <t><strong>Rate-limit queries that generate large responses.</strong></t>
    <t>Apply per-source, per-prefix, or query-type-aware rate limiting to reduce amplification effects and prevent overload on authoritative servers.</t>
  </li>
  <li>
    <t><strong>Restrict and periodically review wildcard usage.</strong></t>
    <t>Require justification and periodic review for wildcard records with large RDATA to avoid unintended amplification exposure.</t>
  </li>
  <li>
    <t><strong>Test mitigation controls.</strong></t>
    <t>Regularly test monitoring, rate-limiting, and record-size enforcement mechanisms under realistic conditions, adjusting thresholds to maintain protection without disrupting legitimate traffic.</t>
  </li>
</ol>

<t>
These measures reduce the attack surface for DNS amplification attacks while enabling operators to balance availability and security for their users.
</t>
</section>

<section title="Implementation Experience">
<t>
Tests have shown that some DNS hosting providers allow users to configure oversized records with wildcard owner names. Responses exceeding the standard UDP packet size trigger TCP fallback, allowing responses up to approximately 64 KB, yielding amplification factors exceeding 1000x.
</t>

<t>
Observations from providers include:
</t>

<ol spacing="compact">
  <li>GoDaddy imposes no limit for jumbo TXT records.</li>
  <li>Cloudflare imposes a limit of 8192 bytes for jumbo TXT records.</li>
  <li>Microsoft DNS service imposes a limit of 4096 bytes.</li>
  <li>Alibaba Cloud and DNSPod set limits following disclosure of these risks.</li>
</ol>
</section>

</middle>

<back>

<references title="Normative References">
<?rfc include="reference.RFC.5358.xml" ?>
<?rfc include="reference.RFC.8482.xml" ?>
</references>	

<section anchor="app-bandwidth-impact"
         title="Appendix A: Bandwidth Impact Model"
         numbered="no">

  <t>
    This non-normative appendix provides an illustrative model of the aggregated bandwidth impact of large DNS responses in amplification scenarios.
  </t>

  <t>
    In large-scale amplification scenarios, total bandwidth impact grows proportionally with the number of attack sources and the average response size. To assist operators in evaluating practical effects of response size limits, a simplified model is provided.
  </t>

  <t>Let:</t>

  <ul spacing="compact">
    <li><em>N</em> = number of attack sources (or open resolvers exploited)</li>
    <li><em>q</em> = per-source query rate (queries per second)</li>
    <li><em>Q</em> = query packet size (bytes)</li>
    <li><em>S</em> = authoritative response size (bytes)</li>
    <li><em>R</em> = fraction of queries resulting in cache misses, generating upstream traffic</li>
  </ul>

<t>The total query rate is <em>N*q</em>.</t>

<t>Approximate bandwidth at different points in the resolution path:</t>

<ul spacing="compact">
  <li>Attacker upstream bandwidth: <em>N*q*Q</em> bytes/s</li>
  <li>Authoritative server outbound bandwidth: <em>N*q*R*S</em> bytes/s</li>
  <li>Resolver total bandwidth (receive + send): <em>(N*q*Q + N*q*Q*R + N*q*R*S)</em> bytes/s</li>
</ul>


  <t>
    These relationships are linear in <em>S</em>, illustrating that reducing response size proportionally reduces bandwidth requirements for all participants. This model ignores retransmissions, protocol overhead, and TCP fallback.
  </t>

  <t>For illustration, consider two nominal attack-source distributions:</t>

  <table anchor="attack-parameters" title="Attack Source Distributions">
    <thead>
      <tr>
        <th>Parameter</th>
        <th>Case A</th>
        <th>Case B</th>
      </tr>
    </thead>
    <tbody>
      <tr><td>Number of sources (N)</td><td>1,000</td><td>50,000</td></tr>
      <tr><td>Query rate per source (q)</td><td>1 qps</td><td>1 qps</td></tr>
      <tr><td>Query size (Q)</td><td>60 bytes</td><td>60 bytes</td></tr>
      <tr><td>Cache miss ratio (R)</td><td>1.0</td><td>0.8</td></tr>
    </tbody>
  </table>

  <t>Approximate aggregate bandwidths at different response size caps:</t>

  <table anchor="bandwidth-impact" title="Aggregated Bandwidth at Different Response Size Threshold">
    <thead>
      <tr>
        <th>Response Size (bytes)</th>
        <th>Attacker Upstream (Case A / Case B)</th>
        <th>Authoritative Outbound (Case A / Case B)</th>
        <th>Resolver Total (Case A / Case B)</th>
      </tr>
    </thead>
    <tbody>
      <tr><td>65,535</td><td>0.480 Mbps / 24.0 Mbps</td><td>524.3 Mbps / 21.0 Gbps</td><td>525.2 Mbps / 21.1 Gbps</td></tr>
      <tr><td>8,192</td><td>0.480 Mbps / 24.0 Mbps</td><td>65.5 Mbps / 2.62 Gbps</td><td>66.5 Mbps / 2.66 Gbps</td></tr>
      <tr><td>4,096</td><td>0.480 Mbps / 24.0 Mbps</td><td>32.8 Mbps / 1.3 Gbps</td><td>33.7 Mbps / 1.35 Gbps</td></tr>
      <tr><td>1,024</td><td>0.480 Mbps / 24.0 Mbps</td><td>8.2 Mbps / 0.32 Gbps</td><td>9.1 Mbps / 0.37 Gbps</td></tr>
      <tr><td>512</td><td>0.480 Mbps / 24.0 Mbps</td><td>4.1 Mbps / 0.16 Gbps</td><td>5.1 Mbps / 0.21 Gbps</td></tr>
    </tbody>
  </table>

</section>

</back>
</rfc>
