Read the docs

FreeRDP TSMF geometry race causes out-of-bounds write

Priority LOW 39CWE-362Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
High
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · High
Fix status
Fixed

Attack profile from CVSS 3.1 · GHSA-prmq-526m-w8vh. Fix status from GitHub. Impact type from CWE-787 and the CVSS impact.

Summary

FreeRDP from 3.31.1 before 3.34.0 has a race condition in its TSMF client channel. A malicious RDP server can change the presentation geometry during video playback, which lets the client write past a heap buffer (CWE-362). An attacker who controls an RDP server that a user connects to can crash the client when TSMF is enabled and video is playing.

Written with Claude Haiku 5.5 from the sources below · 2026-12-02

Description from the GitHub advisory

### Summary A malicious RDP server can update TSMF presentation geometry while the client plays video. The playback path allocates visible rectangles using one count, then writes using a newer unsynchronized count and pointer. FreeRDP 3.31.1 reached a production heap out-of-bounds write and client abort through full RDP/DRDYNVC/TSMF under a controlled schedule. TSMF video and concurrent updates are required. Demonstrated impact is Medium (CVSS v3.1 5.3); code execution and natural race reliability were not shown. ### Details The trust boundary is server-provided TSMF geometry entering the client's video playback thread. A victim must connect to a malicious or compromised RDP server, enable the optional TSMF channel, negotiate a working video decoder and receive a geometry update while a frame is processed. The server needs no client privilege; the victim initiates the RDP connection. `tsmf_presentation_set_geometry_info()` in `channels/tsmf/client/tsmf_media.c` publishes `presentation->nr_rects` and may `realloc()`/replace `presentation->rects` without synchronizing with `tsmf_sample_playback_video()` in the same file. Playback copies an initial count into `event.numVisibleRects` and allocates `event.visibleRects` for that count. It then bounds its conversion loop and a following copy using fresh reads of the live count and pointer. A one-rectangle allocation followed by a 32-rectangle update writes beyond the eight-byte destination. A concurrent `realloc()` can also invalidate the source pointer; that second consequence was not separately reproduced. Full RDP/DRDYNVC/TSMF evidence on 3.31.1 (`63b948ca5cb94307fd5444ee6e73927a41ccdab4`) reached heap metadata corruption and `SIGABRT` with a bounded timing pause. ASan localized the first out-of-bounds store. The attached exact-source MSVC ASan harness reproduces the one-to-32 count differential and an immutable-snapshot negative control. That harness is a production-source-path test, not an independent full-wire RDP test. The historical full-wire packet fixture and raw logs remain private and can be supplied to maintainers through the private channel. A pause-disabled check did not reproduce the race; natural reliability, adjacent-object control, disclosure and RCE are unknown. `tsmf_media.c` has the same relevant Git blob `f28dbbf919585c7ef5351cef32b4c48696966456` in 3.32.0, 3.32.1, 3.32.2 (`97eff6ddfbbfaa8e42a126d362686bd001ff8bdc`) and official master `b2403bb99fba33acc817ffd4042b64e077d59076` (checked 27 October 2026). Only 3.31.1 was dynamically exercised for D-203. No fixed release or earliest affected release is verified. Bounded public issue, commit and advisory searches found no exact geometry count/pointer race report. [GHSA-grvc-qhhp-7h6m](https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-grvc-qhhp-7h6m) concerns signed video-origin coordinate wrap, a different root. Confidential duplicate reports are unknowable from public search. Please publish one coherent immutable geometry snapshot under synchronization and use its count, pointer and checked extent for allocation, conversion and copy. Retain storage until all readers finish. Test forced updates at each read boundary and ordinary playback under ASan/TSan. Evidence in the archive: `D203/package/lab/CVE-Submissions/D203-TSMF-GEOMETRY-RACE.md`, `D203/package/lab/docs/D203_TSMF_GEOMETRY_POC.md` and `D203/package/lab/tools/d203-tsmf-geometry/README.md` with the source-gated control/fault harness. Please consider assigning or requesting a distinct CVE ID for this independently confirmed vulnerability, subject to your CNA assessment. I would appreciate researcher attribution in the resulting advisory. ### Proof of concept Tested version: FreeRDP 3.31.1, commit `63b948ca5cb94307fd5444ee6e73927a41ccdab4`. Target: Windows 10/11 x64 with Visual Studio 2022 C++ x64 toolset and MSVC AddressSanitizer; Git for Windows. The attachment contains `D203/package/lab/tools/d203-tsmf-geometry/Invoke-D203PoC.ps1`, its C source and README. No Docker or network is needed for the source-path harness. Run from extracted `D203/package/lab` after obtaining a clean upstream checkout at the exact commit: ```powershell git clone https://github.com/FreeRDP/FreeRDP.git freerdp-d203-3.31.1 git -C freerdp-d203-3.31.1 checkout --detach 63b948ca5cb94307fd5444ee6e73927a41ccdab4 git -C freerdp-d203-3.31.1 status --short ./tools/d203-tsmf-geometry/Invoke-D203PoC.ps1 -Mode Control -FreeRDPSource <absolute-path-to-freerdp-d203-3.31.1> $env:FREERDP_D203_POC_AUTHORIZED = 'YES' ./tools/d203-tsmf-geometry/Invoke-D203PoC.ps1 -Mode Control -FreeRDPSource <absolute-path-to-freerdp-d203-3.31.1> -Execute ./tools/d203-tsmf-geometry/Invoke-D203PoC.ps1 -Mode Fault -FreeRDPSource <absolute-path-to-freerdp-d203-3.31.1> -Execute ``` Register Control and Fault as separate private experiments before execution. The wrapper must print `preflight=pass` and source blob `f28dbbf919585c7ef5351cef32b4c48696966456`. Control schedules the same update while retaining a one-entry immutable snapshot and must exit zero without ASan. Fault must terminate with `AddressSanitizer: heap-buffer-overflow` at the first two-byte store past the eight-byte allocation. A source mismatch, missing sanitizer, compile failure or clean Fault exit is inconclusive. The pause is a timing aid and does not prove natural race reliability. The earlier full-wire observation is separately documented in the included dossier; its ignored raw fixture is not part of the archive. ### Impact Affected: FreeRDP clients with TSMF video enabled that connect to an untrusted server. Demonstrated: remote input reaches unsynchronized geometry state, a heap out-of-bounds store under a controlled schedule, and full-wire client abort. Not demonstrated: natural race frequency, application-object control, disclosure, code execution or reliable exploitation. The submitted severity represents availability only.

Why it matters now

Fix Fixed FreeRDP — TSMF client channel (source project, not a registry package) (c): 3.34.0

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—FreeRDP — TSMF client channel (source project, not a registry package) (c)>= 3.31.1, <= 3.33.13.34.0Patch availableGHSA-prmq-526m-w8vh
  • FreeRDP — TSMF client channel (source project, not a registry package) (c) Vendor— Affected >= 3.31.1, <= 3.33.1 Fixed in 3.34.0 Patch available GHSA-prmq-526m-w8vh

Remediation

Update FreeRDP to 3.34.0.

Written with Claude Haiku 5.5 from the sources below · 2026-12-02

  • Fix · GHSA-prmq-526m-w8vh FreeRDP — TSMF client channel (source project, not a registry package) (c) Fixed in 3.34.0 Advisory →

Timeline

  1. 2026-12-02 Threatist record created from GHSA-prmq-526m-w8vh

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences