Skip to content

DNSSEC validating resolver does unnecessary SOA queries #26970

Closed

Description

@pemensik

systemd version the issue has been seen with

253.1

Used distribution

Fedora Rawhide

Linux kernel version used

6.1.10-100.fc36.x86_64

CPU architectures issue was seen on

x86_64

Component

systemd-resolved

Expected behaviour you didn't see

Validating resolver makes only queries it needs.

Unexpected behaviour you saw

Validating resolver does SOA query for queried name, even if it already received NXDOMAIN response for the same name, which includes signed SOA record for parent domain.

Steps to reproduce the problem

  • have DNSSEC=yes in resolved.conf
  • record sent queries
  • `dig @127.0.0.53 nx.example.net``
  • NXDOMAIN response contains SOA for parent example.net
  • resolved requests SOA nx.example.net OPT after processing NXDOMAIN response, where it already had information zone apex is at example.net.
  • also it asks again the query and SOA for parent this time.

Additional program output to the terminal or log subsystem illustrating the issue

$ tshark -r resolved-nx.example.net-dnssec.pcapng 
    1 0.000000000 192.168.122.184 → 192.168.122.1 DNS 108 Standard query 0x3fec A nx.example.net OPT
    2 0.000361379 192.168.122.1 → 192.168.122.184 DNS 527 Standard query response 0x3fec No such name A nx.example.net NSEC www.example.net RRSIG SOA ns.icann.org RRSIG OPT
    3 0.000801977 192.168.122.184 → 192.168.122.1 DNS 105 Standard query 0x1147 DNSKEY example.net OPT
    4 0.001066118 192.168.122.1 → 192.168.122.184 DNS 1380 Standard query response 0x1147 DNSKEY example.net DNSKEY DNSKEY DNSKEY RRSIG RRSIG OPT
    5 0.001922130 192.168.122.184 → 192.168.122.1 DNS 108 Standard query 0xf0b8 SOA nx.example.net OPT
    6 0.002342875 192.168.122.184 → 192.168.122.1 DNS 105 Standard query 0xcaf2 DS example.net OPT
    7 0.002540710 192.168.122.1 → 192.168.122.184 DNS 529 Standard query response 0xcaf2 DS example.net DS DS DS DS DS DS RRSIG OPT
    8 0.002868464 192.168.122.184 → 192.168.122.1 DNS 97 Standard query 0x50b7 DNSKEY net OPT
    9 0.003103312 192.168.122.1 → 192.168.122.184 DNS 817 Standard query response 0x50b7 DNSKEY net DNSKEY DNSKEY RRSIG OPT
   10 0.003443211 192.168.122.184 → 192.168.122.1 DNS 97 Standard query 0x332d DS net OPT
   11 0.003633735 192.168.122.1 → 192.168.122.184 DNS 409 Standard query response 0x332d DS net DS RRSIG OPT
   12 0.003926312 192.168.122.184 → 192.168.122.1 DNS 93 Standard query 0x11ef DNSKEY <Root> OPT
   13 0.004115847 192.168.122.1 → 192.168.122.184 DNS 1181 Standard query response 0x11ef DNSKEY <Root> DNSKEY DNSKEY DNSKEY RRSIG OPT
   14 0.243143349 192.168.122.1 → 192.168.122.184 DNS 521 Standard query response 0xf0b8 No such name SOA nx.example.net SOA ns.icann.org RRSIG NSEC www.example.net RRSIG OPT
   15 0.244231139 192.168.122.184 → 192.168.122.1 DNS 108 Standard query 0xf56d DS nx.example.net OPT
   16 0.244919645 192.168.122.1 → 192.168.122.184 DNS 521 Standard query response 0xf56d No such name DS nx.example.net NSEC www.example.net RRSIG SOA ns.icann.org RRSIG OPT
   17 0.245816106 192.168.122.184 → 192.168.122.1 DNS 105 Standard query 0x892c SOA example.net OPT
   18 0.246337197 192.168.122.1 → 192.168.122.184 DNS 315 Standard query response 0x892c SOA example.net SOA ns.icann.org RRSIG OPT

Activity

  1. added
    bug 🐛
    on Mar 24, 2023
  2. pemensik commented on Mar 24, 2023

    @pemensik
    ContributorAuthor

    Also not sure why it is requesting DS nx.example.net, by that time it should already know SOA from Authority section. Therefore knows where should DS lie, it is not on name of original query in this case.

  3. rpigott commented on Mar 26, 2024

    @rpigott
    Contributor

    Resolved by #31827.

  4. linked a pull request that will close this issueReduce superfluous dnssec transactions #31827on Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛dnssecresolve

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions