Integer Underflow (Wrap or Wraparound) Affecting maradns package, versions [,3.4.10)[3.5.0001,3.5.0036)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
1.14% (63rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UNMANAGED-MARADNS-5508568
  • published10 May 2023
  • disclosed10 May 2023
  • credithtejeda

Introduced: 10 May 2023

CVE-2023-31137  (opens in a new tab)
CWE-191  (opens in a new tab)

How to fix?

Upgrade maradns to version 3.4.10, 3.5.0036 or higher.

Overview

Affected versions of this package are vulnerable to Integer Underflow (Wrap or Wraparound) via the packet decompression function allowing an attacker to cause a 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.

CVSS Base Scores

version 3.1