Fix subdomain-test in find_soa()

Do correct subdomain test, rather than a substring match.

Thanks to Lucas Celant <lcelant@redhat.com> for spotting this.

CVE-2026-93008 may apply.
This commit is contained in:
Simon Kelley committed 2026-10-20 00:07:33 +01:00
1 parent 3a3e7a049f
commit 7719737f36
1 file changed
+1 -1
+1 -1
View File
@@ -560,7 +560,7 @@ static int find_soa(struct dns_header *header, size_t qlen, char *name, int *sub
soa_len = strlen(daemon->workspacename);
/* SOA must be for the name we're interested in. */
if (soa_len <= name_len && memcmp(daemon->workspacename, name + name_len - soa_len, soa_len) == 0)
if (hostname_issubdomain(daemon->workspacename, name) != 0)
{
int prefix = name_len - soa_len;