Skip to content

fix(dnssec): omit RRSIG signers that are not a parent of the qname - #80

Merged
diggyen merged 1 commit into
mainfrom
fix/dnssec-out-of-bailiwick-signer
Oct 30, 2026
Merged

diggyen merged 1 commit into
mainfrom
fix/dnssec-out-of-bailiwick-signer

Conversation

@diggyen

@diggyen diggyen commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Problem

telefonica.com has no DS in com, but its servers (dns1/dns2.movistar.es) answer A with an RRSIG whose signer is cloudflare.net.. The validator marked that RRSIG out-of-bailiwick, and the island-of-security check then required cloudflare.net (which is signed) to be insecure. Every answer came out Bogus → SERVFAIL → public fallback: 26 fallback entries on 2026-10-29 alone. Google and Cloudflare both return the answer without AD.

Fix

This now matches Unbound (validator.c processInit: "this signer name is not a parent of lookupname, omitted"):

  • signersAuthenticatedInsecure now skips signers that are not an ancestor of the qname.
  • When no in-bailiwick signer remains, the response counts as unsigned and the qname's own chain decides. The result is Insecure only under an authenticated no-DS.
  • An unsigned answer inside a signed zone stays Bogus, so the validator still fails closed.

The same function is used for denial responses, so the behaviour is the same there.

Tests

  • TestValidateResponse_UnrelatedSignerUnderInsecureDelegation_IsInsecure fails without the fix (Bogus).
  • TestValidateResponse_UnrelatedSignerInSignedZone_StaysBogus checks that fail-closed is unchanged.
  • Live test (-tags live): TestLive_UnrelatedSigner_Telefonica_NotBogus gives Bogus before the fix and Insecure after.
  • go test ./... passes.

🤖 Generated with Claude Code

telefonica.com has no DS in com, yet its servers answer A with an RRSIG
whose signer is cloudflare.net. That signer cannot have signed the name;
the validator flagged it out-of-bailiwick and the island check then
required cloudflare.net (a signed zone) to be insecure, so every answer
was Bogus -> SERVFAIL -> public fallback, while Google and Cloudflare
return it without AD.

Unbound omits such a signer ("signer name is not a parent of lookupname,
omitted") and validates the answer as unsigned against the qname's own
chain. signersAuthenticatedInsecure now does the same: out-of-bailiwick
signers are skipped, and when none is left the qname's chain must prove
an authenticated no-DS. An unsigned answer inside a signed zone stays
Bogus.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@diggyen
diggyen force-pushed the fix/dnssec-out-of-bailiwick-signer branch from eef7139 to e8f5a20 Compare October 30, 2026 22:42
@diggyen
diggyen merged commit d43c217 into main Oct 30, 2026
6 checks passed
@diggyen
diggyen deleted the fix/dnssec-out-of-bailiwick-signer branch October 30, 2026 22:54
@diggyen diggyen mentioned this pull request Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants