
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2020-25681 is a heap-based buffer overflow vulnerability discovered in dnsmasq before version 2.83. The vulnerability exists in the way RRSets are sorted before validating with DNSSEC data. This flaw was discovered by Moshe Kol and Shlomi Oberman of JSOF and was publicly disclosed on January 19, 2021. The vulnerability affects dnsmasq installations where DNSSEC is enabled and compiled (Red Hat Security, NVD).
The vulnerability lies in the sort_rrset() function within dnssec.c and can be triggered in two ways through two different buffers (buff1 and buff2). When get_rdata() returns 0, a memcpy operation is performed with attacker-controlled length parameters derived from the RDLENGTH field of DNS replies. The flaw requires dnsmasq to be compiled with HAVE_DNSSEC flag and DNSSEC enabled (e.g., with --dnssec option). The vulnerability has been assigned a CVSS v3.1 base score of 8.1 HIGH (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H) (Red Hat Bugzilla, NVD).
An attacker who can forge DNS replies that are accepted as valid could exploit this vulnerability to cause a buffer overflow with arbitrary data in a heap memory segment. This could potentially lead to code execution on the machine running dnsmasq. The highest threats from this vulnerability are to data confidentiality and integrity as well as system availability (NVD).
To exploit this vulnerability, an attacker needs to either control a DNS server used in the domain name resolution process or be able to inject packets on the network to trick dnsmasq into accepting them. This requires the ability to guess the ID and random port used. The attacker would also need to trick a victim using dnsmasq into accessing resources on a controlled domain, such as visiting a website or opening an email (Red Hat Bugzilla).
The vulnerability was fixed in dnsmasq version 2.83. For systems unable to update immediately, the only known mitigation is to disable DNSSEC altogether by removing the --dnssec command line option or the dnssec option from the dnsmasq configuration file. Multiple vendors have released security updates to address this vulnerability, including Red Hat, Debian, and Fedora (Red Hat Security, Debian Security).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."