Public bug reported: [impact]
glibc's getaddrinfo() uses EDNS0 to talk to resolved, and it sets its payload limit to 1200. When the response is larger than 1200, resolved will limit the response and set the truncate flag. This causes getaddrinfo() to switch to TCP and request again, but glibc incorrectly keeps the EDNS0 RR opt, with the same 1200 payload limit. Most dns nameservers ignore EDNS0 payload limit for TCP, since per RFC it applies only to UDP, but resolved does not and again marks the response as truncated. This prevents getaddrinfo() from being able to resolve any records with a response over 1200 bytes. [test case] use ping or telnet, which use getaddrinfo(), to lookup an A record with a lot of results, like toomany100.ddstreet.org $ telnet toomany100.ddstreet.org telnet: could not resolve toomany100.ddstreet.org/telnet: Temporary failure in name resolution [regression potential] any regression would likely result in failure to correctly lookup a hostname or to provide the correct response to a local client. [other info] ** Affects: systemd (Ubuntu) Importance: Undecided Status: New ** Affects: systemd (Ubuntu Bionic) Importance: Medium Assignee: Dan Streetman (ddstreet) Status: In Progress ** Affects: systemd (Ubuntu Disco) Importance: Medium Assignee: Dan Streetman (ddstreet) Status: In Progress ** Affects: systemd (Ubuntu Eoan) Importance: Medium Assignee: Dan Streetman (ddstreet) Status: Fix Released ** Also affects: systemd (Ubuntu Disco) Importance: Undecided Status: New ** Also affects: systemd (Ubuntu Eoan) Importance: Undecided Status: New ** Also affects: systemd (Ubuntu Bionic) Importance: Undecided Status: New ** Changed in: systemd (Ubuntu Eoan) Status: New => Fix Released ** Changed in: systemd (Ubuntu Disco) Status: New => In Progress ** Changed in: systemd (Ubuntu Bionic) Status: New => In Progress ** Changed in: systemd (Ubuntu Disco) Importance: Undecided => Medium ** Changed in: systemd (Ubuntu Bionic) Importance: Undecided => Medium ** Changed in: systemd (Ubuntu Eoan) Importance: Undecided => Medium ** Changed in: systemd (Ubuntu Eoan) Assignee: (unassigned) => Dan Streetman (ddstreet) ** Changed in: systemd (Ubuntu Disco) Assignee: (unassigned) => Dan Streetman (ddstreet) ** Changed in: systemd (Ubuntu Bionic) Assignee: (unassigned) => Dan Streetman (ddstreet) -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1849733 Title: resolved incorrectly limits TCP reply to edns0 payload Status in systemd package in Ubuntu: New Status in systemd source package in Bionic: In Progress Status in systemd source package in Disco: In Progress Status in systemd source package in Eoan: Fix Released Bug description: [impact] glibc's getaddrinfo() uses EDNS0 to talk to resolved, and it sets its payload limit to 1200. When the response is larger than 1200, resolved will limit the response and set the truncate flag. This causes getaddrinfo() to switch to TCP and request again, but glibc incorrectly keeps the EDNS0 RR opt, with the same 1200 payload limit. Most dns nameservers ignore EDNS0 payload limit for TCP, since per RFC it applies only to UDP, but resolved does not and again marks the response as truncated. This prevents getaddrinfo() from being able to resolve any records with a response over 1200 bytes. [test case] use ping or telnet, which use getaddrinfo(), to lookup an A record with a lot of results, like toomany100.ddstreet.org $ telnet toomany100.ddstreet.org telnet: could not resolve toomany100.ddstreet.org/telnet: Temporary failure in name resolution [regression potential] any regression would likely result in failure to correctly lookup a hostname or to provide the correct response to a local client. [other info] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1849733/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp