A flaw was found in dnsmasq. After a reduction of internal domain-name buffer sizes, the DNSSEC validator can write a few bytes past a name buffer when converting names to and from DNS wire format. An attacker who can cause the server to validate a crafted DNSSEC response may overwrite a small amount of adjacent heap metadata. DNSSEC support is not compiled in by default and must also be enabled at runtime.
The following measures reduce risk:
- Do not enable --dnssec or --trust-anchor unless DNSSEC validation is required.
- Omit -DHAVE_DNSSEC from COPTS (this is the default build).
- If DNSSEC validation is required, restrict dnsmasq to trusted upstream resolvers.