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.
Read postThis 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.
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.
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.
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.
dig +norecurse example.com ANY remains
available for inspecting the cache.+recurse to set it explicitly. mdig now also defaults to TCP
for ANY queries, as dig, host, and nslookup already do.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.
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.
What's New from ISC