Skip to content

Commit

Permalink
resolved: validate authentic insecure delegation to CNAME
Browse files Browse the repository at this point in the history
If the parent zone uses a non-opt-out method that provides authenticated
negative DS replies, we still can't expect signatures from the child
zone. sd-resolved was using the authenticated status of the DS reply to
require signatures for CNAMEs, even though it had already proved that no
signature exists.

Fixes: 4769063 ("resolved: don't request the SOA for every dns label")
  • Loading branch information
rpigott committed Apr 30, 2024
1 parent ba2caa8 commit 5b3f23f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/resolve/resolved-dns-transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -2921,7 +2921,12 @@ static int dns_transaction_requires_rrsig(DnsTransaction *t, DnsResourceRecord *
if (r == 0)
continue;

return FLAGS_SET(dt->answer_query_flags, SD_RESOLVED_AUTHENTICATED);
if (!FLAGS_SET(dt->answer_query_flags, SD_RESOLVED_AUTHENTICATED))
return false;

/* We expect this to be signed when the DS record exists, and don't expect it to be
* signed when the DS record is proven not to exist. */
return dns_answer_match_key(dt->answer, dns_transaction_key(dt), NULL);
}

return true;
Expand Down

0 comments on commit 5b3f23f

Please sign in to comment.