Skip to content

systemd-resolved returns synthesized DNS records for the local host #34897

@tomhughes

Description

@tomhughes

systemd version the issue has been seen with

256

Used distribution

Fedora 41

Linux kernel version used

6.11.5-300.fc41.x86_64

CPU architectures issue was seen on

x86_64

Component

systemd-resolved

Expected behaviour you didn't see

When resolving the local host systemd-resolved should return the address in the DNS and nothing else.

Unexpected behaviour you saw

When resolving the local host systemd-resolved returned DNS records and also every other IP address assigned to a local interface.

Steps to reproduce the problem

After upgrading to Fedora 41 (and hence systemd 256) this is what I see:

bericote [~] % resolvectl query bericote.compton.nu           
bericote.compton.nu: 172.16.15.2               -- link: br0
                     10.88.0.1                 -- link: podman0
                     2001:8b0:bd:1:1881:14ff:fe46:3cc7 -- link: br0
                     fd96:7c2e:b8d2:bf65::1    -- link: podman0
                     fe80::1881:14ff:fe46:3cc7%2 -- link: br0
                     fe80::bec7:46ff:fe9a:cf7c%4 -- link: wlp6s0
                     fe80::24b9:eff:fef3:5f08%5 -- link: podman0
                     fe80::8453:1eff:feb0:970f%6 -- link: veth0

-- Information acquired via protocol DNS in 516us.
-- Data is authenticated: yes; Data was acquired via local or encrypted transport: yes
-- Data from: synthetic

Despite the claim that the data comes from DNS only 172.16.15.2 and 2001:8b0:bd:1:1881:14ff:fe46:3cc7 are actually present in the DNS.

It appears the default value of SYSTEMD_RESOLVED_SYNTHESIZE_HOSTNAME has changed from false to true in 6399be2 and explicitly setting it to false in systemd-resolved.service fixes this.

If you're wondering why this is a problem it's because my firefox happily picked one of the link local addresses to use and then apache 403ed because that address was not in it's ACL list.

Additional program output to the terminal or log subsystem illustrating the issue

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions