Read the docs

Reachable assertion in FreeRDP proxy input sync aborts freerdp-proxy

Priority LOW 38CWE-20Published · Updated

Key facts

Attack vector
—
Privileges required
—
User interaction
—
Attack complexity
—
Impact type
Denial of service
Confidentiality · integrity · availability
—
Fix status
Fixed

No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-617.

Summary

FreeRDP through 3.31.0 has an incomplete fix in input_send_fastpath_synchronize_event, which warns about undefined FastPath sync flags but never masks them. A peer sending a SlowPath synchronize event with flags of 0x20 or higher can trigger a WINPR_ASSERT in fastpath_input_pdu_init, which aborts freerdp-proxy and terminates every proxied session when assertions are enabled. An authenticated remote peer can exploit this to disrupt availability (CWE-617, CWE-20).

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

Description from the GitHub advisory

## Preconditions & Affected Versions - **Affected Commit / Branch:** `FreeRDP/FreeRDP` `master`, from the preceding fix `78e1d69d3c61bbad586744609897467d3a0f7397` (`[core,input] ANT-2026-DQDSZE9M`) through current upstream `HEAD = c8b2f1d7ed5f9cb1ade1fc0224aa9604bf6eb829` (verified via `git ls-remote` and checked out locally in `/home/inanna/dev/argon-experiments/scratch/mythos-roulette/FreeRDP`; identical in `FETCH_HEAD = d9991b9fa1b6e92f6c19679c6324023f771a38c1`). - **Reachable Path:** authenticated `freerdp-proxy` session. A remote peer sends a SlowPath `TS_SYNC_EVENT` with `toggleFlags >= 0x20`; `input_recv_sync_event` (`libfreerdp/core/input.c:695-712`) forwards it to `pf_server_synchronize_event` (`server/proxy/pf_input.c:63`), which the proxy reposts to its target client connection and delivers as `freerdp_input_send_synchronize_event` (`libfreerdp/core/input.c:1045-1055`). - **Build Configuration:** `WITH_VERBOSE_WINPR_ASSERT=ON` is the default (`cmake/CommonConfigOptions.cmake:19-22`) and is what distro/CI builds use, so `WINPR_ASSERT` is a hard `abort()`. ## Root Cause (`libfreerdp/core/input.c:384-414`) Commit `78e1d69d` recognised that the FastPath `eventFlags` field is only 5 bits wide and that a peer (or a proxy relaying a peer) may send undefined bits: it computes `mask = KBD_SYNC_SCROLL_LOCK | KBD_SYNC_NUM_LOCK | KBD_SYNC_CAPS_LOCK | KBD_SYNC_KANA_LOCK` (`0x0F`) and logs `"Problematic [MS-RDPBCGR] 2.2.8.1.2.2.5 Fast-Path Synchronize Event (TS_FP_SYNC_EVENT) flags=0x%08x, ignoring undefined bits."` (`:392-398`) - but it never applies the mask. The unmasked `(BYTE)flags` is handed to `fastpath_input_pdu_init` (`:408`): ```c if (flags & ~mask) WLog_WARN(TAG, "... ignoring undefined bits.", flags); ... wStream* s = fastpath_input_pdu_init(rdp->fastpath, (BYTE)flags, FASTPATH_INPUT_EVENT_SYNC, &sec_flags); ``` `fastpath_input_pdu_init` (`libfreerdp/core/fastpath.c:1076-1089`) then enforces the 5-bit limit with `WINPR_ASSERT(eventFlags < 0x20)` (`:1086`). With `flags = 0x20` (or any value with bit 5..7 set) the warning says the bits are being ignored and the very next call aborts the process: `abort()` inside `winpr_int_assert`. In a multi-session `freerdp-proxy` this terminates every proxied session, so a single authenticated peer controls process liveness (availability impact, no memory corruption). With `WITH_VERBOSE_WINPR_ASSERT=OFF` there is no abort, but `(UINT8)(eventFlags | (eventCode << 5))` (`fastpath.c:1087`) ORs bits 5..7 of the peer-supplied flags into the 3-bit `eventCode` header field of the forwarded FastPath PDU, so the proxy emits a malformed/renamed input event to the target server - the mitigation the original commit intended simply does not take effect. ## Verification Performed 1. **Source verification at live upstream HEAD:** `git ls-remote https://github.com/FreeRDP/FreeRDP` returned `c8b2f1d7ed5f9cb1ade1fc0224aa9604bf6eb829`; `libfreerdp/core/input.c:384-414` and `libfreerdp/core/fastpath.c:1086` at that commit are byte-identical to the audited `FETCH_HEAD = d9991b9fa1b6` and to bundle commit `8a312188`. The `flags &= mask;` line is absent in all three. 2. **Compiled harness (`03_fastpath_sync_undefined_bits/repro.c`, 74 LOC, only installed `<freerdp/freerdp.h>` / `<freerdp/input.h>` / `<winpr/wlog.h>` API, linked against the ASan/UBSan `libfreerdp3.so` built from unmodified `8a312188`):** forked children call the public `freerdp_input_send_synchronize_event()` with `[control] flags = 0x0F` and `[witness] flags = 0x20`. **Observed honestly:** both children exit cleanly, because `freerdp_is_active_state()` (`input.c:1026`) short-circuits `input_skip()` and `input->SynchronizeEvent` is only installed by `input_register_client_callbacks` (`libfreerdp/core/connection.c:2342`, `FREERDP_LOCAL`) at `CONFIRM_ACTIVE`. The harness therefore empirically confirms that the sink is *only* reachable in an active session (no abort can be observed from a fresh context), which is exactly the post-auth precondition claimed for the proxy path; it does not, on its own, reproduce the `SIGABRT` without a completed RDP handshake with a `freerdp-proxy` target. 3. **Patch check:** `git apply --check` of the 3-line `flags &= mask;` fix against `libfreerdp/core/input.c` at upstream HEAD succeeds. ```diff --- a/libfreerdp/core/input.c +++ b/libfreerdp/core/input.c @@ -392,10 +392,13 @@ static BOOL input_send_fastpath_synchronize_event(rdpInput* input, UINT32 flags) const UINT32 mask = KBD_SYNC_SCROLL_LOCK | KBD_SYNC_NUM_LOCK | KBD_SYNC_CAPS_LOCK | KBD_SYNC_KANA_LOCK; if (flags & ~mask) + { WLog_WARN(TAG, "Problematic [MS-RDPBCGR] 2.2.8.1.2.2.5 Fast-Path Synchronize Event " "(TS_FP_SYNC_EVENT) flags=0x%08" PRIx32 ", ignoring undefined bits.", flags); + flags &= mask; + } rdpRdp* rdp = input->context->rdp; WINPR_ASSERT(rdp); ``` ## Impact An authenticated remote peer of a `freerdp-proxy` instance can abort the proxy process (`WINPR_ASSERT(eventFlags < 0x20)`, `WITH_VERBOSE_WINPR_ASSERT=ON` builds) by sending one SlowPath `TS_SYNC_EVENT` whose `toggleFlags` has any bit in `0xE0` set. Denial of service for all sessions multiplexed by that proxy process. With verbose asserts disabled the outcome degrades to forwarding a FastPath synchronize event with corrupted `eventCode` bits instead of the sanitised value the commit intended. ## Suggested Fix Apply `flags &= mask;` inside the existing `if (flags & ~mask)` branch (`libfreerdp/core/input.c:392-400`) so the warning and the sanitisation cannot diverge again; the sink assertion in `fastpath_input_pdu_init` then becomes unreachable from this path. ## Disclosure Note Reporting privately first because the fix commit `78e1d69d` and the assert were introduced deliberately for peer-relayed input, so I assume this is in scope; happy to send a normal PR with the one-line change plus a regression note if you prefer.

Why it matters now

Fix Fixed FreeRDP (libfreerdp3): 3.34.0

SSVC decision points

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

Affected products

VendorProductAffected versionsFixed inStatusSource
—FreeRDP (libfreerdp3)3.31.03.34.0Patch availableGHSA-59wv-c4gf-xchm
  • FreeRDP (libfreerdp3) Vendor— Affected 3.31.0 Fixed in 3.34.0 Patch available GHSA-59wv-c4gf-xchm

Remediation

Upgrade FreeRDP (libfreerdp3) to version 3.34.0 or later. The sources list no fixed version for other FreeRDP branches.

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

  • Fix · GHSA-59wv-c4gf-xchm FreeRDP (libfreerdp3) Fixed in 3.34.0 Advisory →

Timeline

  1. 2026-12-03 Threatist record created from GHSA-59wv-c4gf-xchm

References

Sources

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