A flaw was found in dnsmasq. When following a CNAME in a DNS response, the resolver can cache records for the CNAME target without checking that those records belong to the responding server's authorized zone. In split-DNS deployments that send some domains to a specific upstream, an attacker who controls that upstream can inject cache entries for unrelated names. Later clients may then receive attacker-chosen addresses for those names.
The following measures reduce risk:
- Do not point server=/domain/ at untrusted or attacker-reachable DNS servers.
- Restrict dnsmasq to communicate only with trusted upstream resolvers at the firewall.
- For local=/domain/ zones, define all names that should be served locally.
- Do not rely on --dnssec to mitigate this for unsigned zones. Insecure records are still cached.