walinuxagent blocks DNS fallback to TCP
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
walinuxagent (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
[impact]
on azure instances, walinuxagent blocks all (new) TCP connections to the azure nameserver, which prevents fallback to TCP DNS for truncated dns queries
[test case]
on an azure instance:
ddstreet@
DNS Servers: 168.63.129.16
ddstreet@
;; connection timed out; no servers could be reached
;; Connection to 168.63.
change the actual nameserver ip in the 'dig' command to match what resolved is configured with (which comes from dhcp)
[regression potential]
TBD
[scope]
TBD
[original description]
Description: Ubuntu 18.04.4 LTS
Release: 18.04
systemd-resolve --version
systemd 237
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP
+GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN
-PCRE2 default-
We met an error: on an attempt to resolve address, the following issue appears:
; <<>> DiG 9.11.3-
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 44096
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;mharder-
;; Query time: 231 msec
;; SERVER: 127.0.0.
;; WHEN: Tue Apr 28 20:47:14 UTC 2020
;; MSG SIZE rcvd: 72
Let me provide you important notes about the issue:
1) It's not reproducing on Ubuntu 16;
2) Bypassing systemd-resolve - everything works fine;
3) Only the difference between systemd-resolve and END is UDP_PAYLOAD_SIZE
Successful query:
1135 16:27:25.964386 10.1.0.4 168.63.129.16 DNS 128 Standard query 0xc2d4 A mharder-
Domain Name System (query)
Transaction ID: 0xc2d4
Flags: 0x0120 Standard query
0... .... .... .... = Response: Message is a query
.000 0... .... .... = Opcode: Standard query (0)
.... ..0. .... .... = Truncated: Message is not truncated
.... ...1 .... .... = Recursion desired: Do query recursively
.... .... .0.. .... = Z: reserved (0)
.... .... ..1. .... = AD bit: Set
.... .... ...0 .... = Non-authenticated data: Unacceptable
Questions: 1
Answer RRs: 0
Authority RRs: 0
Additional RRs: 1
Queries
Additional records
<Root>: type OPT
Name: <Root>
Type: OPT (41)
UDP payload size: 4096
Higher bits in extended RCODE: 0x00
EDNS0 version: 0
Z: 0x0000
Data length: 12
Option: COOKIE
Unsuccessful query:
1128 16:27:25.713886 10.1.0.4 168.63.129.16 DNS 116 Standard query 0x198d A mharder-
Domain Name System (query)
Transaction ID: 0x198d
Flags: 0x0100 Standard query
0... .... .... .... = Response: Message is a query
.000 0... .... .... = Opcode: Standard query (0)
.... ..0. .... .... = Truncated: Message is not truncated
.... ...1 .... .... = Recursion desired: Do query recursively
.... .... .0.. .... = Z: reserved (0)
.... .... ...0 .... = Non-authenticated data: Unacceptable
Questions: 1
Answer RRs: 0
Authority RRs: 0
Additional RRs: 1
Queries
Additional records
<Root>: type OPT
Name: <Root>
Type: OPT (41)
UDP payload size: 512
Higher bits in extended RCODE: 0x00
EDNS0 version: 0
Z: 0x0000
Data length: 0
Notable difference:
Success:
UDP payload size: 4096
Failure:
UDP payload size: 512
And notable differences in the responses:
Success:
Flags: 0x8180 Standard query response, No error
.... ..0. .... .... = Truncated: Message is not truncated
Failure:
Flags: 0x8380 Standard query response, No error
.... ..1. .... .... = Truncated: Message is truncated
Interestingly, systemd-resolved is setting the maximum payload size to 512 regardless of whether EDNS0 is configured and regardless of what is sent to it for the payload size.
I tried to found a way to change UDP_PAYLOAD_
Changed in systemd (Ubuntu): | |
status: | Incomplete → Confirmed |
Changed in systemd (Ubuntu): | |
assignee: | Dan Streetman (ddstreet) → nobody |
importance: | Medium → Undecided |
Are you referring to edns0 from glibc to the local stub resolver, or edns0 from systemd-resolved to the upstream nameserver?
I don't see any problem when i resolve the name on bionic:
$ lsb_release -c
Codename: bionic
$ dpkg -l systemd|grep systemd
ii systemd 237-3ubuntu10.41 amd64 system and service manager
$ dig +short mharder- formrec. cognitiveservic es.azure. com api.cognitive. microsoft. com. od.trafficmanag er.net. od.azure- api.net. juddplpewicwu8g nxxj7ehaj3ubplf wharv.trafficma nager.net. od-westus2- 01.regional. azure-api. net. epz5stnvukztxi3 dks7nna13rgbo90 ytolj.cloudapp. net.
westus2.
cognitiveusw2pr
cognitiveusw2pr
apimgmttmmtjxmd
cognitiveusw2pr
apimgmthsn6metw
52.229.16.14