GHSA-4q67-8385-j6m5: Out-of-bounds reads in NetX Secure client-side handshake parsing (ServerHello and HelloVerifyRequest)

GHSA ID

GHSA‑4q67‑8385‑j6m5

CVE ID

CVE‑2026‑102728

Severity

Medium

CWE

CWE-126

Published

2026‑11‑01

Last updated

2026‑11‑01

Affected packages

Package Vulnerable versions Patched versions

NetX Duo

>= 6.0, ⇐ 6.5.2.202603a

6.5.2.202603b

Description

Summary

Two client-side handshake parsers in NetX Secure read fields from a server-supplied message before checking that the message is long enough to contain them. _nx_secure_tls_process_serverhello() reads the ciphersuite and compression method that follow the session ID without a bound, up to three bytes past the end of a ServerHello. _nx_secure_dtls_process_helloverifyrequest() reads the cookie length before any minimum-length check, one byte past an empty HelloVerifyRequest. In both cases the length check exists, but runs after the read it should guard.

Details

_nx_secure_tls_process_serverhello() requires a ServerHello of at least 38 bytes and bounds the session ID against the message length, but that bound allows the session ID to end exactly at the end of the message. The two ciphersuite bytes are then read immediately past the message, and, if they name a ciphersuite the client supports, the compression method byte after them. The parser is used by the TLS 1.2, TLS 1.3 and DTLS client handshakes. The mirror-image server-side parser, _nx_secure_tls_process_clienthello(), bounds every field after the session ID.

_nx_secure_dtls_process_helloverifyrequest() has no minimum length. It reads the cookie length at offset 2 and only then compares the cookie against the message length. _nx_secure_dtls_client_handshake() accepts a handshake message whose declared length is zero and passes it to the parser, so a bare 12-byte DTLS handshake header with no body reaches the read.

Handshake messages are copied into the session’s application-supplied packet buffer before parsing, so the bytes read past a message are normally stale bytes still in that buffer from earlier traffic. The read leaves the buffer only when the message ends exactly at its last byte.

Impact

A TLS or DTLS client reads up to three bytes past a handshake message sent by a malicious server or modified by an on-path attacker. For DTLS, an attacker who can inject datagrams that appear to come from the server can also reach both parsers.

The ServerHello bytes become the selected ciphersuite and compression method. That grants nothing a malicious server could not choose in a well-formed ServerHello, and a truncation by an on-path attacker is detected when the handshake’s Finished messages fail to verify. The HelloVerifyRequest byte becomes the cookie length, which is immediately rejected and reset. Neither value is returned to the peer, so there is no disclosure path. On a target with memory protection, a read that crosses the end of the packet buffer can fault the calling thread; that requires the message to end exactly at the end of the buffer.

Affected configurations

Applications that use NetX Secure as a TLS or DTLS client. The HelloVerifyRequest read additionally requires a build with NX_SECURE_ENABLE_DTLS. Server-only use is not affected.

Affected versions: [6.0, 6.5.2.202603a]. Both reads date from the first release.

Severity

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N, CVSS-B 6.3 (Medium). CWE-126: Buffer Over-read.

VC:N and VI:N because nothing reaches the peer and the selected ciphersuite is one a malicious server could choose directly. VA:L for the fault on memory-protected targets, and AT:P because that fault requires the message to end exactly at the end of the target’s packet buffer.

Patches

Fixed in NetX Duo 6.5.2.202603b. _nx_secure_tls_process_serverhello() now requires room for the ciphersuite and compression method after the session ID, and _nx_secure_dtls_process_helloverifyrequest() refuses a message too short to hold the version and cookie length before reading either. Well-formed messages are processed as before. A new regression test fails when either change is reverted.

Credits

The ServerHello read was found by @tinic, who identified it with a fuzz driver over the TLS client handshake and proposed a fix. The HelloVerifyRequest read was found by @fdesbiens while reviewing that fix. Fixed by Frédéric Desbiens.

The fix and regression test were produced with AI assistance under human review, in accordance with the Eclipse Foundation’s Generative AI Usage Guidelines.