GHSA-5xr3-wpxf-rw5q: Out-of-bounds read in the NetX Secure DTLS ClientHello parser

GHSA ID

GHSA‑5xr3‑wpxf‑rw5q

CVE ID

CVE‑2026‑102712

Severity

Medium

CWE

CWE-125

Published

2026‑10‑13

Last updated

2026‑10‑13

Affected packages

Package Vulnerable versions Patched versions

NetX Duo

⇐ 6.5.2.202603

6.5.2.202603a

Description

Summary

_nx_secure_dtls_process_clienthello reads the session ID, the cookie and the ciphersuite list without bounding any of them against the bytes remaining in the message, so a DTLS server reads past the end of a ClientHello whenever a peer declares a field longer than the message carrying it. The equivalent TLS parser was given per-field bounds checks; the DTLS parser never received them.

The report described the over-read bytes being echoed back to the peer in the ServerHello, giving a remote memory disclosure. That outcome cannot occur, for the reason set out below.

Details

The parser validates only a 38-byte floor on the whole message. It then takes the session ID length from the message and copies that many bytes without checking that they fit, takes the cookie length and bounds it only against the size of the destination cookie field, and compares the ciphersuite list length against the total message length rather than against the bytes still unconsumed. Each of those advances the parse cursor by the declared amount, so one ClientHello can drive the cursor well beyond the message it came from.

The reflection path is closed by an unrelated check. Before the parser can return success it tests that the consumed prefix plus the compression methods length fits within the message length. At that point the cursor has advanced by 39 bytes plus the session ID, cookie and ciphersuite list lengths, so returning success requires every one of those declared lengths to fit inside the message — which is exactly the condition under which no over-read happened. The session ID copy stays in bounds whenever its length is at most the message length minus 35, while reaching success demands at most the message length minus 39, and the cookie and ciphersuite list follow the same pattern. Any over-read therefore guarantees the error return, and _nx_secure_dtls_server_handshake returns on that status before reaching the state that builds and sends the ServerHello. The over-read and the reflection are mutually exclusive.

_nx_secure_dtls_server_handshake also reassembles every handshake message into the session’s packet buffer before dispatching it, and requires the message plus its 12-byte header to fit there. The parse runs against that buffer rather than against the received packet, so the session ID and cookie over-reads stay within its first 325 bytes: two for the protocol version, 32 for the random, and the one-byte length fields and maxima of the session ID, which is 255, and of the cookie, which the parser bounds to the 32-byte destination field. The only read outside the buffer is the single compression methods length byte, and its value is discarded when the check above fails.

Impact

A bounded out-of-bounds read, reachable on the first ClientHello by any unauthenticated peer that can route a UDP datagram to the DTLS server, before any cookie exchange.

Nothing over-read is transmitted, so there is no disclosure to the network. What the over-read returns is residue of the session’s own reassembly buffer, which on a session object reused across peers can hold an earlier peer’s handshake bytes. That residue stays in the session structure and is overwritten by the next ClientHello.

The single byte read past the buffer can fault on a target that traps the address beyond it; on the flat memory maps typical of these targets it will not. _nxe_secure_tls_session_packet_buffer_set rejects a reassembly buffer smaller than NX_SECURE_TLS_MINIMUM_MESSAGE_BUFFER_SIZE, which is 4000 bytes, so no conforming build can present a buffer small enough for the bounded reads to leave it. A build defining NX_SECURE_DISABLE_ERROR_CHECKING skips that check, but a buffer below 325 bytes cannot carry a DTLS handshake in any case.

Affected configurations

Builds with NX_SECURE_ENABLE_DTLS acting as a DTLS server. DTLS clients are unaffected.

Versions up to and including 6.5.2.202603. The TLS ClientHello parser received its per-field bounds checks when CVE-2025-55081 was fixed; the DTLS parser was not changed at the same time and has carried the defect since DTLS server support was introduced.

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, 6.3, Medium. CWE-125.

VC:N because the over-read can be neither reflected nor otherwise observed. AT:P and VA:L because the one byte read outside the reassembly buffer only has an effect on a target that traps that address.

Patches

Fixed in NetX Duo 6.5.2.202603a.

The DTLS ClientHello parser now applies the same per-field remaining-bytes guards the TLS parser carries: each length read from the message is checked against the bytes remaining in the record before it is consumed, and the ciphersuite list length is compared against the remaining bytes rather than the total. No public API changes, so applications need no source change.

Workarounds

None beyond restricting which peers can reach the DTLS server port.

Credits

Reported by Cipher of Causal Security (https://causalsecurity.com/).

The maintainers' analysis of this report was produced with AI assistance under human review, in accordance with the Eclipse Foundation’s Generative AI Usage Guidelines.