CVE Database›Document archive›CVE-2020-25687

CVE-2020-25687

dnsmasq: heap-based buffer overflow with large memcpy in sort_rrset() when DNSSEC is enabled

Loading…

Severity

Moderate

Red Hat Product Security

5.9

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 dnsmasq when DNSSEC is enabled and before it validates the received DNS entries. This flaw allows a remote attacker, who can create valid DNS replies, to cause an overflow in a heap-allocated memory. This flaw is caused by the lack of length checks in rfc1035.c:extract_name(), which could be abused to make the code execute memcpy() with a negative size in sort_rrset() and cause a crash in dnsmasq, resulting in a denial of service. The highest threat from this vulnerability is to 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 · 5.9
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

CWE-122 · Heap-based Buffer Overflow