mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[GH-ISSUE #2889] DNSSEC validation failure on legacy.research.icann.org #1081
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#1081
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @divergentdave on GitHub (Mar 27, 2025).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2889
I tried looking up
SOA legacy.research.icann.org.with a validating recursive resolver, and got a SERVFAIL response. This zone appears to be properly signed according to dnsviz. All the zone cuts are one label apart, and DNSKEY and DS records are using typical algorithms. I did notice that thelegacy.research.icann.org.zone only has one DNSKEY, rather than separate a separate KSK and ZSK. Otherwise, the zones look pretty bog-standard to me. I can getDS legacy.research.icann.org.andSOA research.icann.org.successfully. After some testing, it looks like this is a generic problem with DNSSEC validation this many labels deep. I suspect that the recursive call near the end offind_ds_records()may be part of the problem.@divergentdave commented on GitHub (Apr 15, 2025):
The
find_ds_records()function is used for two different purposes, to fetch a DS RRset in order to validate DNSKEY RRs, and to decide whether a response with no RRSIGs is insecure or just bogus.In the first situation, we already have some RRSIGs, which include a signer name. This ought to tell us where the zone cut is (though we should first check that the signer name is an ancestor of the RRSIG's owner name).
In the latter situation, we need to find one or more zone cuts, and get either an authenticated DS RRset or a proof of nonexistence of DS RRs (though we discard the DS RRset if we get one, as the callsite only makes use of the error). We do so by requesting the DS RRset of each successive ancestor name, using recursive calls.
If we split this function up, we could eliminate the recursion in the first case, which would make this easier to reason about. This might help with #2812 as well.
@divergentdave commented on GitHub (Apr 17, 2025):
I added some logging, and the initial error is due to a depth limit in
DnssecDnsHandle.Here's where the request depth gets incremented:
foo.bar.hickory-dns.testing. DNSKEYqueryfoo.bar.hickory-dns.testing. DSquerybar.hickory-dns.testing. DNSKEYbar.hickory-dns.testing. DShickory-dns.testing. DNSKEYhickory-dns.testing. DStesting. DNSKEYAfter this,
send()gets called again with the querytesting. DS, and the maximum depth check returns an error. The default maximum depth is 26.We can increase this default limit and/or reduce the number of places where we bump the depth counter. I think we only really need to increment the depth when making a request, as a safety measure to cap the number of outgoing requests. In other places, we can do a plain clone of the handle, or move it.