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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | dnsmasq | 2.83-r0 | ALPINE-CVE-2020-25682 |
| Alpine:v3.21 | dnsmasq | 2.83-r0 | ALPINE-CVE-2020-25682 |
| Alpine:v3.22 | dnsmasq | 2.83-r0 | ALPINE-CVE-2020-25682 |
| Alpine:v3.23 | dnsmasq | 2.83-r0 | ALPINE-CVE-2020-25682 |
| Alpine:v3.24 | dnsmasq | 2.83-r0 | ALPINE-CVE-2020-25682 |
| Debian:12 | dnsmasq | 2.83-1 | DEBIAN-CVE-2020-25682 |
| Debian:13 | dnsmasq | 2.83-1 | DEBIAN-CVE-2020-25682 |
| Debian:14 | dnsmasq | 2.83-1 | DEBIAN-CVE-2020-25682 |
Affected products (as reported)
Weakness: CWE-122
References
- https://www.jsof-tech.com/disclosures/dnspooq/ x_refsource_MISC
- https://bugzilla.redhat.com/show_bug.cgi?id=1882014 x_refsource_MISC
- FEDORA-2021-84440e87ba vendor-advisory, x_refsource_FEDORA
- GLSA-202101-17 vendor-advisory, x_refsource_GENTOO
- DSA-4844 vendor-advisory, x_refsource_DEBIAN
- FEDORA-2021-2e4c3d5a9d vendor-advisory, x_refsource_FEDORA
- [debian-lts-announce] 20210322 [SECURITY] [DLA 2604-1] dnsmasq security update mailing-list, x_refsource_MLIST
- https://www.kb.cert.org/vuls/id/434904