systemd-resolved restricts edns0 advertised max size to 512
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd |
Fix Released
|
Unknown
|
|||
systemd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
New
|
Low
|
Unassigned | ||
Focal |
New
|
Low
|
Unassigned | ||
Hirsute |
Won't Fix
|
Low
|
Unassigned | ||
Impish |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
[impact]
when talking to upstream nameservers, systemd-resolved limits its advertised max packet size as 512 in its edns0 opt. However, one of the primary benefits of edns0 is to allow using packet sizes larger than 512, which is the pre-edns0 max packet size.
this results in systemd-resolved failing to handle responses larger than 512 with udp/edns0, and having to fall back to tcp. This is not optimal (since tcp dns imposes significantly higher overhead) and may even cause failures, if a firewall allows udp dns but blocks tcp dns traffic.
[test case]
enable debug logging in systemd-resolved, with 'sudo systemctl edit systemd-resolved' and then add:
[Service]
Environment=
then save that file and restart systemd-resolved (or reboot).
Make sure to flush the cache and reset server features before reproducing:
$ sudo resolvectl flush-caches
$ sudo resolvectl reset-server-
Lookup 'toomany.
...
Aug 24 12:17:48 lp1940715-f systemd-
...
Aug 24 12:17:48 lp1940715-f systemd-
Aug 24 12:17:48 lp1940715-f systemd-
A correct lookup using larger EDNS0 response size looks like:
...
Aug 24 12:28:13 lp1940715-f systemd-
Aug 24 12:28:13 lp1940715-f systemd-
Aug 24 12:28:13 lp1940715-f systemd-
Aug 24 12:28:13 lp1940715-f systemd-
Aug 24 12:28:13 lp1940715-f systemd-
Aug 24 12:28:13 lp1940715-f systemd-
Aug 24 12:28:13 lp1940715-f systemd-
Aug 24 12:28:13 lp1940715-f systemd-
Aug 24 12:28:13 lp1940715-f systemd-
...
[regression potential]
failure to correctly look up dns records, or other problems while performing dns lookups with systemd-resolved
[scope]
this is needed in impish and earlier
this is fixed in jammy at commit 22545a74c3a2439
this is fixed upstream by commit 526fce97afe130f
the upstream PR is:
https:/
Changed in systemd (Ubuntu Bionic): | |
status: | New → In Progress |
Changed in systemd (Ubuntu Focal): | |
status: | New → In Progress |
Changed in systemd (Ubuntu Hirsute): | |
status: | New → In Progress |
Changed in systemd (Ubuntu Bionic): | |
importance: | Undecided → Low |
Changed in systemd (Ubuntu Focal): | |
importance: | Undecided → Low |
Changed in systemd (Ubuntu Hirsute): | |
importance: | Undecided → Low |
Changed in systemd (Ubuntu Bionic): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in systemd (Ubuntu Focal): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in systemd (Ubuntu Hirsute): | |
assignee: | nobody → Dan Streetman (ddstreet) |
description: | updated |
description: | updated |
Changed in systemd: | |
status: | Unknown → New |
Changed in systemd: | |
status: | New → Fix Released |
Changed in systemd (Ubuntu Hirsute): | |
status: | In Progress → Won't Fix |
Changed in systemd (Ubuntu): | |
status: | Confirmed → Fix Released |
description: | updated |
Changed in systemd (Ubuntu Hirsute): | |
assignee: | Dan Streetman (ddstreet) → nobody |
Changed in systemd (Ubuntu Focal): | |
assignee: | Dan Streetman (ddstreet) → nobody |
Changed in systemd (Ubuntu Bionic): | |
assignee: | Dan Streetman (ddstreet) → nobody |
Changed in systemd (Ubuntu Focal): | |
status: | In Progress → New |
Changed in systemd (Ubuntu Bionic): | |
status: | In Progress → New |
Status changed to 'Confirmed' because the bug affects multiple users.