dnsmasq: buffer overflow in extract_name() due to missing length check when DNSSEC is enabled
Published Jan 20, 2021
8.1
HIGHCVSS 3.1
EPSS 70.75%
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 products
- Vendor n/a Product Dnsmasq Defaultn/a
- Version dnsmasq 2.83StatusaffectedConstraints-
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| n/a | Dnsmasq | n/a |
|
Configuration 1
- < 2.83
Configuration 2
- 32
- 33
Configuration 3
- 9.0
- 10.0
No data.
Red Hat Enterprise Linux 8
dnsmasq-0:2.79-13.el8_3.1
Fixed · RHSA-2021:0150
Red Hat Enterprise Linux 8.1 Extended Update Support
dnsmasq-0:2.79-6.el8_1.1
Fixed · RHSA-2021:0152
Red Hat Enterprise Linux 8.2 Extended Update Support
dnsmasq-0:2.79-11.el8_2.2
Fixed · RHSA-2021:0151
Red Hat Enterprise Linux 5
dnsmasq
Not affected
Red Hat Enterprise Linux 6
dnsmasq
Not affected
Red Hat Enterprise Linux 7
dnsmasq
Not affected
Red Hat Enterprise Linux 9
dnsmasq
Not affected
Red Hat OpenStack Platform 10 (Newton)
dnsmasq
Not affected
Red Hat OpenStack Platform 13 (Queens)
dnsmasq
Not affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 8 | dnsmasq-0:2.79-13.el8_3.1 | Fixed | RHSA-2021:0150 |
| Red Hat Enterprise Linux 8.1 Extended Update Support | dnsmasq-0:2.79-6.el8_1.1 | Fixed | RHSA-2021:0152 |
| Red Hat Enterprise Linux 8.2 Extended Update Support | dnsmasq-0:2.79-11.el8_2.2 | Fixed | RHSA-2021:0151 |
| Red Hat Enterprise Linux 5 | dnsmasq | Not affected | n/a |
| Red Hat Enterprise Linux 6 | dnsmasq | Not affected | n/a |
| Red Hat Enterprise Linux 7 | dnsmasq | Not affected | n/a |
| Red Hat Enterprise Linux 9 | dnsmasq | Not affected | n/a |
| Red Hat OpenStack Platform 10 (Newton) | dnsmasq | Not affected | n/a |
| Red Hat OpenStack Platform 13 (Queens) | dnsmasq | Not affected | n/a |
No package ranges for this CVE.
Remediation
Red Hat statement
This issue does not affect the versions of dnsmasq as shipped with Red Hat Enterprise Linux 5, 6, and 7 as they are not compiled with DNSSEC support.
Red Hat mitigation
The only known way to mitigate this flaw is to disable DNSSEC altogether, by removing the `--dnssec` command line option or the `dnssec` option from dnsmasq configuration file.
References (12)
- https://access.redhat.com/security/cve/CVE-2020-25682 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=1882014 x_refsource_MISCIssue TrackingPatchThird Party Advisory
- https://euvd.enisa.europa.eu/vulnerability/EUVD-2020-18344 Advisory
- https://lists.debian.org/debian-lts-announce/2021/03/msg00027.html mailing-listx_refsource_MLISTMailing ListThird Party Advisory
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QGB7HL3OWHTLEPSMLDGOMXQKG3KM2QME/ vendor-advisoryx_refsource_FEDORA
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WYW3IR6APUSKOYKL5FT3ACTIHWHGQY32/ vendor-advisoryx_refsource_FEDORA
- https://nvd.nist.gov/vuln/detail/CVE-2020-25682
- https://security.gentoo.org/glsa/202101-17 vendor-advisoryx_refsource_GENTOOThird Party Advisory
- https://www.cve.org/CVERecord?id=CVE-2020-25682
- https://www.debian.org/security/2021/dsa-4844 vendor-advisoryx_refsource_DEBIANThird Party Advisory
- https://www.jsof-tech.com/disclosures/dnspooq/ x_refsource_MISCThird Party Advisory
- https://www.kb.cert.org/vuls/id/434904
Change history (0)
No recorded changes yet.