4.8medium
Possible heap buffer overflow when validator canonicalizes RDATA that contains domain name
- Severity
- 4.8medium CVSS:3.1 by NLnet Labs
- Exploit likelihood
- 0.12% (higher than 2% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- NLnet Labs
Description
In NLnet Labs Unbound up to and including version 1.25.1, when the validator builds the canonical RDATA form for an RRSIG-covered PX/RP/MINFO/SOA RRset, it computes the address of the second embedded domain name as 'datstart + dname_valid(datstart, ...)' and passes it straight to 'query_dname_tolower()' without checking that a second name is actually present in the RDATA. The wire-format parser accepts multi-dname RRs whose RDATA ends after the first name, so an attacker who runs a DNSSEC-signed authoritative server can deliver a record with an absent second domain name (e.g. SOA record) and cause 'query_dname_tolower()' to walk label-by-label through stale bytes in the per-worker 'env->scratch_buffer', past the end of that heap allocation if 'msg-buffer-size' has been lowered from the default. This leads to heap buffer overflow and on a release build the outcome relies heavily on the contents of the buffer tail and the adjacent heap chunk.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| NLnet Labs Unbound | before 1.25.2 | CVE List |
| nlnetlabs unbound | before 1.25.2 | NVD |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
In NLnet Labs Unbound up to and including version 1.25.1, when the validator builds the canonical RDATA form for an RRSIG-covered PX/RP/MINFO/SOA RRset, it computes the address of the second embedded domain name as 'datstart + dname_valid(datstart, ...)' and passes it straight to 'query_dname_tolower()' without checking that a second name is actually present in the RDATA. The wire-format parser accepts multi-dname RRs whose RDATA ends after the first name, so an attacker who runs a DNSSEC-signed authoritative server can deliver a record with an absent second domain name (e.g. SOA record) and cause 'query_dname_tolower()' to walk label-by-label through stale bytes in the per-worker 'env->scratch_buffer', past the end of that heap allocation if 'msg-buffer-size' has been lowered from the default. This leads to heap buffer overflow and on a release build the outcome relies heavily on the contents of the buffer tail and the adjacent heap chunk.
NVD (es)
En NLnet Labs Unbound hasta la versión 1.25.1 inclusive, cuando el validador construye la forma canónica de RDATA para un conjunto de RR PX/RP/MINFO/SOA cubierto por RRSIG, calcula la dirección del segundo nombre de dominio incrustado como ’datstart + dname_valid(datstart, ...)’ y lo pasa directamente a ’query_dname_tolower()’ sin verificar que un segundo nombre esté realmente presente en el RDATA. El analizador de formato de cable acepta RRs multi-dname cuyo RDATA termina después del primer nombre, por lo que un atacante que ejecuta un servidor autoritativo firmado con DNSSEC puede entregar un registro con un segundo nombre de dominio ausente (p. ej., registro SOA) y hacer que ’query_dname_tolower()’ recorra etiqueta por etiqueta bytes obsoletos en el ’env -> scratch_buffer’ por trabajador, más allá del final de esa asignación de pila si ’msg-buffer-size’ se ha reducido del valor predeterminado. Esto conduce a un desbordamiento de búfer de pila y en una compilación de lanzamiento el resultado depende en gran medida del contenido de la cola del búfer y del fragmento de pila adyacente.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-56416 changed 2026-07-22 | CVE Terms of Use |
| NVD | CVE-2026-56416 changed 2026-10-24 | Public domain |