In NLnet Labs Unbound 1.22.0 up to and including 1.25.1, a remote unauthenticated client can trigger a libngtcp2 assertion (if compiled…
NLnet Labs·CWE-195·Published 2026-07-22
In NLnet Labs Unbound 1.22.0 up to and including 1.25.1, a remote unauthenticated client can trigger a libngtcp2 assertion (if compiled with assertions on) and terminate the entire Unbound process using a single DNS-over-QUIC (DoQ) connection and one normal DNS query. This is caused by an erroneous error value passed to libngtcp2. When 'ngtcp2_conn_writev_stream()' returns 'NGTCP2_ERR_STREAM_DATA_BLOCKED', Unbound continues to call 'ngtcp2_ccerr_set_application_error()' with a '-1' error value. The 'int' literal '-1' is implicitly converted to the function's 'uint64_t error_code' parameter as '0xFFFFFFFFFFFFFFFF'. The follow-on 'ngtcp2_conn_write_connection_close()' serialises that value as a QUIC variable-length integer; because '2^64-1' exceeds the 62-bit varint ceiling, 'ngtcp2_put_uvarintlen()' fails 'assert(n < 4611686018427387904ULL)' and the whole resolver process aborts. A remote, unauthenticated DoQ client can trigger this deterministically with a single QUIC connection by advertising 'initial_max_stream_data_bidi_local = 1' in its transport parameters and sending one DoQ query without ever reading the stream.
In NLnet Labs Unbound 1.22.0 up to and including 1.25.1, a remote unauthenticated client can trigger a libngtcp2 assertion (if compiled with assertions on) and terminate the entire Unbound process using a single DNS-over-QUIC (DoQ) connection and one normal DNS query. This is caused by an erroneous error value passed to libngtcp2. When 'ngtcp2_conn_writev_stream()' returns 'NGTCP2_ERR_STREAM_DATA_BLOCKED', Unbound continues to call 'ngtcp2_ccerr_set_application_error()' with a '-1' error value. The 'int' literal '-1' is implicitly converted to the function's 'uint64_t error_code' parameter as '0xFFFFFFFFFFFFFFFF'. The follow-on 'ngtcp2_conn_write_connection_close()' serialises that value as a QUIC variable-length integer; because '2^64-1' exceeds the 62-bit varint ceiling, 'ngtcp2_put_uvarintlen()' fails 'assert(n < 4611686018427387904ULL)' and the whole resolver process aborts. A remote, unauthenticated DoQ client can trigger this deterministically with a single QUIC connection by advertising 'initial_max_stream_data_bidi_local = 1' in its transport parameters and sending one DoQ query without ever reading the stream.
En NLnet Labs Unbound 1.22.0 hasta la versión 1.25.1 inclusive, un cliente remoto no autenticado puede activar una aserción de libngtcp2 (si se compila con aserciones activadas) y terminar todo el proceso de Unbound utilizando una única conexión DNS-over-QUIC (DoQ) y una consulta DNS normal. Esto es causado por un valor de error erróneo pasado a libngtcp2. Cuando ’ngtcp2_conn_writev_stream()’ devuelve ’NGTCP2_ERR_STREAM_DATA_BLOCKED’, Unbound continúa llamando a ’ngtcp2_ccerr_set_application_error()’ con un valor de error de ’-1’. El literal ’int’ ’-1’ se convierte implícitamente al parámetro ’uint64_t error_code’ de la función como ’0xFFFFFFFFFFFFFFFF’. La subsiguiente ’ngtcp2_conn_write_connection_close()’ serializa ese valor como un entero de longitud variable QUIC; debido a que ’2^64-1’ excede el límite de varint de 62 bits, ’ngtcp2_put_uvarintlen()’ falla en ’assert(n < 4611686018427387904ULL)’ y todo el proceso del resolvedor se aborta. Un cliente DoQ remoto no autenticado puede activar esto de forma determinista con una única conexión QUIC al anunciar ’initial_max_stream_data_bidi_local = 1’ en sus parámetros de transporte y enviando una consulta DoQ sin leer nunca el flujo.
| Version | Type | Source | Base | Exp | Impact | Vector |
|---|---|---|---|---|---|---|
| 3.1 | Primary | cve.org | 5.9 | — | — | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| 3.1 | Secondary | NVD | 5.9 | 2.2 | 3.6 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| 3.1 | Secondary | ENISA EUVD | 5.9 | — | — | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |