Vulnerability · Published Jan 20, 2021 · Assigned by redhat

CVE-2020-25682

High 8.1

In plain English

A high-severity heap buffer overflow in dnsmasq. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 75.1% (higher than 99.5% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)8.1High
Exploit odds (30 days)75.1%top 0.5% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

A flaw was found in dnsmasq before 2.83. A buffer overflow vulnerability was discovered in the way dnsmasq extract names from DNS packets before validating them with DNSSEC data. An attacker on the network, who can create valid DNS replies, could use this flaw to cause an overflow with arbitrary data in a heap-allocated memory, possibly executing code on the machine. The flaw is in the rfc1035.c:extract_name() function, which writes data to the memory pointed by name assuming MAXDNAME*2 bytes are available in the buffer. However, in some code execution paths, it is possible extract_name() gets passed an offset from the base buffer, thus reducing, in practice, the number of available bytes that can be written in the buffer. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.20dnsmasq2.83-r0ALPINE-CVE-2020-25682
Alpine:v3.21dnsmasq2.83-r0ALPINE-CVE-2020-25682
Alpine:v3.22dnsmasq2.83-r0ALPINE-CVE-2020-25682
Alpine:v3.23dnsmasq2.83-r0ALPINE-CVE-2020-25682
Alpine:v3.24dnsmasq2.83-r0ALPINE-CVE-2020-25682
Debian:12dnsmasq2.83-1DEBIAN-CVE-2020-25682
Debian:13dnsmasq2.83-1DEBIAN-CVE-2020-25682
Debian:14dnsmasq2.83-1DEBIAN-CVE-2020-25682

Affected products (as reported)

VendorProductVersions
n/a dnsmasq dnsmasq 2.83

Weakness: CWE-122

References