Infinite loop in FreeRDP pool_decode_rect enables client CPU denial of service
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · GHSA-m85m-3qxv-63h5. Fix status from GitHub.
Summary
FreeRDP from 3.11.0 onward has an infinite loop in the threaded AVC444 decode path in pool_decode_rect. A malicious RDP server can send AVC444 graphics updates that cause the loop to never terminate, pegging client CPU. The victim must connect to the attacker-controlled server and process its graphics updates. The flaw is a loop counter that is reset inside the loop, and the impact is limited to client-side denial of service.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
Description from the GitHub advisory
The report was generated by AI and has been reviewed manually. ### Summary Infinite loop / CPU DoS in pool_decode_rect when numRegionRects exceeds work_object_count: a malicious RDP server can trigger non-terminating threaded AVC444 decode and peg client CPU. ### Requirements to exploit The attacker must control or compromise an RDP server that the victim connects to, and the session must reach the threaded AVC444 client decode path by sending AVC444 or AVC444v2 graphics updates while `useThreads == TRUE` and the EXTGPU fast-path is not active. ### Component affected `libfreerdp/codec/yuv.c`, `pool_decode_rect`; reachable from `channels/rdpgfx/client/rdpgfx_codec.c` through `libfreerdp/gdi/gfx.c`, `avc444_decompress`, and `yuv444_context_decode`. ### Version affected all FreeRDP versions from 3.11.0 onward (introduced by commit 1cc64eb58) when the AVC444 client decode path is present and exercised in threaded mode (`useThreads == TRUE` and no `PRIM_FLAGS_HAVE_EXTGPU` fast-path) ### CVSS CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - 6.5 (MEDIUM) AV:N - A malicious RDP server can deliver the triggering metablock over the network. AC:L - Triggering requires only a parseable AVC444 metablock with `numRegionRects > work_object_count`; no race or memory corruption primitive is needed. PR:N - No prior authentication within the client is required beyond presenting a malicious or compromised server to the victim. UI:R - The victim must connect to the attacker-controlled RDP server and process its graphics updates. S:U - The impact is limited to the client process handling the decode. C:N - No confidentiality impact is established from the available evidence. I:N - No integrity impact is established from the available evidence. A:H - The decode path can become non-terminating and peg CPU, preventing normal client use. ### Impact Moderate. A remote server can cause a client-side availability failure, but exploitation requires user interaction and the specific threaded AVC444 decode path. Based on Red Hat's severity guidance, this is less broadly exploitable than a typical Important-rated remote service DoS, and no confidentiality, integrity, or code execution impact is established. ### Reason The confirmed impact is client-side CPU denial of service, exploitation requires the victim to connect to a malicious server, and there is a straightforward fix and operational mitigation. ### Attribution Found by AISLE in partnership with Red Hat ### Vulnerability Details In `pool_decode_rect`, `waitCount` is reused both as the loop variable over `regionRects` and as the index into the preallocated worker array. In the threaded branch, reaching `context->work_object_count` frees outstanding work items and resets `waitCount` to `0` inside the same `for` loop: ```c for (waitCount = 0; waitCount < numRegionRects; waitCount++) { YUV_COMBINE_WORK_PARAM* current = NULL; if (context->work_object_count <= waitCount) { free_objects(context->work_objects, context->work_object_count); waitCount = 0; } current = &context->work_combined_params[waitCount]; *current = pool_decode_rect_param(®ionRects[waitCount], context, type, pYUVData, iStride, pYUVDstData, iDstStride); if (!submit_object(&context->work_objects[waitCount], cb, current, context)) goto fail; } ``` If `numRegionRects` exceeds `work_object_count`, the function stops making forward progress and repeatedly returns to low indices instead of ever reaching the loop terminator. The available evidence supports client-side CPU denial of service in this condition, not memory corruption or code execution. Reachability is controlled by untrusted RDPGFX input. `rdpgfx_read_h264_metablock()` reads `meta->numRegionRects` from the wire and validates stream length, but there is no cap tying that value to `work_object_count` before `gdi_SurfaceCommand_AVC444()` passes the metablock into `avc444_decompress()`, `yuv444_context_decode()`, and finally `pool_decode_rect()`. `work_object_count` is preallocated in `yuv_context_reset()` from the current surface dimensions, so smaller surfaces make the trigger condition easier to satisfy. The vulnerable branch is only used when `useThreads == TRUE` and `PRIM_FLAGS_HAVE_EXTGPU` is not active; the synchronous branch is not affected. ### Steps to reproduce 1. Use `freerdp-3.10.3-8.el10` in a client configuration that reaches the threaded AVC444 path: H.264/GFX-capable client decode, threading enabled, more than one processor so `useThreads == TRUE`, and no EXTGPU fast-path. 2. Connect the client to a malicious or instrumented RDP server that can send `RDPGFX_CODECID_AVC444` or `RDPGFX_CODECID_AVC444v2` surface updates. 3. Create or select a small surface so that `yuv_context_reset()` allocates a small `work_object_count`. 4. Send a valid AVC444 metablock whose `numRegionRects` is greater than `work_object_count`, for example `work_object_count + 1`, using parseable, in-bounds rectangles. 5. Observe the client entering `pool_decode_rect()`, spinning without completing the update, and consuming sustained CPU. ### Mitigation Until a fix is available, avoid connecting affected clients to untrusted RDP servers that can drive the AVC444 graphics path. Where the integration permits disabling threaded decode, that avoids the vulnerable branch because the non-threaded path iterates over `numRegionRects` directly instead of resetting the loop counter. ### Proposed Fix Use a separate `regionIndex` to walk `regionRects`, keep `waitCount` as the number of submitted work items, and pass only the number of active work objects to `free_objects()`. ```diff — a/libfreerdp/codec/yuv.c +++ b/libfreerdp/codec/yuv.c @@ static BOOL pool_decode_rect(YUV_CONTEXT* WINPR_RESTRICT context, BYTE type, const BYTE* WINPR_RESTRICT pYUVData[3], const UINT32 iStride[3], BYTE* WINPR_RESTRICT pYUVDstData[3], const UINT32 iDstStride[3], const RECTANGLE_16* WINPR_RESTRICT regionRects, UINT32 numRegionRects) { BOOL rc = FALSE; - UINT32 waitCount = 0; + UINT32 waitCount = 0; + UINT32 regionIndex = 0; PTP_WORK_CALLBACK cb = yuv444_combine_work_callback; @@ - for (waitCount = 0; waitCount < numRegionRects; waitCount++) for (regionIndex = 0; regionIndex < numRegionRects; regionIndex+) { YUV_COMBINE_WORK_PARAM* current = NULL; if (context->work_object_count <= waitCount) { free_objects(context>work_objects, context->work_object_count); + free_objects(context->work_objects, waitCount); waitCount = 0; } current = &context->work_combined_params[waitCount]; - *current = pool_decode_rect_param(®ionRects[waitCount], context, type, pYUVData, iStride, + *current = pool_decode_rect_param(®ionRects[regionIndex], context, type, pYUVData, iStride, pYUVDstData, iDstStride); if (!submit_object(&context->work_objects[waitCount], cb, current, context)) goto fail; waitCount+; } @@ fail: free_objects(context>work_objects, context->work_object_count); + free_objects(context->work_objects, waitCount); return rc; } ``` See: https://github.com/FreeRDP/FreeRDP/pull/13223
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 | > 3.11.0 | 3.31.0 | Patch available | GHSA-m85m-3qxv-63h5 |
- freerdp Vendor— Affected > 3.11.0 Fixed in 3.31.0 Patch available GHSA-m85m-3qxv-63h5
Remediation
Upgrade FreeRDP to version 3.31.0 or later. The sources list no fixed version for earlier 3.x releases.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
- Fix · GHSA-m85m-3qxv-63h5 freerdp Fixed in 3.31.0 Advisory →
Timeline
- 2026-11-12 Threatist record created from GHSA-m85m-3qxv-63h5
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences