cve.bz

CVE-2023-31137 Integer Underflow (Wrap or Wraparound)

7.5 highEPSS 1.1%Fix available

High (7.5). EPSS 1.1% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
1.1% (unchanged from 1.1% a week ago; 1.1% 30 days ago) estimated probability of exploitation activity in the next 30 days; 68th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: partial, assessed 2024-03-08. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-191 Integer Underflow (Wrap or Wraparound)
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2023-31137 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-31137?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-31137?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2023-31137 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
maradns:maradnsbefore 3.4.10
maradns:maradnsfrom 3.5.0001 before 3.5.0036
fedoraproject:fedora37
fedoraproject:fedora38
debian:debian_linux10.0
debian:debian_linux11.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10maradns2.0.13-1.2+deb10u1DLA-3457-1
Debian11maradns2.0.13-1.4+deb11u1DEBIAN-CVE-2023-31137 DSA-5441-1
Ubuntu20.04:LTSmaradns2.0.13-1.4+deb11u1build0.20.04.1UBUNTU-CVE-2023-31137 USN-6271-1
Ubuntu22.04:LTSmaradns2.0.13-1.4+deb11u1build0.22.04.1UBUNTU-CVE-2023-31137 USN-6271-1
UbuntuPro:16.04:LTSmaradns2.0.13-1ubuntu0.1~esm1UBUNTU-CVE-2023-31137 USN-6271-1
UbuntuPro:18.04:LTSmaradns2.0.13-1.2ubuntu0.1~esm1UBUNTU-CVE-2023-31137 USN-6271-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

References

Check your stackJSON