Severe dnsmasq vulnerabilities affecting LEDE
jo at mein.io
Tue Oct 3 15:08:16 EDT 2017
The Google security team identified a number of critical security
issues present in dnsmasq, the embedded DNS and DHCP server used by
LEDE as well as many other different open and proprietary firmwares and
A total of six different flaws affecting both DNS and DHCP
functionality have been identified in dnsmasq versions up to v2.77:
- CVE-2017-14491 - Remote code execution, through DNS,
due to heap overflow
- CVE-2017-14492 - Remote code execution, through DHCP,
due to heap overflow
- CVE-2017-14493 - Remote code execution, through DHCP,
due to stack overflow
- CVE-2017-14494 - Information leak, through DHCP,
potentially weakening ASLR
- CVE-2017-14495 - Denial of service, through DNS,
out-of-memory due missing free()
- CVE-2017-14496 - Denial of service, through DNS,
integer underflow causing huge memcpy()
- CVE-2017-13704 - Denial of service, through DNS,
integer underflow causing service crash
According to Simon Kelley, the author of dnsmasq, most critical flaws
are present in dnsmasq since a very long time, having even survived a
number of audits.
The security issues have been fixed in the most recent dnsmasq
version, v2.78, which has been included into both the LEDE master and
lede-17.01 release branches.
In order to solve the security issues above you can either update the
dnsmasq package through opkg:
opkg upgrade dnsmasq
Or update to a newer LEDE image. Master snapshots newer than revision
r4969-67ac017fef and the upcoming LEDE release 17.01.3 images already
contain a fixed dnsmasq version.
There is no secure workaround available, though the attack surface can
be reduced somewhat by disabling the DNS service part of dnsmasq and
only allowing trusted hosts to obtain DHCP leases in the local
In order to disable the DNS service, issue the following commands:
uci set dhcp. at dnsmasq.port="0"
uci add_list dhcp.lan.dhcp_option="6,22.214.171.124"
uci commit dhcp
This will stop dnsmasq from serving DNS requests and instruct all
DHCP clients to use Google's public DNS server instead of the router
itself for name resolution.
The orginal article published on the Google security blog:
Dnsmasq security notice:
Debian security advisory:
More information about the openwrt-adm