mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 19:25:56 +03:00
[GH-ISSUE #3089] hickory-resolver ignores validate = true if DNSSEC feature is not enabled #1130
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#1130
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 @cr-tk on GitHub (Jun 26, 2025).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/3089
Describe the bug
The resolver library falls back to
validate = falsebehavior if the__dnssecfeature isn't active, for example if the thednssec-ringfeature is accidentally not specified. This can be problematic for programs relying on the DNSSEC security properties.I think the relevant code here issues
tracing::warn!("validate option is only available with dnssec features");, but this is still effectively a silent fallback to insecure behavior from the perspective of (most?) users. During brief testing, I couldn't get the warning to print in example code, even withRUST_LOG=traceand similar environment variables.To Reproduce
Example program:
Expected behavior
Triggering clear errors at build- or runtime which notify about the attempted use of a security feature that's unavailable, potentially aborting the program or build due to misconfiguration.
System:
Version:
Crate:
hickory-resolverVersion:
0.25.2Additional context
While the
README.mdhas a section on how to turn on DNSSEC, theResolverOptscode documentation doesn't mention any special crate requirements and suggests this functionality is available immediately:This could be improved as well.
@djc commented on GitHub (Jun 26, 2025):
Fair point. See #3091.
@cr-tk commented on GitHub (Jun 27, 2025):
I tested this against the newest commit
82c85dcfdb, and agree that your change fixes the behavior 👍Instead of compiling and then throwing warnings during runtime that (sometimes?) don't reach the user, the Rust compiler will now abort compilation of any code that uses the
validatefield without having the required feature enabled:I think that's a much safer construction. Thanks for patching!