GHSA-q462-246c-x3jc: A malformed Session header permanently orphans one packet-pool block per RTSP request

GHSA ID

GHSA‑q462‑246c‑x3jc

CVE ID

CVE‑2026‑102716

Severity

High

CWE

CWE-401, CWE-755

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_rtsp_server_request_header_parse returns the raw _nx_utility_string_to_uint error from the Session branch instead of mapping it to an RTSP status code. The raw code reaches _nx_rtsp_server_error_response_send, which does not recognise it and returns before releasing the response packet it was given. The next request on the same connection overwrites the only pointer to that packet, so the block becomes unreachable. An unauthenticated client drains the server’s packet pool with a few dozen requests, and the blocks never come back.

Details

Every other branch of the header parser maps its failure to an RTSP status code first — the CSeq branch, eighteen lines earlier, returns NX_RTSP_STATUS_CODE_BAD_REQUEST. The Session branch returns whatever _nx_utility_string_to_uint gave it.

_nx_rtsp_server_request_parse allocates a response packet directly into nx_rtsp_client_response_packet and passes the raw code to _nx_rtsp_server_error_response_send, discarding that function’s return value. The function looks the code up in nx_rtsp_server_response_description_table, fails to find it, and returns NX_RTSP_SERVER_INVALID_PARAMETER immediately — before the packet reset, and well before the release-and-clear at the end of the function that would both free the packet and null the pointer.

The packet is therefore neither released nor unhooked, and the field still points at it. The next request on the same connection allocates a fresh packet straight into that field, overwriting the only reference. From that moment the block is unreachable: neither the disconnect handler nor nx_rtsp_server_stop can find it, because both work from the same pointer. Only the most recently abandoned block is still referenced and so reclaimed at disconnect, which is why six malformed requests cost five blocks rather than six. Restarting the RTSP server does not recover them; nothing short of a reboot does.

The connection stays open throughout. On a parse failure the receive loop releases the request packet and continues without disconnecting, so a single TCP connection carrying a few dozen malformed requests is enough, and no connection limit helps.

The Session branch is today’s reachable trigger, but the table-miss exit leaks for any status code absent from the description table — including one supplied by application code, which the function’s own header comment invites.

Impact

One packet-pool block is permanently lost per malformed request, from an unauthenticated remote client. Once the pool is empty the server fails every allocation and serves nobody, and the loss survives a server restart.

Where the pool is shared with the rest of the application, as it is in the shipped sample, the rest of the networking stack stops with it.

Affected configurations

Any build using the NetX Duo RTSP server add-on. The defect is in the common request-parsing path and is not behind a build option.

Releases up to and including 6.5.2.202603 are affected.

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, 8.7, High. CWE-401 and CWE-755.

Availability is high once permanence is taken into account: the attack needs no authentication, the blocks are unrecoverable without a reboot, and in the shipped sample the shared pool takes the whole stack down with it. No attack requirements are recorded — any Session header value that is not a valid unsigned integer, an empty one included, reaches the path.

CWE-755 is recorded alongside CWE-401 because this is an error path abandoning an allocation rather than a missing free in normal flow.

Patches

Fixed in NetX Duo 6.5.2.202603a.

The Session branch now returns NX_RTSP_STATUS_CODE_BAD_REQUEST as the CSeq branch does. Independently, a status code absent from the description table is mapped to NX_RTSP_STATUS_CODE_INTERNAL_SERVER_ERROR rather than abandoning the request, so the response travels the normal send path and the packet is released by the existing release-and-clear rather than by a second release site. The caller additionally checks that the response packet pointer is null after the call, where it previously discarded the return value. The first change closes the reported path and the second closes the class. No public API changes, so applications need no source change.

Workarounds

None within the add-on. A device that does not run the RTSP server is unaffected; restricting which hosts may reach the RTSP port limits who can drain the pool. Giving the RTSP server a packet pool of its own does not prevent the loss but does confine it to RTSP.

Credits

Reported by @L0stHeart.

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