UBUNTU-CVE-2023-31137 (CVE-2023-31137)

Vulnerability from osv_ubuntu – Published: 2023-05-09 14:15 – Updated: 2025-09-08 16:56 – Source website
VLAI
Details

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.


{
  "affected": [
    {
      "ecosystem_specific": {
        "availability": "Available with Ubuntu Pro: https://ubuntu.com/pro",
        "binaries": [
          {
            "binary_name": "duende",
            "binary_version": "2.0.13-1ubuntu0.1~esm1"
          },
          {
            "binary_name": "maradns",
            "binary_version": "2.0.13-1ubuntu0.1~esm1"
          },
          {
            "binary_name": "maradns-deadwood",
            "binary_version": "2.0.13-1ubuntu0.1~esm1"
          },
          {
            "binary_name": "maradns-docs",
            "binary_version": "2.0.13-1ubuntu0.1~esm1"
          },
          {
            "binary_name": "maradns-zoneserver",
            "binary_version": "2.0.13-1ubuntu0.1~esm1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:Pro:16.04:LTS",
        "name": "maradns",
        "purl": "pkg:deb/ubuntu/maradns@2.0.13-1ubuntu0.1~esm1?arch=source\u0026distro=esm-apps/xenial"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.0.13-1ubuntu0.1~esm1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "2.0.11-1",
        "2.0.13-1"
      ]
    },
    {
      "ecosystem_specific": {
        "availability": "Available with Ubuntu Pro: https://ubuntu.com/pro",
        "binaries": [
          {
            "binary_name": "duende",
            "binary_version": "2.0.13-1.2ubuntu0.1~esm1"
          },
          {
            "binary_name": "maradns",
            "binary_version": "2.0.13-1.2ubuntu0.1~esm1"
          },
          {
            "binary_name": "maradns-deadwood",
            "binary_version": "2.0.13-1.2ubuntu0.1~esm1"
          },
          {
            "binary_name": "maradns-docs",
            "binary_version": "2.0.13-1.2ubuntu0.1~esm1"
          },
          {
            "binary_name": "maradns-zoneserver",
            "binary_version": "2.0.13-1.2ubuntu0.1~esm1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:Pro:18.04:LTS",
        "name": "maradns",
        "purl": "pkg:deb/ubuntu/maradns@2.0.13-1.2ubuntu0.1~esm1?arch=source\u0026distro=esm-apps/bionic"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.0.13-1.2ubuntu0.1~esm1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "2.0.13-1.2"
      ]
    },
    {
      "ecosystem_specific": {
        "availability": "No subscription required",
        "binaries": [
          {
            "binary_name": "duende",
            "binary_version": "2.0.13-1.4+deb11u1build0.20.04.1"
          },
          {
            "binary_name": "maradns",
            "binary_version": "2.0.13-1.4+deb11u1build0.20.04.1"
          },
          {
            "binary_name": "maradns-deadwood",
            "binary_version": "2.0.13-1.4+deb11u1build0.20.04.1"
          },
          {
            "binary_name": "maradns-docs",
            "binary_version": "2.0.13-1.4+deb11u1build0.20.04.1"
          },
          {
            "binary_name": "maradns-zoneserver",
            "binary_version": "2.0.13-1.4+deb11u1build0.20.04.1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:20.04:LTS",
        "name": "maradns",
        "purl": "pkg:deb/ubuntu/maradns@2.0.13-1.4+deb11u1build0.20.04.1?arch=source\u0026distro=focal"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.0.13-1.4+deb11u1build0.20.04.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "2.0.13-1.2build1",
        "2.0.13-1.4",
        "2.0.13-1.4build1"
      ]
    },
    {
      "ecosystem_specific": {
        "availability": "No subscription required",
        "binaries": [
          {
            "binary_name": "duende",
            "binary_version": "2.0.13-1.4+deb11u1build0.22.04.1"
          },
          {
            "binary_name": "maradns",
            "binary_version": "2.0.13-1.4+deb11u1build0.22.04.1"
          },
          {
            "binary_name": "maradns-deadwood",
            "binary_version": "2.0.13-1.4+deb11u1build0.22.04.1"
          },
          {
            "binary_name": "maradns-docs",
            "binary_version": "2.0.13-1.4+deb11u1build0.22.04.1"
          },
          {
            "binary_name": "maradns-zoneserver",
            "binary_version": "2.0.13-1.4+deb11u1build0.22.04.1"
          }
        ]
      },
      "package": {
        "ecosystem": "Ubuntu:22.04:LTS",
        "name": "maradns",
        "purl": "pkg:deb/ubuntu/maradns@2.0.13-1.4+deb11u1build0.22.04.1?arch=source\u0026distro=jammy"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.0.13-1.4+deb11u1build0.22.04.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "2.0.13-1.4build2"
      ]
    }
  ],
  "aliases": [],
  "details": "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 \u003c= 0)`, which has been incorporated in version 3.5.0036 via commit bab062bde40b2ae8a91eecd522e84d8b993bab58.",
  "id": "UBUNTU-CVE-2023-31137",
  "modified": "2025-09-08T16:56:16Z",
  "published": "2023-05-09T14:15:00Z",
  "references": [
    {
      "type": "REPORT",
      "url": "https://ubuntu.com/security/CVE-2023-31137"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/samboy/MaraDNS/security/advisories/GHSA-58m7-826v-9c3c"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/samboy/MaraDNS/commit/bab062bde40b2ae8a91eecd522e84d8b993bab58"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/samboy/MaraDNS/blob/08b21ea20d80cedcb74aa8f14979ec7c61846663/dns/Decompress.c#L886"
    },
    {
      "type": "ADVISORY",
      "url": "https://ubuntu.com/security/notices/USN-6271-1"
    },
    {
      "type": "REPORT",
      "url": "https://www.cve.org/CVERecord?id=CVE-2023-31137"
    }
  ],
  "related": [
    "USN-6271-1"
  ],
  "schema_version": "1.7.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    },
    {
      "score": "medium",
      "type": "Ubuntu"
    }
  ],
  "upstream": [
    "CVE-2023-31137"
  ]
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…