Every CVE Search/ Get API key

CVE-2023-31137

MaraDNS Integer Underflow Vulnerability in DNS Packet Decompression

7.5 HighFix available

MaraDNS is open-source software that implements the Domain Name System (DNS). In version 3.5.0024 and prior, a remotely exploitable integer underflow vulnerability in the DNS packet decompression function allows an attacker to cause a Denial of Service by triggering an abnormal program termination.

The vulnerability exists in the decomp_get_rddata function within the Decompress.c file. When handling a DNS packet with an Answer RR of qtype 16 (TXT record) and any qclass, if the rdlength is smaller than rdata, the result of the line Decompress.c:886 is a negative number len = rdlength - total;. This value is then passed to the decomp_append_bytes function without proper validation, causing the program to attempt to allocate a massive chunk of memory that is impossible to allocate. Consequently, the program exits with an error code of 64, causing a Denial of Service.

One proposed fix for this vulnerability is to patch Decompress.c:887 by breaking if(len <= 0), which has been incorporated in version 3.5.0036 via commit bab062bde40b2ae8a91eecd522e84d8b993bab58.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

1.14%Up 1.1 points since May 10, 2023
90%50%10%1%

What each source reports

CVE List Score used 7.5

MaraDNS Integer Underflow Vulnerability in DNS Packet Decompression

MaraDNS is open-source software that implements the Domain Name System (DNS). In version 3.5.0024 and prior, a remotely exploitable integer underflow vulnerability in the DNS packet decompression function allows an attacker to cause a Denial of Service by triggering an abnormal program termination.

The vulnerability exists in the decomp_get_rddata function within the Decompress.c file. When handling a DNS packet with an Answer RR of qtype 16 (TXT record) and any qclass, if the rdlength is smaller than rdata, the result of the line Decompress.c:886 is a negative number len = rdlength - total;. This value is then passed to the decomp_append_bytes function without proper validation, causing the program to attempt to allocate a massive chunk of memory that is impossible to allocate. Consequently, the program exits with an error code of 64, causing a Denial of Service.

One proposed fix for this vulnerability is to patch Decompress.c:887 by breaking if(len <= 0), which has been incorporated in version 3.5.0036 via commit bab062bde40b2ae8a91eecd522e84d8b993bab58.

Record
CVE-2023-31137
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-191
Updated
2026-11-02
EUVDEUVD-2023-35457 7.5

MaraDNS is open-source software that implements the Domain Name System (DNS). In version 3.5.0024 and prior, a remotely exploitable integer underflow vulnerability in the DNS packet decompression function allows an attacker to cause a Denial of Service by triggering an abnormal program termination.

The vulnerability exists in the decomp_get_rddata function within the Decompress.c file. When handling a DNS packet with an Answer RR of qtype 16 (TXT record) and any qclass, if the rdlength is smaller than rdata, the result of the line Decompress.c:886 is a negative number len = rdlength - total;. This value is then passed to the decomp_append_bytes function without proper validation, causing the program to attempt to allocate a massive chunk of memory that is impossible to allocate. Consequently, the program exits with an error code of 64, causing a Denial of Service.

One proposed fix for this vulnerability is to patch Decompress.c:887 by breaking if(len <= 0), which has been incorporated in version 3.5.0036 via commit bab062bde40b2ae8a91eecd522e84d8b993bab58.

Record
EUVD-2023-35457
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-03
NVD 7.5

MaraDNS is open-source software that implements the Domain Name System (DNS). In version 3.5.0024 and prior, a remotely exploitable integer underflow vulnerability in the DNS packet decompression function allows an attacker to cause a Denial of Service by triggering an abnormal program termination.

The vulnerability exists in the decomp_get_rddata function within the Decompress.c file. When handling a DNS packet with an Answer RR of qtype 16 (TXT record) and any qclass, if the rdlength is smaller than rdata, the result of the line Decompress.c:886 is a negative number len = rdlength - total;. This value is then passed to the decomp_append_bytes function without proper validation, causing the program to attempt to allocate a massive chunk of memory that is impossible to allocate. Consequently, the program exits with an error code of 64, causing a Denial of Service.

One proposed fix for this vulnerability is to patch Decompress.c:887 by breaking if(len <= 0), which has been incorporated in version 3.5.0036 via commit bab062bde40b2ae8a91eecd522e84d8b993bab58.

Record
CVE-2023-31137
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-191
Updated
2026-11-02
OSV 7.5

MaraDNS Integer Underflow Vulnerability in DNS Packet Decompression

MaraDNS is open-source software that implements the Domain Name System (DNS). In version 3.5.0024 and prior, a remotely exploitable integer underflow vulnerability in the DNS packet decompression function allows an attacker to cause a Denial of Service by triggering an abnormal program termination.

The vulnerability exists in the decomp_get_rddata function within the Decompress.c file. When handling a DNS packet with an Answer RR of qtype 16 (TXT record) and any qclass, if the rdlength is smaller than rdata, the result of the line Decompress.c:886 is a negative number len = rdlength - total;. This value is then passed to the decomp_append_bytes function without proper validation, causing the program to attempt to allocate a massive chunk of memory that is impossible to allocate. Consequently, the program exits with an error code of 64, causing a Denial of Service.

One proposed fix for this vulnerability is to patch Decompress.c:887 by breaking if(len <= 0), which has been incorporated in version 3.5.0036 via commit bab062bde40b2ae8a91eecd522e84d8b993bab58.

Record
CVE-2023-31137
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-191
Updated
2026-11-02
OSVDEBIAN-CVE-2023-31137 7.5

MaraDNS is open-source software that implements the Domain Name System (DNS). In version 3.5.0024 and prior, a remotely exploitable integer underflow vulnerability in the DNS packet decompression function allows an attacker to cause a Denial of Service by triggering an abnormal program termination. The vulnerability exists in the decomp_get_rddata function within the Decompress.c file. When handling a DNS packet with an Answer RR of qtype 16 (TXT record) and any qclass, if the rdlength is smaller than rdata, the result of the line Decompress.c:886 is a negative number len = rdlength - total;. This value is then passed to the decomp_append_bytes function without proper validation, causing the program to attempt to allocate a massive chunk of memory that is impossible to allocate. Consequently, the program exits with an error code of 64, causing a Denial of Service. One proposed fix for this vulnerability is to patch Decompress.c:887 by breaking if(len <= 0), which has been incorporated in version 3.5.0036 via commit bab062bde40b2ae8a91eecd522e84d8b993bab58.

Record
DEBIAN-CVE-2023-31137
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2023-31137 7.5

MaraDNS is open-source software that implements the Domain Name System (DNS). In version 3.5.0024 and prior, a remotely exploitable integer underflow vulnerability in the DNS packet decompression function allows an attacker to cause a Denial of Service by triggering an abnormal program termination. The vulnerability exists in the decomp_get_rddata function within the Decompress.c file. When handling a DNS packet with an Answer RR of qtype 16 (TXT record) and any qclass, if the rdlength is smaller than rdata, the result of the line Decompress.c:886 is a negative number len = rdlength - total;. This value is then passed to the decomp_append_bytes function without proper validation, causing the program to attempt to allocate a massive chunk of memory that is impossible to allocate. Consequently, the program exits with an error code of 64, causing a Denial of Service. One proposed fix for this vulnerability is to patch Decompress.c:887 by breaking if(len <= 0), which has been incorporated in version 3.5.0036 via commit bab062bde40b2ae8a91eecd522e84d8b993bab58.

Record
UBUNTU-CVE-2023-31137
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVUSN-6271-1 No score

maradns vulnerabilities

Xiang Li discovered that MaraDNS incorrectly handled certain inputs. If a user or an automated system were tricked into opening a specially crafted input file, a remote attacker could possibly use this issue to obtain sensitive information. (CVE-2022-30256)

Huascar Tejeda discovered that MaraDNS incorrectly handled certain inputs. If a user or an automated system were tricked into opening a specially crafted input file, a remote attacker could possibly use this issue to cause a denial of service. (CVE-2023-31137)

Record
USN-6271-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
maradns
Debian:11
before 2.0.13-1.4+deb11u1, plus listed versions
2.0.13-1.4
2.0.13-1.4+deb11u1
maradns
Debian:10
From an advisory covering 2 CVEs
before 2.0.13-1.2+deb10u1, plus listed versions
2.0.13-1.2
2.0.13-1.2+deb10u1
maradns
Debian:11
From an advisory covering 2 CVEs
before 2.0.13-1.4+deb11u1, plus listed versions
2.0.13-1.4
2.0.13-1.4+deb11u1
maradns
Ubuntu:Pro:16.04:LTS
before 2.0.13-1ubuntu0.1~esm1, plus listed versions
2.0.11-12.0.13-1
2.0.13-1ubuntu0.1~esm1
maradns
Ubuntu:Pro:18.04:LTS
before 2.0.13-1.2ubuntu0.1~esm1, plus listed versions
2.0.13-1.2
2.0.13-1.2ubuntu0.1~esm1
maradns
Ubuntu:20.04:LTS
before 2.0.13-1.4+deb11u1build0.20.04.1, plus listed versions
2.0.13-1.2build12.0.13-1.42.0.13-1.4build1
2.0.13-1.4+deb11u1build0.20.04.1
maradns
Ubuntu:22.04:LTS
before 2.0.13-1.4+deb11u1build0.22.04.1, plus listed versions
2.0.13-1.4build2
2.0.13-1.4+deb11u1build0.22.04.1
maradns
Ubuntu:Pro:16.04:LTS
From an advisory covering 2 CVEs
before 2.0.13-1ubuntu0.1~esm1, plus listed versions
2.0.11-12.0.13-1
2.0.13-1ubuntu0.1~esm1
maradns
Ubuntu:Pro:18.04:LTS
From an advisory covering 2 CVEs
before 2.0.13-1.2ubuntu0.1~esm1, plus listed versions
2.0.13-1.2
2.0.13-1.2ubuntu0.1~esm1
maradns
Ubuntu:20.04:LTS
From an advisory covering 2 CVEs
before 2.0.13-1.4+deb11u1build0.20.04.1, plus listed versions
2.0.13-1.2build12.0.13-1.42.0.13-1.4build1
2.0.13-1.4+deb11u1build0.20.04.1
maradns
Ubuntu:22.04:LTS
From an advisory covering 2 CVEs
before 2.0.13-1.4+deb11u1build0.22.04.1, plus listed versions
2.0.13-1.4build2
2.0.13-1.4+deb11u1build0.22.04.1

History

History
RecordedChangedSources
affected, facts
aliases, publishedEUVD
first indexedCVE List, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2023-31137 is a high vulnerability (CVSS 7.5) in Maradns, published May 9, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.14%, the 66th percentile. Fixed in maradns 2.0.13-1.4+deb11u1.

References

Show 8 moreShow less
MoveEnter Open