mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[PR #3175] [MERGED] Fix NSEC validation #3611
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#3611
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?
📋 Pull Request Information
Original PR: https://github.com/hickory-dns/hickory-dns/pull/3175
Author: @divergentdave
Created: 8/1/2025
Status: ✅ Merged
Merged: 8/15/2025
Merged by: @divergentdave
Base:
main← Head:david/nsec-validation📝 Commits (7)
4c76c7dRemove verify_nsec() from public APId996290Rewrite verify_nsec()adde14aSimplify NSEC3 validation with Name::prepend_label51b463eCheck response code6671b7aExtract closure for handling NSEC record match094d0adChange proof_log_yield() to take the whole queryec1a0edAdd wrappers around proof_log_yield()📊 Changes
6 files changed (+212 additions, -205 deletions)
View changed files
📝
bin/tests/integration/authority_battery/dnssec.rs(+41 -65)📝
conformance/packages/conformance-tests/src/resolver/dnssec/scenarios/bogus.rs(+0 -1)📝
conformance/packages/conformance-tests/src/resolver/nsec.rs(+0 -2)📝
crates/proto/src/dnssec/dnssec_dns_handle/mod.rs(+126 -62)📝
crates/proto/src/dnssec/dnssec_dns_handle/nsec3_validation.rs(+45 -73)📝
crates/proto/src/dnssec/mod.rs(+0 -2)📄 Description
This closes #3143. I rewrote
verify_nsec()to address the problems identified in that issue. I also made the function private, and rewrote an integration test that was depending on it.The general flow of this function is now to check for an exact match, check for a covering record, identify the next closest enclosing name from the ancestors of the names in the covering NSEC record, and finally check for any NSEC record matching or covering the wildcard name below that next closest enclosing name. There isn't any verification algorithm suggested in RFC 4035, but my thinking is that this will identify where the RFC 1034 algorithm would have failed to find a name and checked for a wildcard. Code paths that return
Proof::Secureare now properly guarded by checks of record types, when dealing with a direct match (including CNAME), and checks for appropriate response codes.This fixes three conformance tests, added in #3172 and #3147.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.