mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[GH-ISSUE #2882] Insufficient validation of wildcard expanded positive responses #1077
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#1077
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 24, 2025).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2882
Describe the bug
When a response is received that is the result of wildcard expansion, no validation is performed on accompanying NSEC or NSEC3 records that verify the non-existence of a closer match for the query.
To Reproduce
I identified this while working on the
invalid_nsec3_tests::wildcard_expansionintegration test.Expected behavior
Section 5.3.4 of RFC 4035 says that the non-existence of matching records or wildcard records with a closer match must be verified. Similarly, Section 7.2.6 of RFC 5155 has requirements for wildcard answer responses when using NSEC3.
Version:
Crate: hickory-proto
Version: main
Additional context
There is an early return at the top of
check_nsec()that returnsOk(...)if the answer section is non-empty. For starters, we will need to get rid of this. It might make sense to do positive and negative validation on an RRset-by-RRset basis, rather than separating out the positive response validation and NSEC/NSEC3 validation.@cpu commented on GitHub (Dec 2, 2025):
I think this was handled by https://github.com/hickory-dns/hickory-dns/pull/3349 ? Please reopen with details on what's left to do if I'm mistaken!