Repository navigation
Closed
Description
systemd version the issue has been seen with
293.300 (systemd/systemd-stable@25d1ba1)
Used distribution
Arch Linux
Expected behaviour you didn't see
In allow-downgrade mode and using a DNS server without DNSSEC support, the query that triggers the downgrade is still ultimately successful.
Unexpected behaviour you saw
$ sudo systemctl restart systemd-resolved
$ resolvectl query encryptedsni.com
encryptedsni.com: resolve call failed: DNSSEC validation failed: failed-auxiliary
$ resolvectl query encryptedsni.com
encryptedsni.com: 104.20.84.157
104.20.0.157
-- Information acquired via protocol DNS in 39.2ms.
-- Data is authenticated: no
Logs:
systemd[1]: Starting Network Name Resolution...
systemd-resolved[30973]: Positive Trust Anchors:
systemd-resolved[30973]: . IN DS 19036 8 2 49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5
systemd-resolved[30973]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
systemd-resolved[30973]: Negative trust anchors: 10.in-addr.arpa 16.172.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.arpa 19.172.in-addr.arpa 20.172.in-addr.arpa 21.172.in-addr.arpa 22.172.in-addr.arpa 23.172.i>
systemd-resolved[30973]: Using system hostname 'papyrus'.
systemd[1]: Started Network Name Resolution.
systemd-resolved[30973]: Using degraded feature set (UDP+EDNS0) for DNS server 192.168.50.14.
systemd-resolved[30973]: DNSSEC validation failed for question com IN SOA: failed-auxiliary
systemd-resolved[30973]: DNSSEC validation failed for question encryptedsni.com IN DS: failed-auxiliary
systemd-resolved[30973]: DNSSEC validation failed for question encryptedsni.com IN AAAA: failed-auxiliary
systemd-resolved[30973]: DNSSEC validation failed for question encryptedsni.com IN SOA: failed-auxiliary
systemd-resolved[30973]: DNSSEC validation failed for question encryptedsni.com IN A: failed-auxiliary
systemd-resolved[30973]: Server 192.168.50.14 does not support DNSSEC, downgrading to non-DNSSEC mode.
systemd-resolved[30973]: Using degraded feature set (UDP) for DNS server 192.168.50.14.
I've also seen:
encryptedsni.com: resolve call failed: 'encryptedsni.com' does not have any RR of the requested type
Reacted by tchernomax, John Eikenberry, Kai, patrolez, Siva Mahadevan, Sergey Zolotorev, jackkamm, Ludovico de Nittis, Codimp, Li-Yu Yu and 20 more
Activity
AndreaBorgia-Abo commentedon Nov 4, 2018
Can confirm same behaviour on Debian/testing with systemd 239
This is interfering with Amanda backups: every lookup failure means a host is excluded from backups, unless the server is pre-pinged by the clients.
b1tninja commentedon Feb 18, 2019
Seeing this in systemd 240.95
Looks similar to issue of #9867
[b1tninja@hostname /]$ resolvectl query www.example.org
[b1tninja@hostname /]$ resolvectl query www.archlinux.org
[b1tninja@hostname /]$ ip route
[b1tninja@hostname /]$ cat /etc/systemd/resolved.conf
tchernomax commentedon May 26, 2019
I can't reproduce this bug in version 242:
heftig commentedon Jun 12, 2019
Still reproducible using version 242.29.
Logs:
afq984 commentedon Sep 23, 2019
Alternatively,
resolvectl flush-caches; resolvectl reset-server-featurescan also be used to triggerresolve call failed: DNSSEC validation failed: failed-auxiliaryb1tninja commentedon Sep 24, 2019
I'm still skimming source but looks like it might be here:
https://github.https://github.com/systemd/systemd/blob/f731fd5be61858b724e0f13b3ff1131c1977654a/src/resolve/resolved-dns-transaction.c#L764
When checking to see if there are ongoing auxiliary transactions the transaction is sometimes failed, and also iteration is stopped (do other transactions still need considering?)... and the dns_transaction_process_dnssec is skipped, which would dns_transaction_maybe_restart
patrolez commentedon Dec 23, 2019
The thing is popular on microcomputers without RTC (like Raspberry Pi) as security of DNSSEC thing requires correct system date and time to be provided.
So you have:
pool.ntp.orgallow-downgradedoes not allow to make resolutionphilippe-rero commentedon Mar 4, 2020
Still reproducible using version 244.3. It would be good to be able to use allow-downgrade by now...
b1tninja commentedon Mar 5, 2020
It has been awhile since I looked at the code but iirc their was a commit that returned the failure so there was information. The allow-downgrade case was rather complex, given it has to wait for pending/auxiliary queries and exhaust the server list... but my take on the issue is the resolve 'api' could only 'return' once (analogous to a synchronous function) and it occurred to me that it might be nice to have sort of a 'callback' --- I have no idea if that's possible with d-bus, but the idea being to provide updates on the status of the resolution as they become available, maybe options to provide the records/answers too... pending auxiliary requests.... and this idea is feature creeping but maybe provide a way to make decisions about resolution/validation
Another idea related to the NTP problem, (which I 'solved' by adding an ntp by ip), is to have flags for the resolution, maybe an option could provide a timestamp or 'softfail'
goekce commentedon Jun 3, 2020
Can confirm that it is present in 245.6. Leads to the failure of the first command that requires an external DNS resolution.
pemensik commentedon Oct 1, 2020
It would be helpful, if timesyncd allowed first query to run with +cd bit set. dig +cd pool.ntp.org fetches address without DNSSEC validation. It would get candidate host with candidate current time. It should then get addresses with DNSSEC validation in place, using candidate time to verify it. If validation passed this time and host hasn't changed, we have trusted time validated with DNSSEC.
Turning off DNSSEC validation completely for all clients should not be done nor necessary.
pemensik commentedon Oct 1, 2020
One way around this would be using negative trust anchor (nta) for pool.ntp.org on machines without correct time. It would allow time to be set regardless state of general validation.
This is more workaround than proper fix, but proper fix is more difficult.
systemd: Disable DNSSEC for the mean time
14 remaining items
rpigott commentedon Mar 1, 2024
I can't reproduce this, as "encryptedsni.com" seems to have functional dnssec nowadays.
However, even using testing domains, I can't reproduce (on v255.4).
This query always fails with allow downgrade. I don't know whether or not this is expected behavior — allow-downgrade is said to "increase compatibility with non-dnssec capable networks" according to the docs, which to me doesn't necessarily imply it will invariably bless every kind of invalid transaction. Some specific exceptional failures are special cased in the code.
If an issue existed here, I think this has been resolved. Can anyone reproduce this with another domain?
heftig commentedon Mar 1, 2024
@rpigott You've misunderstood the issue.
encryptedsni.comalways had functional DNSSEC. This is about the case of using an upstream resolver without DNSSEC support, which should downgrade gracefully when systemd first detects this but does not.heftig commentedon Mar 1, 2024
That said, I can no longer reproduce this, either. If I'm not making a mistake this got fixed somewhere between v248 and v255.4.
rpigott commentedon Mar 1, 2024
@heftig What resolver are you using to test it? Can you share either a public resolver or a config for some resolver software that is not dnssec-aware?
heftig commentedon Mar 1, 2024
It's an AVM FRITZ!Box 7590 router with its OS at version 7.57, with Google DNS (8.8.8.8 etc) as its upstream servers.
pemensik commentedon Mar 2, 2024
Good example of dnssec incapable routers are also any Mikrotik devices, popular around here. You can even download image for PC at https://mikrotik.com/download. Should be possible to operate from VM for testing (haven't tried).
Also, any bind9 <= 9.11 is able to use
dnssec-enabled no;option to become dnssec-unaware. Recent unbound got option todisable-edns-do: yes, which might help also. But that affects only upstream requests.rpigott commentedon Mar 2, 2024
Thanks for the suggestions. Actually, it's not a perfect attempt, but without access to such a router I hacked sd-resolved to not really set the DO bit while thinking that it had set it, which I think would result in similar behavior (upstream resolver thinks I'm not dnssec aware). It seems to downgrade successfully on the first try. My version of meson can't build v248.4 which is the last version someone reported to have seen this behavior. It's plausible to me that this has been fixed.
If nobody can reproduce, I figure this can be closed.
pemensik commentedon Mar 3, 2024
Tried this with
systemd-resolved-253.15-2.fc38.x86_64and haven't seen described behaviour as well.The first response already had authenticated: no response. The same behaviour observed with
systemd-resolved-252-27.el9.x86_64.poettering commentedon Apr 15, 2024
Let's close.
re-enable DNSSEC by default