[Bug 1950520] Re: systemd-resolved delivers SOA information when it should not

Sergio Callegari 1950520 at bugs.launchpad.net
Sat Nov 20 06:41:28 UTC 2021


Thanks, I'll try that and try to report. I have already asked on various
forums if there is any way to replace /only/ the stub resolver (systemd-
resolved) with a more recent version without replacing all the code
related to init and the system initialization and been told there is no
safe way, hence I understand the fact that ubuntu has a single package
for the whole of systemd.

Unfortunately, that means that even if https://launchpad.net/~ubuntu-
support-team/+archive/ubuntu/systemd fixes the issue in a vm it will
probably be impossible to practically deploy daily updated init, etc on
a machine that must be reliably on daily use.

On the other side, I have found that it is relatively easy to workaround
the issue in systemd-resolved by making the local DNS server slightly
deviate from standards so that it responds SERVERFAIL instead of
NXDOMAIN for queries in .local.

As a final note, as mentioned above, I have moved this discussion by
closing this issue and opening a new one, where the problem in systemd-
resolved is properly identified. Please see bug 1950850.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1950520

Title:
  systemd-resolved delivers SOA information when it should not

Status in systemd package in Ubuntu:
  Invalid

Bug description:
  I have a setup where a host (say A) in the network runs knot-resolver
  as a caching nameserver.

  Among the other hosts, some of them run ubuntu 20.04 and use systemd-
  resolved. The dhcp setup make all these host use A as their
  nameserver.

  The issue with systemd-

  The issue is that if I do:

  host -t SOA foo.local

  the hosts running systemd-resolved answer

  foo.local has SOA record foo.local. nobody.invalid. 1 3600 1200 604800
  10800

  making up the SOA record from nowhere (sort of).  In fact, if I do the
  same query pointing directly at A

  host -t SOA foo.local <ip address of A>

  I correctly get no SOA record.

  
  ----

  The incorrect response of resolved breaks mDNS resolution. In fact, if
  nsswitch.conf is set at

  hosts:          files mdns4_minimal [NOTFOUND=return] dns

  any call requiring name resolution first goes through the hosts files,
  then mdns is attempted. However, the nss mdnd implementation first
  checks if the DNS server responds to SOA queries for the top level
  local name and if this is the case, it gives up. As a consequence,
  trying to access hosts on the .local domain always fail.

  
  The reason why systemd-resolved makes up a SOA record for hosts such as foo.local is that knot resolver replies to queries about it without an answer, but including an authority section

  ;; AUTHORITY SECTION:
  foo.local.     10800   IN      SOA     foo.local. nobody.invalid. 1 3600 1200 604800 10800

  ;; ADDITIONAL SECTION:
  explanation.invalid.    10800   IN      TXT     "Blocking is mandated by standards, see references on https://www.iana.org/assignments/special-use-domain-names/special-use-domain-names.xhtml"

  and systemd-resolved turns that AUTHORITY section into a SOA record.
   
  It is not totally clear to me if the fault is on knot-resolver, systemd-resolved or both, but I tend to think it is the second one.

  Unfortunately, trying to inquire upstream about systemd-resolved
  appears to be forbidden for anybody not running the last two releases
  of systemd.  Furthermore, I understand that the nature of systemd
  makes it extra hard or impossible to test a more recent version of
  systemd-resolved than the one shipped in ubuntu focal.

  Interestingly, the issue seems to bite those running omnia turris
  router too (see https://forum.turris.cz/t/avahi-local-domain-warning-
  on-ubuntu/13437).  Maybe they use knot-resolver as their caching
  nameserver.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1950520/+subscriptions




More information about the foundations-bugs mailing list