mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[GH-ISSUE #120] SIG(0) signature should include SIG's RDATA in hash #59
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#59
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 @jannic on GitHub (Apr 24, 2017).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/120
According to RFC2931, the hash for the signature should be calculated over
data = RDATA | request - SIG(0)where "RDATA is the RDATA of the SIG(0) being calculated less the signature itself".
When signing DNS requests, AFAICT, trust_dns currently calculates the hash over
request - SIG(0), only.In
fn hash_rrset, used to sign signatures over record sets, there is a call tosig::emit_pre_sigto include the SIG(0) RDATA.But in
fn hash_messages, such code is missing.@bluejekyll commented on GitHub (Apr 24, 2017):
Thanks for the report. I use the presig in RRSIG creation for DNSSec. I've validated that in real world systems. The SIG0 calculation has always annoyed me, and I haven't had real world systems to validate it. Thank you for this report!
Anyway, for various reasons, most of the code for SIG0 creation is in Message::sign(). That is where this should probably be fixed. The SIG0 rdata creation will need to be reordered to allow for this.
@jannic commented on GitHub (Apr 24, 2017):
Yes, I came up with:
... and then forwarding
pre_sig0tofn hash_messagewhere it's needed to calculate the hash.Unfortunately, it still doesn't work (still getting
request has invalid signature: RRSIG failed to verify (BADSIG)from bind)@bluejekyll commented on GitHub (May 7, 2017):
fixed in #122 and #119