Upcoming changes to ANY and RRSIG query processing in BIND 9

This is a heads-up about a series of changes to how named handles queries of type ANY and RRSIG. The first of these is already in the latest stable release; the third item below has been merged and will appear in an upcoming release.

These changes will greatly decrease the attack surface in BIND 9.

  1. minimal-any is honored over TCP (released in 9.20.31)

With minimal-any enabled, which is the default, named used to minimize ANY responses over UDP only and returned every RRset at the name over TCP. It now returns a single RRset, with its covering RRSIGs when DNSSEC is requested, and omits unnecessary authority and additional data regardless of the transport.

If you really need the full set of records at a name from your own authoritative server, set minimal-any no;, but generally, this should be never needed for normal DNS operation.

  1. Standalone RRSIG queries are answered with FORMERR (merged into stable release)

A query for type RRSIG alone is now rejected with FORMERR by both authoritative servers and resolvers. Signatures are still returned together with the records they cover when the query has the DO bit set, so dig +dnssec example.com SOA keeps working as before. The resolver and delv no longer send RRSIG queries upstream.

The direct RRSIG queries never had any meaning in DNS, and could not be cached because they could only be validated when coupled with the records that the RRSIG signature covered.

  1. Recursive ANY queries are refused (planned for January stable release)

A resolver cannot answer an ANY query without either sending ANY upstream or answering with whatever happens to be in the cache at that moment. named will now do neither: an ANY query that asks for recursion and cannot be answered from authoritative data is answered with REFUSED and, when EDNS is in use, Extended DNS Error 21 (Not Supported). This happens regardless of whether anything is cached for the name.

What does not change

  • ANY queries answered from authoritative zones.
  • ANY queries without the RD bit. These still return what the cache holds for the name, so dig +norecurse example.com ANY remains available for inspecting the cache.

What else changes

  • Mirror zones are served non-authoritatively, so a recursive ANY query for a name in a mirror zone is refused as well.
  • Response policy zones are not consulted for refused ANY queries.
  • The resolver never sends ANY or any other meta type upstream.
  • delv refuses to look up type ANY.
  • dig and mdig no longer set the RD bit on ANY queries by default; use +recurse to set it explicitly. mdig now also defaults to TCP for ANY queries, as dig, host, and nslookup already do.
  1. ANY queries over UDP get a truncated response (planned for January stable release)

An ANY response is the largest response a name can produce, which makes ANY over UDP attractive for reflection and amplification attacks. named will answer an ANY query received over UDP with an empty response with the TC bit set, as RFC 8482 section 4.4 allows, which makes a legitimate client retry over TCP. The one exception is a query carrying a valid DNS server cookie, which proves the client address was not spoofed; such a query is answered over UDP as before.

This applies to authoritative and recursive service alike. dig, host, and nslookup already use TCP for ANY queries by default.

What you may need to do

  • Examine monitoring and health checks that send ANY or RRSIG queries and switch them to a concrete type such as SOA or NS.
  • If you forward to a BIND 9 resolver from other software that still sends ANY queries, expect REFUSED instead of a partial answer.
  • If you query for ANY over UDP from a client that does not retry over TCP on truncation, it will stop getting answers.

Feedback is welcome in our GitLab at https://gitlab.isc.org/isc-projects/bind9.

This plan is a departure from our usual policy for deprecating features; normally we would not make a change like this in the middle of a stable branch. However, we are not aware of any valid DNS use cases for ANY queries, and they are easily abused for resource exhaustion and other attack vectors.

Recent Posts

What's New from ISC