A memory exhaustion flaw was found in dnsmasq in the EDNS0 code. An attacker could send crafted DNS packets which would trigger memory allocations which would never be freed, leading to unbounded memory consumption and eventually a crash. This issue only affected configurations using one of the options: add-mac, add-cpe-id, or add-subnet.
Red Hat Product Security has been made aware of an Denial of Service vulnerability affecting the DNS implementation of dnsmasq.
Name: Felix Wilhelm (Google Security Team), Fermin J. Serna (Google Security Team), Gabriel Campana (Google Security Team), Kevin Hamacher (Google Security Team), Ron Bowes (Google Security Team)
Versions of dnsmasq shipped with Red Hat Enterprise Linux 6 and 5 do not include the EDNS0 code which includes this flaw.
Further details from the 2.78 pre-release CHANGELOG:
Fix out-of-memory Dos vulnerability. An attacker which can
send malicious DNS queries to dnsmasq can trigger memory
allocations in the add_pseudoheader function
The allocated memory is never freed which leads to a DoS
through memory exhaustion. dnsmasq is vulnerable only
if one of the following option is specified:
--add-mac, --add-cpe-id or --add-subnet.
Credit to Felix Wilhelm, Fermin J. Serna, Gabriel Campana
and Kevin Hamacher of the Google Security Team for
Created attachment 1330994 [details]
Relevant memory allocation that was not freed properly was added in this commit:
The first upstream version including this change is 2.76.
Created dnsmasq tracking bugs for this issue:
Affects: fedora-all [bug 1497691]
Google Security Team's repository with test cases:
This issue has been addressed in the following products:
Red Hat Enterprise Linux 7
Via RHSA-2017:2836 https://access.redhat.com/errata/RHSA-2017:2836
Red Hat OpenStack Platform includes the dnsmasq-utils RPM which does not contain this flaw's affected code-paths; Red Hat OpenStack Platform is therefore listed as not affected.
However, because all versions of Red Hat OpenStack Platform are based on Red Hat Enterprise Linux, all Red Hat OpenStack Platform users should absolutely upgrade the dnsmasq RPM from Red Hat Enterprise Linux as a matter of urgency using standard update mechanisms (such as 'yum update' or 'openstack overcloud update').