A flaw was found in dnsmasq. The DHCPv6 client hostname parser can read one byte past the end of a crafted FQDN option because it checks the next label length before confirming the pointer is still inside the option. An attacker on the local network can trigger this with a single DHCPv6 packet. The extra byte is not returned to the client or logged, and no crash has been demonstrated.
The following measures reduce risk:
- If DHCPv6 is not required, do not configure any IPv6 dhcp-range.
- Compile without DHCPv6 using COPTS=-DNO_DHCP6 if IPv6 DHCP is not needed.
- Restrict dnsmasq to trusted interfaces with --interface=<iface>.