Skip to content

systemd-resolved: often returns SERVFAIL for PTR requests when DNSSEC enabled #27361

Closed

Description

@gwire

systemd version the issue has been seen with

252

Used distribution

Ubuntu 23.04

Linux kernel version used

6.2.0-20-generic

CPU architectures issue was seen on

x86_64

Component

systemd-resolved

Expected behaviour you didn't see

I expect 127.0.0.3 (which is set to use 8.8.8.8) to return the same status as a request direct to 8.8.8.8.

$ dig @8.8.8.8 +dnssec -x 54.240.25.68 | grep HEADER
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42332

Unexpected behaviour you saw

$ dig @127.0.0.53 +dnssec -x 54.240.25.68 | grep HEADER
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 51991

Steps to reproduce the problem

  • resolved is configured to use DNSSEC and 8.8.8.8 (but this applies to other DNSSEC resolvers).
$ resolvectl status
[...]
    Current Scopes: DNS
         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=yes/supported
Current DNS Server: 8.8.8.8
       DNS Servers: 8.8.8.8 8.8.4.4
  • I can usually reproduce on PTR lookups where the next label up has no NS/SOA record.
$ dig 145.94.167.in-addr.arpa soa +noall +answer
$ dig 1.145.94.167.in-addr.arpa ptr | grep HEADER
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 40989
$ dig @8.8.8.8 145.94.167.in-addr.arpa ptr | grep HEADER
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 46246

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

Apr 22 20:26:28 example systemd-resolved[69613]: [🡕] DNSSEC validation failed for question 145.94.167.in-addr.arpa IN SOA: no-signature
Apr 22 20:26:28 example systemd-resolved[69613]: [🡕] DNSSEC validation failed for question 1.145.94.167.in-addr.arpa IN DS: no-signature
Apr 22 20:26:28 example systemd-resolved[69613]: [🡕] DNSSEC validation failed for question 1.145.94.167.in-addr.arpa IN SOA: no-signature
Apr 22 20:26:28 example systemd-resolved[69613]: [🡕] DNSSEC validation failed for question 1.145.94.167.in-addr.arpa IN PTR: no-signature
Apr 22 20:26:41 example systemd-resolved[69613]: [🡕] DNSSEC validation failed for question 145.94.167.in-addr.arpa IN SOA: no-signature

Activity

  1. added
    bug 🐛
    on Apr 22, 2023
  2. c--- commented on Apr 26, 2023

    @c---

    I don't think this is a bug. It looks like major parts of the in-addr.arpa domain have been broken for days. Missing DS records and such.

    I can't believe more people aren't talking about this. It's a major outage. Searching doesn't yield much results.

  3. gwire commented on Apr 27, 2023

    @gwire
    Author

    The issue I have is that I've enabled strict reverse DNS validation on my mail server, but if it sees a SERVFAIL response, it marks it as a temporary failure and returns a 4xx code. But this has resulted in a lot of rejected connections from amazons.com.

    A request to one.one.one.one also has a NOERROR response, but the RFC 8914 support means it does show an issue:

    EDE: 23 (Network Error): (204.74.108.1:53 rcode=REFUSED for 240.54.in-addr.arpa DNSKEY)
    
    $ dig @1.1.1.1 68.25.240.54.in-addr.arpa ptr
    
    ; <<>> DiG 9.18.12-1ubuntu1-Ubuntu <<>> @1.1.1.1 68.25.240.54.in-addr.arpa ptr
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58453
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 1232
    ; EDE: 23 (Network Error): (204.74.108.1:53 rcode=REFUSED for 240.54.in-addr.arpa DNSKEY)
    ;; QUESTION SECTION:
    ;68.25.240.54.in-addr.arpa.	IN	PTR
    
    ;; ANSWER SECTION:
    68.25.240.54.in-addr.arpa. 900	IN	PTR	a25-68.smtp-out.us-west-2.amazonses.com.
    
    ;; Query time: 339 msec
    ;; SERVER: 1.1.1.1#53(1.1.1.1) (UDP)
    ;; WHEN: Thu Apr 27 19:03:48 BST 2023
    ;; MSG SIZE  rcvd: 173
    
    $ dig @127.0.0.53 68.25.240.54.in-addr.arpa ptr
    ;; communications error to 127.0.0.53#53: timed out
    
    ; <<>> DiG 9.18.12-1ubuntu1-Ubuntu <<>> @127.0.0.53 68.25.240.54.in-addr.arpa ptr
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 84
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 65494
    ;; QUESTION SECTION:
    ;68.25.240.54.in-addr.arpa.	IN	PTR
    
    ;; ANSWER SECTION:
    68.25.240.54.in-addr.arpa. 900	IN	PTR	a25-68.smtp-out.us-west-2.amazonses.com.
    
    ;; Query time: 347 msec
    ;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
    ;; WHEN: Thu Apr 27 19:04:32 BST 2023
    ;; MSG SIZE  rcvd: 107
    
  4. rpigott commented on Mar 26, 2024

    @rpigott
    Contributor

    I can usually reproduce on PTR lookups where the next label up has no NS/SOA record.

    I think this is duplicated by #30856 and resolved by #31827.

  5. 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