# CVE-2023-31137: maradns: MaraDNS is open-source software that implements the Domain Name System (DNS)

CVE-2023-31137 is fixed in 5 products on 1 platform, first by duende 2.0.13-1.2ubuntu0.1~esm1, released May 9, 2023. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2023-31137
- Priority: High
- CVSS: 7.5 (high)
- EPSS: 0.0114
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: May 9, 2023

## Description

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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | duende Ubuntu 18.04.6 LTS (bionic) | 2.0.13-1.2ubuntu0.1~esm1 | [duende 2.0.13-1.2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-duende-2.0.13-1.2ubuntu0.1-esm1.md) | May 9, 2023 |
| Linux | duende Ubuntu 20.04 LTS (focal) | 2.0.13-1.4+deb11u1build0.20.04.1 | [duende 2.0.13-1.4+deb11u1build0.20.04.1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-duende-2.0.13-1.4-deb11u1build0.20.04.1.md) | May 9, 2023 |
| Linux | duende Ubuntu 22.04.1 LTS (jammy) | 2.0.13-1.4+deb11u1build0.22.04.1 | [duende 2.0.13-1.4+deb11u1build0.22.04.1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-duende-2.0.13-1.4-deb11u1build0.22.04.1.md) | May 9, 2023 |
| Linux | maradns Debian 11.6 (bullseye) | 2.0.13-1.4+deb11u1 | [DEBIAN-CVE-2023-31137](https://patchblox.com/security/data/fix/linux/debian-cve-2023-31137.md) | May 9, 2023 |
| Linux | maradns Ubuntu 18.04.6 LTS (bionic) | 2.0.13-1.2ubuntu0.1~esm1 | [maradns 2.0.13-1.2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-maradns-2.0.13-1.2ubuntu0.1-esm1.md) | May 9, 2023 |
| Linux | maradns Ubuntu 20.04 LTS (focal) | 2.0.13-1.4+deb11u1build0.20.04.1 | [maradns 2.0.13-1.4+deb11u1build0.20.04.1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-maradns-2.0.13-1.4-deb11u1build0.20.04.1.md) | May 9, 2023 |
| Linux | maradns Ubuntu 22.04.1 LTS (jammy) | 2.0.13-1.4+deb11u1build0.22.04.1 | [maradns 2.0.13-1.4+deb11u1build0.22.04.1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-maradns-2.0.13-1.4-deb11u1build0.22.04.1.md) | May 9, 2023 |
| Linux | maradns-deadwood Ubuntu 18.04.6 LTS (bionic) | 2.0.13-1.2ubuntu0.1~esm1 | [maradns-deadwood 2.0.13-1.2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-maradns-deadwood-2.0.13-1.2ubuntu0.1-esm1.md) | May 9, 2023 |
| Linux | maradns-deadwood Ubuntu 20.04 LTS (focal) | 2.0.13-1.4+deb11u1build0.20.04.1 | [maradns-deadwood 2.0.13-1.4+deb11u1build0.20.04.1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-maradns-deadwood-2.0.13-1.4-deb11u1build0.20.04.1.md) | May 9, 2023 |
| Linux | maradns-deadwood Ubuntu 22.04.1 LTS (jammy) | 2.0.13-1.4+deb11u1build0.22.04.1 | [maradns-deadwood 2.0.13-1.4+deb11u1build0.22.04.1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-maradns-deadwood-2.0.13-1.4-deb11u1build0.22.04.1.md) | May 9, 2023 |
| Linux | maradns-docs Ubuntu 18.04.6 LTS (bionic) | 2.0.13-1.2ubuntu0.1~esm1 | [maradns-docs 2.0.13-1.2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-maradns-docs-2.0.13-1.2ubuntu0.1-esm1.md) | May 9, 2023 |
| Linux | maradns-docs Ubuntu 20.04 LTS (focal) | 2.0.13-1.4+deb11u1build0.20.04.1 | [maradns-docs 2.0.13-1.4+deb11u1build0.20.04.1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-maradns-docs-2.0.13-1.4-deb11u1build0.20.04.1.md) | May 9, 2023 |
| Linux | maradns-docs Ubuntu 22.04.1 LTS (jammy) | 2.0.13-1.4+deb11u1build0.22.04.1 | [maradns-docs 2.0.13-1.4+deb11u1build0.22.04.1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-maradns-docs-2.0.13-1.4-deb11u1build0.22.04.1.md) | May 9, 2023 |
| Linux | maradns-zoneserver Ubuntu 18.04.6 LTS (bionic) | 2.0.13-1.2ubuntu0.1~esm1 | [maradns-zoneserver 2.0.13-1.2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-maradns-zoneserver-2.0.13-1.2ubuntu0.1-esm1.md) | May 9, 2023 |
| Linux | maradns-zoneserver Ubuntu 20.04 LTS (focal) | 2.0.13-1.4+deb11u1build0.20.04.1 | [maradns-zoneserver 2.0.13-1.4+deb11u1build0.20.04.1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-maradns-zoneserver-2.0.13-1.4-deb11u1build0.20.04.1.md) | May 9, 2023 |
| Linux | maradns-zoneserver Ubuntu 22.04.1 LTS (jammy) | 2.0.13-1.4+deb11u1build0.22.04.1 | [maradns-zoneserver 2.0.13-1.4+deb11u1build0.22.04.1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-maradns-zoneserver-2.0.13-1.4-deb11u1build0.22.04.1.md) | May 9, 2023 |

---

Data as of 2026-11-08T19:12:23Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
