diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-09-12 17:08:36 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-10-23 10:22:28 +0200 |
commit | e63785611713cab0131599565cb3a1bb505640c7 (patch) | |
tree | 10e872380fef17b0b81e612b265dd95cb5363f4e /src | |
parent | resolved: when adding names to packet fails, remove them from label compressi... (diff) | |
download | systemd-e63785611713cab0131599565cb3a1bb505640c7.tar.xz systemd-e63785611713cab0131599565cb3a1bb505640c7.zip |
resolved: explicitly refuse adding invalid DNS names to DNS packets
Fixes: #33671
Diffstat (limited to 'src')
-rw-r--r-- | src/resolve/resolved-dns-packet.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c index 2684944b75..c414ca800c 100644 --- a/src/resolve/resolved-dns-packet.c +++ b/src/resolve/resolved-dns-packet.c @@ -564,6 +564,12 @@ int dns_packet_append_name( assert(p); assert(name); + r = dns_name_is_valid(name); + if (r < 0) + return r; + if (r == 0) + return -EINVAL; + if (p->refuse_compression) allow_compression = false; |