A flaw was found in dnsmasq. The TCP DNS service uses a small fixed pool of child processes and does not set a receive timeout on client connections. A remote attacker can open idle TCP connections to port 53 and occupy the entire pool, preventing new TCP DNS connections and DNSSEC validation that requires TCP fallback. UDP DNS resolution continues, and occupied slots are released after a fixed lifetime.
The following measures reduce risk:
- Increase the TCP connection limit with --max-tcp-connections=<N> to raise the number of connections an attacker must hold.
- Limit per-source TCP connections to port 53 with firewall rules, for example iptables connlimit on tcp/53.
- Restrict which hosts can reach TCP port 53 if TCP DNS is not required from untrusted networks.