resolve: limit the number NTAs to something sensible

This commit is contained in:
Frantisek Sumsal
2026-05-04 22:39:05 +02:00
parent 50138e36ff
commit 17e6a3e2a8
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -683,6 +683,9 @@ int bus_link_method_set_dnssec_negative_trust_anchors(sd_bus_message *message, v
if (r < 0)
return r;
if (strv_length(ntas) > LINK_NEGATIVE_TRUST_ANCHORS_MAX)
return sd_bus_error_set(error, SD_BUS_ERROR_LIMITS_EXCEEDED, "Too many negative trust anchors per link");
STRV_FOREACH(i, ntas) {
r = dns_name_is_valid(*i);
if (r < 0)
+1
View File
@@ -11,6 +11,7 @@
#define LINK_SEARCH_DOMAINS_MAX 1024
#define LINK_DNS_SERVERS_MAX 256
#define LINK_NEGATIVE_TRUST_ANCHORS_MAX 2048
typedef struct LinkAddress {
Link *link;