mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[GH-ISSUE #3143] Incorrect NSEC validation #1140
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#1140
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 (Jul 22, 2025).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/3143
I found through differential testing that Hickory DNS is not validating NSEC records correctly. In particular, validation of a wildcard no data response is wrong. I found a lot of issues when reading through
verify_nsec():wildcardvariable is not a wildcard name, but either the query name's parent or the zone name (from the SOA record). Thus, later NSEC record coverage checks using this variable produce a misleading result when validating the response I was looking at, because there were only NSEC records covering the query name and the wildcard name, not the zone name.wildcard == *query.name()special case should likewise be eliminated.verify_nsec_coverageclosure is actually checking whether a name is either covered by an NSEC record or matches an NSEC record. We should check these conditions separately.verify_nsec3(),verify_nsec()does not look at the response code. We should validate this against the presence of matching or covering NSEC records (again, considering both the query name and possible wildcard names).