Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • BIND BIND
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 530
    • Issues 530
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 98
    • Merge requests 98
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source Projects
  • BINDBIND
  • Issues
  • #3279
Closed
Open
Created Apr 13, 2022 by Mark Andrews@markaOwner

lib/dns/ncache.c:rdataset_settrust() fails to set trust on called rdataset

I was exploring making the dnssec system test do more tests via a forwarder and had an unexpected validation failure.

Daisy chaining the lookup via ns9 resulted in the subsequent direct lookup failing as ns9 sets CD=1 resulting in a pending ncache entry for insecure.example/DS existing. When the NSEC record was validated as secure only the trust in the slab was updated resulting in the NODATA proof not being found as rdataset->trust was still pending. Subsequent lookups should succeed as the next time the rdataset is retrieved the trust will be secure making this a transient failure.

diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh
index 29044e18fe..caee6d78e3 100644
--- a/bin/tests/system/dnssec/tests.sh
+++ b/bin/tests/system/dnssec/tests.sh
@@ -122,6 +122,7 @@ check_secroots_layout () {
 # in the additional section
 echo_i "checking that additional glue is returned for unsigned delegation ($n)"
 ret=0
+$DIG +tcp +dnssec -p "$PORT" a.insecure.example. @10.53.0.9 a > dig.out.ns9.test$n || ret=1
 $DIG +tcp +dnssec -p "$PORT" a.insecure.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
 grep "ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2" dig.out.ns4.test$n > /dev/null || ret=1
 grep "ns\\.insecure\\.example\\..*A.10\\.53\\.0\\.3" dig.out.ns4.test$n > /dev/null || ret=1
diff --git a/lib/dns/ncache.c b/lib/dns/ncache.c
index 2316eb04a7..7bea3d376c 100644
--- a/lib/dns/ncache.c
+++ b/lib/dns/ncache.c
@@ -504,6 +504,7 @@ rdataset_settrust(dns_rdataset_t *rdataset, dns_trust_t trust) {
        unsigned char *raw = rdataset->private3;
 
        raw[-1] = (unsigned char)trust;
+       rdataset->trust = trust;
 }
 
 static dns_rdatasetmethods_t rdataset_methods = {
Edited Apr 13, 2022 by Mark Andrews
Assignee
Assign to
Time tracking