Read the docs

Uninitialized pointer free in FreeRDP Windows clipboard handling

Priority LOW 39CWE-763Published · 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-ch3p-5r9r-w86p. Fix status from GitHub. Impact type from CWE-824 and the CVSS impact.

Summary

FreeRDP's native Windows client, from 3.31.1 up to and including 3.33.0, frees clipboard format map entries that were never initialized (CWE-824). A malicious RDP server sends two format lists with clipboard redirection enabled, and the client then frees an uninitialized pointer. A victim who connects to such a server with clipboard redirection enabled can have the client terminate. The source confirmed an invalid free and termination in version 3.32.2.

Written with Claude Haiku 5.5 from the sources below · 2026-11-17

Description from the GitHub advisory

### Summary A malicious RDP server can send a 32-format clipboard list that grows the Windows client's mapping array without initializing its new pointer slots, then send another list that frees every slot through the expanded capacity. A native FreeRDP 3.32.2 Windows client built with MSVC AddressSanitizer reached an invalid free and terminated; an exact candidate Fixed client processed the same two-list sequence cleanly. Clipboard redirection and a server-controlled format list are required. Demonstrated impact supports Medium (CVSS v3.1 5.3), with no claim of attacker-chosen free, code execution or reliable unsanitized failure. ### Details The trust boundary is a remote RDP server's CLIPRDR format list entering the native Windows FreeRDP client. The victim connects to a malicious or compromised server with clipboard redirection enabled. A first list with exactly 32 accepted formats and a subsequent list are needed; the newly allocated tail must contain a nonzero pointer-shaped value. No local paste, OLE operation, clipboard materialization or race is required. The server needs no client privilege; the victim initiates the connection. In `client/Windows/wf_cliprdr.c`, `wf_cliprdr_init()` allocates 32 zeroed `formatMapping` entries. `wf_cliprdr_server_format_list()` writes each mapping before incrementing `map_size` and calling `map_ensure_capacity()`. On the 32nd insertion, `map_ensure_capacity()` grows the array from 32 to 160 entries with `realloc()` and publishes the new capacity without zeroing the 128 new entries. The next format list starts with `clear_format_map()`, which loops over `map_capacity` rather than initialized `map_size` and calls `free(map->name)` on each entry. An uninitialized tail value can therefore be passed to `free()`. The growth helper's ignored allocation-failure path is adjacent hardening, not the demonstrated invalid-free trigger. One hash-pinned, full native Windows FreeRDP 3.32.2 client (`97eff6ddfbbfaa8e42a126d362686bd001ff8bdc`) with MSVC ASan processed the exact ordered 32-format and one-format sequence over loopback and reported an invalid free in `clear_format_map()` on the second list. A separately built candidate Fixed client with only the attached patch processed the identical sequence, printed both `numFormats: 32` and `numFormats: 1`, and had no ASan diagnostic. The Current receipt SHA-256 is `69E54F68F4BB21504565FCCEC2C48737B841DE32D8184D6802755C3DAA7E5C14`; Fixed receipt SHA-256 is `1039C23F7515EADE083F6E176DAE3FDEFDB6331301BA6BF0C2384C3838C79372`. These are evidence receipts, not transferable executable hashes. The relevant `wf_cliprdr.c` blob `3c29615fee3c0c0707508edd8f8494d1c9a20a2d` is identical in 3.32.0, 3.32.1, 3.32.2 and official master `b2403bb99fba33acc817ffd4042b64e077d59076` (checked 27 October 2026). The 3.32.2 native client is runtime confirmed; the other listed versions are source confirmed. The earliest affected release and an official patched release are unverified. Bounded public advisory, issue and commit searches found no exact format-map growth/clear duplicate. [GHSA-m37j-jcr2-8gcc](https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-m37j-jcr2-8gcc) concerns `CliprdrStream_Read()`, a different function and root. A confidential duplicate cannot be excluded. Please check capacity before indexing, make growth fallible, initialize every new pointer slot before publishing the larger capacity, and clear only initialized logical entries. The candidate patch in the bundle demonstrates the minimal tail-initialization control; it is not claimed as an accepted upstream fix. Add 31/32/33-entry and repeated large-to-small list regressions under ASan. Evidence in the archive: `D222/package/lab/CVE-Submissions/D222-WINDOWS-CLIPRDR-FORMAT-MAP.md`, `D222/package/lab/docs/D222_FORMAT_MAP_POC.md`, `D222/package/lab/tools/windows-native-lab/README.md`, the peer scripts and the candidate patch. The original raw logs remain in private ignored storage and can be supplied through a private channel after acknowledgement. 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 target: FreeRDP 3.32.2 commit `97eff6ddfbbfaa8e42a126d362686bd001ff8bdc`, complete native Windows `wfreerdp` frontend. Requirements: Windows lab account, Visual Studio 2022 x64 C++/SDK/MSVC ASan, CMake 4.x, the pinned source and the attached `D222/package/lab/tools/windows-native-lab/` scripts. The peer binds only `127.0.0.1`; the runner has a watchdog. No real credentials or external RDP endpoint are used. Use the exact full commands and refusal gates in the attached `README.md`. From extracted `D222/package/lab`, build independent Current and Fixed worktrees at the exact commit. Apply only `tools/windows-native-lab/patches/D222-wf-cliprdr-format-map.patch` to Fixed after `git apply --check`; require patched `wf_cliprdr.c` SHA-256 `C53573EAA20484608C30355025A18A0971B5A31D484348EABD33EEAF4823C7E5`. Build both with `Build-FreeRDP.ps1 -WithAddressSanitizer`. Before running, record each executable hash independently and register separate private experiment starts. The validated executable hashes were Current `65442E00C8D8EE78EE7C8A716D0650D7E06633659C30656475A0F8FA0B3991F3` and Fixed `EE45152D60C0A8FEDF581A1A490FE3EAB44E8A8D9765C528F96752FE2E3F3004`; a fresh rebuild can have different hashes and must be independently recorded, never derived inline from the executable being admitted. ```powershell $env:FREERDP_D222_NATIVE_AUTHORIZED = 'YES' ./tools/windows-native-lab/Invoke-D222Pair.ps1 -Variant Fixed -ClientBuildRoot <fixed-build-root> -ExpectedClientSha256 <independently-recorded-fixed-exe-sha256> -Execute $fixedReceipt = '<path-printed-by-Fixed-run>\receipt.json' ./tools/windows-native-lab/Invoke-D222Pair.ps1 -Variant Current -ClientBuildRoot <current-build-root> -ExpectedClientSha256 <independently-recorded-current-exe-sha256> -FixedReceipt $fixedReceipt -ExpectedFixedClientSha256 <independently-recorded-fixed-exe-sha256> -Execute ``` Fixed must classify `fixed-control-pass`, confirm both peer sends and both client parsing markers (`numFormats: 32`, `numFormats: 1`) without ASan. Current is positive only if the same ordered exchange classifies `asan-finding` with invalid free in `clear_format_map()` on the second list. A missing marker or failed handshake is a failed precondition; a clean Current run is inconclusive because the uninitialized tail depends on allocator residue. The historical native ASan pair is documented, but final QA did not repeat target execution. This PoC does not establish an arbitrary free or code execution. ### Impact Affected: native Windows FreeRDP clients with CLIPRDR enabled when a malicious server sends repeated format lists. Demonstrated: server-driven invalid free and termination in an instrumented complete 3.32.2 client, with a matched clean candidate Fixed control. A reliable unsanitized release crash, attacker-selected pointer, arbitrary free/write, data disclosure and RCE were not demonstrated. Availability impact is the selected scoring boundary.

Why it matters now

Fix Fixed FreeRDP — native Windows client / CLIPRDR (source project, not a registry package) (c): 3.33.1

SSVC decision points

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

Affected products

VendorProductAffected versionsFixed inStatusSource
—FreeRDP — native Windows client / CLIPRDR (source project, not a registry package) (c)>= 3.31.1, <= 3.33.03.33.1Patch availableGHSA-ch3p-5r9r-w86p
  • FreeRDP — native Windows client / CLIPRDR (source project, not a registry package) (c) Vendor— Affected >= 3.31.1, <= 3.33.0 Fixed in 3.33.1 Patch available GHSA-ch3p-5r9r-w86p

Remediation

Update the FreeRDP native Windows client to version 3.33.1, which fixes this flaw.

Written with Claude Haiku 5.5 from the sources below · 2026-11-17

  • Fix · GHSA-ch3p-5r9r-w86p FreeRDP — native Windows client / CLIPRDR (source project, not a registry package) (c) Fixed in 3.33.1 Advisory →

Timeline

  1. 2026-11-17 Threatist record created from GHSA-ch3p-5r9r-w86p

References

Sources

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