Hello,

this is a heads-up about a series of changes to how named handles
queries of type ANY and RRSIG.  One of them is already in the latest
releases, three has been merged for the next releases.

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 the normal DNS operation.

2. 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 covers.

3. 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 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 whether or not 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.

4. 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

- Check 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, either here or in our GitLab at
https://gitlab.isc.org/isc-projects/bind9.

Ondřej
--
Ondřej Surý (He/Him)
[email protected]

ADHD brain at work: I sometimes lose track of my inbox. Please feel free to 
send a gentle nudge if you're waiting on a reply!

My working hours and your working hours may be different. Please do not feel 
obligated to reply outside your normal working hours.

-- 
Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from 
this list.

Reply via email to