CVE-2020-25681
dnsmasq: heap-based buffer overflow in sort_rrset() when DNSSEC is enabled
Severity
ImportantRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · January 19, 2021
Updated · November 21, 2025
Description
A flaw was found in dnsmasq. A heap-based buffer overflow was discovered in the way RRSets are sorted before validating with DNSSEC data. An attacker on the network, who can forge DNS replies such as that they are accepted as valid, could use this flaw to cause a buffer overflow with arbitrary data in a heap memory segment, possibly executing code on the machine. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.
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.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
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.
CVSS / CWE
CVSS 3.1 · 8.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CWE-122 · Heap-based Buffer Overflow