Security fix, CVE-2017-14491 DNS heap buffer overflow.

Fix heap overflow in DNS code. This is a potentially serious
security hole. It allows an attacker who can make DNS
requests to dnsmasq, and who controls the contents of
a domain, which is thereby queried, to overflow
(by 2 bytes) a heap buffer and either crash, or
even take control of, dnsmasq.
This commit is contained in:
Simon Kelley committed 2017-09-25 18:17:11 +01:00
1 parent b697fbb7f1
commit 0549c73b7e
8 files changed
+66 -17

No files matched your search

+2 -2
View File
@@ -1479,10 +1479,10 @@ static struct dhcp_netid *add_options(struct state *state, int do_refresh)
if ((p = expand(len + 2)))
{
*(p++) = state->fqdn_flags;
p = do_rfc1035_name(p, state->hostname);
p = do_rfc1035_name(p, state->hostname, NULL);
if (state->send_domain)
{
p = do_rfc1035_name(p, state->send_domain);
p = do_rfc1035_name(p, state->send_domain, NULL);
*p = 0;
}
}