GHSA-3p2g-x7hh-3w4c: NetX Secure DTLS server allocates a session for each new source before the cookie exchange and never reclaims it, so spoofed datagrams exhaust the session pool

GHSA ID

GHSA‑3p2g‑x7hh‑3w4c

CVE ID

CVE‑2026‑115215

Severity

High

CWE

CWE-770, CWE-772

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

The NetX Secure DTLS server allocates a session from its fixed session pool for the first datagram it receives from any unrecognised address and port, before the cookie exchange has verified that the peer can receive at that address. The library never releases a session whose handshake stalls or times out; only the application can. One forged datagram per spoofed source therefore holds a session indefinitely, and a handful of them exhausts the pool and locks legitimate clients out.

Details

_nx_secure_dtls_receive_callback() looks up the sender’s address and port with nx_secure_dtls_session_cache_find(). When there is no match, it calls nx_secure_dtls_session_cache_get_new() for any non-alert datagram at least a record header long, marks the slot in use and calls the application’s connect notify. Nothing about the datagram is verified first.

The HelloVerifyRequest cookie that should provide that verification is per-session state, stored in the slot just allocated, so the current design cannot check it before allocating. Cookie verification, including the comparison added in NetX Duo 6.5.2.202603a, only decides whether the handshake proceeds within a session that already exists.

A slot is released only by _nx_secure_dtls_session_reset(), which runs when the application ends, deletes or resets the session, or stops the server. _nx_secure_dtls_session_start() returns on handshake timeout or retry exhaustion without resetting the session. When every slot is in use, new peers receive an internal_error alert and nx_secure_dtls_server_session_start() reports NX_SECURE_TLS_NO_FREE_DTLS_SESSIONS.

Impact

A remote attacker with no credentials, and with no need to receive any reply, can deny DTLS service to legitimate clients by sending one datagram from each of as many forged source addresses or ports as the server has sessions. nx_dtls_server_sessions_count is fixed by the application and is typically small on embedded targets. The denial lasts until the application resets the affected sessions, and indefinitely if it never does. Confidentiality and integrity are not affected.

Affected configurations

Any build providing a NetX Secure DTLS server. The allocation is in the common DTLS receive path and is not behind a build option. DTLS clients are unaffected.

Affected versions: [6.0, 6.5.2.202603a]. The fix for GHSA-7c5f-gmpm-f655 in 6.5.2.202603a does not address it.

Severity

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N, CVSS-B 8.7 (High). CWE-770, CWE-772.

VA:H because the attacker can hold every session for as long as the application leaves them allocated, which by default is indefinitely.

Patches

Fixed in NetX Duo 6.5.2.202603b. The DTLS server now answers an initial ClientHello from an unknown source with a HelloVerifyRequest without allocating anything, using a stateless cookie: an HMAC over the client’s address and ports and its ClientHello, keyed by a server secret that is replaced periodically. A session is allocated, and connect_notify called, only for a ClientHello that returns a valid cookie. Applications can supply the secret through the new nx_secure_dtls_server_cookie_secret_set service; otherwise it is drawn from NX_RAND. From an unknown source, the server now drops any datagram other than an unfragmented ClientHello. New regression tests fail without the fix.

Workarounds

Applications can bound the exposure by resetting, with nx_secure_dtls_session_reset() or nx_secure_dtls_session_end(), any session whose handshake has not completed within a timeout of their choosing. That releases slots held by forged sources, but does not prevent a burst of forged datagrams from filling the pool in the meantime. Ingress filtering that prevents source-address forgery reduces exposure upstream of the device.

Credits

Found by Frédéric Desbiens while reviewing the fix for GHSA-7c5f-gmpm-f655.