CVE Vulnerabilities

CVE-2026-55991

Signed to Unsigned Conversion Error

Published: Jul 22, 2026 | Modified: Jul 22, 2026
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
RedHat/V2
RedHat/V3
Ubuntu
MEDIUM
root.io logo minimus.io logo echo.ai logo

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 functions 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.

Weakness

The product uses a signed primitive and performs a cast to an unsigned primitive, which can produce an unexpected value if the value of the signed primitive can not be represented using an unsigned primitive.

Affected Software

NameVendorStart VersionEnd Version
UnboundUbuntuupstream*

Extended Description

It is dangerous to rely on implicit casts between signed and unsigned numbers because the result can take on an unexpected value and violate assumptions made by the program. Often, functions will return negative values to indicate a failure. When the result of a function is to be used as a size parameter, using these negative return values can have unexpected results. For example, if negative size values are passed to the standard memory copy or allocation functions they will be implicitly cast to a large unsigned value. This may lead to an exploitable buffer overflow or underflow condition.

References