mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #2626] NSEC3: Limit number of iterations #1029
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#1029
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 (Nov 28, 2024).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2626
There should be a limit on the number of iterations that Hickory DNS will accept in an NSEC3 record. This should probably be configurable. RFC 5155 section 10.3 suggests some upper limits, depending on the key size. It says that if the signature over the NSEC3 record is correct, and the iteration count is too high, resolvers may treat responses as insecure, skipping the iterated hash computation. RFC 9276 makes the case that iteration counts greater than zero do not meaningfully improve the ability to obfuscate domains, while they increase the impact of DoS attacks against CPU. Therefore, it recommends treating validly-signed NSEC3 records as insecure at a lower iteration count limit. It also recommends an additional iteration count threshold at which the resolver starts returning
SERVFAILresponses.Relatedly,
Nsec3HashAlgorithm::hash()is implemented recursively, which means DoS attacks using high iteration counts could try to exhaust stack memory.@marcus0x62 commented on GitHub (Nov 28, 2024):
I have a patch for this that is mostly complete. I'll clean it up over the next week and get it ready for review.
@djc commented on GitHub (Jan 16, 2025):
Would be nice if you can still get to this!
@bluejekyll commented on GitHub (Mar 2, 2025):
Is this still open?
@divergentdave commented on GitHub (Mar 2, 2025):
We have changed
Nsec3HashAlgorithm::hash()from a recursive function to a loop, which avoids blowing the stack, but we haven't put in an upper limit on iterations yet.@divergentdave commented on GitHub (May 20, 2025):
Fixed in #2899