Repository navigation
Dnssec any valid rrsig - #160
Merged
Merged
Conversation
Since 2026-10-11, the root zone's DNSKEY RRset is signed with KSK-2024 (key tag 38696), and no longer with KSK-2017 (key tag 20326). However, KSK-2017 was the only root zone SEP known to DnssecClient. A validator that only knows KSK-2017 as trust anchor is unable to verify the root zone's DNSKEY RRset. DnssecClient now knows both KSK-2017 and KSK-2024 as SEPs of the root zone, as published by IANA in root-anchors.xml. In order to allow multiple SEPs per domain name, addSecureEntryPoint() now adds the key to the SEPs of the domain name, instead of replacing them, and a DNSKEY is accepted if it matches any of them.
DnssecClient required every RRSIG of an RRset to be valid. Hence an RRset that additionally carried an RRSIG that can not be verified, for example, one made with a key that is not (yet or anymore) in the DNSKEY RRset during a key rollover, was considered bogus, and an RRSIG made with an unknown key even caused a DnssecValidationFailedException. DnssecClient now groups the RRSIGs by the RRset they cover and considers the RRset as verified if at least one of its RRSIGs is valid (RFC 4035 § 5.3.3, RFC 6840 § 5.11). Only if none of the RRSIGs is valid, the reasons are reported, or the exception is thrown. Furthermore, RRSIGs made with a key from a zone that is not the zone of the RRset, or one of its parents, are no longer verified, as they can not verify the RRset. Since key tags are not unique (RFC 4034 § 5.3.1), DnssecClient now also tries every DNSKEY with a matching key tag, instead of only the first one.
When verifying a DNSKEY RRset, DnssecClient checked whether the RRset carried a valid self-signature and, independently, whether any DNSKEY of the RRset is a secure entry point (SEP), e.g., referred to by a DS RR of the parent zone. However, the SEP was not required to be the key that signed the RRset. Hence a DNSKEY RRset that contained the SEP, but that was only signed by another key without a chain of trust, was considered as verified. DnssecClient now remembers the DNSKEYs that validly sign the DNSKEY RRset and only considers those as SEP candidates.
When verifying a secure entry point (SEP), DnssecClient only used the first DS (or DLV) RR whose key tag matched the one of the SEP. Hence the SEP was not verified if this DS RR used an unsupported digest type, even if another DS RR for the SEP used a supported one. And if the DS RR belonged to a different key with the same key tag, then DnssecClient threw a DigestComparisonFailedException. DnssecClient now considers the SEP as verified if at least one of the DS RRs that refer to it verifies it. A DS RR refers to a SEP if its key tag and its algorithm match the ones of the SEP (RFC 4035 § 5.2), previously the algorithm was not compared. Furthermore, DS RRs with the SHA-1 digest type are ignored if there is a DS RR for the SEP with a supported stronger digest type (RFC 4509 § 3), so that an attacker is not able to downgrade the digest type to SHA-1.
Coverage Report for CI Build 39382634248Coverage increased (+0.5%) to 63.664%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions35 previously-covered lines in 2 files lost coverage.
Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.