mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-24 20:32:00 +00:00
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:
1 file changed
+1
-1
+1
-1
@@ -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_len = strlen(daemon->workspacename);
|
||||||
|
|
||||||
/* SOA must be for the name we're interested in. */
|
/* 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;
|
int prefix = name_len - soa_len;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user