Uninitialized heap memory leak in FreeRDP USB redirection
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · GHSA-hw7p-5h2r-83gq. Fix status from GitHub. Impact type from CWE-457 and the CVSS impact.
Summary
FreeRDP with the urbdrc USB redirection channel enabled sends uninitialized heap memory back to the RDP server after a USB transfer fails or returns less data than declared. The stale bytes contain live heap and library pointers, which a malicious server can read to defeat ASLR. The flaw is classified as CWE-457. The attacker needs no credentials, only a malicious RDP server that gets the client to redirect a device.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
Description from the GitHub advisory
This is a report on behalf of Julien Lair, Security Researcher at Quarkslab (quarkslab.com) ## Summary An information leak vulnerability that facilitates turning a heap overflow into a RCE explit that bypasses ASLR. The client sends uninitialized heap memory back to the RDP server. Those bytes contain live pointers, so a malicious server can defeat ASLR on the client. This is the piece that turns Vuln1 (the heap overflow) into a reliable RCE. The attacker is the server, no credentials needed. ## Affected products FreeRDP with the urbdrc (USB redirection) channel compiled and active. The uninitialized reserve is present from 2.0.0 to current master (the line number shifts a little between versions: around :86 from 2.0.0 to 3.5.0, :83 in 3.10.0, :134 in 3.24.2 and 3.28.0). Remmina 1.4.x through the system libfreerdp (its RDP plugin exposes USB redirection with the usb profile option, which turns on urbdrc). ## Tested products FreeRDP `993499447` (on Ubuntu 26.04 with glibc 2.43-2ubuntu2), ASLR + NX on, with a virtual USB device redirected: leak confirmed, the server recovered the client heap base and, chained with Vuln1, the libc `system` address (full RCE, see `../poc/qemu-rce/`). Earlier dynamic runs (libfreerdp 3.24.2): xfreerdp3 342 leaked-pointer hits, Remmina 1.4.40 311; both recovered connect_base and the libc system address. ## Technical description When the client finishes a USB request (a URB), urb_write_completion in channels/urbdrc/client/data_transfer.c builds the response and reserves OutputBufferSize bytes with Stream_Seek, without writing or zeroing them: ```c // channels/urbdrc/client/data_transfer.c (993499447; identical lines in 3.24.2) 100: static UINT urb_write_completion(WINPR_ATTR_UNUSED IUDEVICE* pdev, ... ... 108: if (Stream_Capacity(out) < OutputBufferSize + 36) // only a capacity check ... 133: Stream_Write_UINT32(out, OutputBufferSize); // declares the data length 134: Stream_Seek(out, OutputBufferSize); // reserves the bytes, leaves them unwritten ``` Stream_Seek only moves the stream position, it does not fill the reserved space. The same pattern is in a second completion path at data_transfer.c:892/:893. OutputBufferSize is how much data the transfer was supposed to return. When a control transfer IN fails (the device stalls, LIBUSB_ERROR_PIPE) or returns fewer bytes than declared, that reserved space is never filled with device data. The completion PDU then goes to the server with OutputBufferSize bytes of stale heap taken from the stream's backing allocation. Those stale bytes hold live heap and library pointers from the client process. A malicious server that gets the client to redirect a device and then issues IN transfers that fail reads back tens of kilobytes of client memory, and from it rebuilds connect_base (the client heap and connection arena) and the libc base, so the address of system. That defeats ASLR, which is exactly what Vuln1 needs. The victim must have USB redirection active (xfreerdp /usb:..., or the usb option in a Remmina profile) with a device redirected. On Linux the client needs access to the USB node, which usually means running it as root or with libusb access. ## Recommended fix On a failed or short IN transfer, set OutputBufferSize to 0 (or return a no-data completion), and zero the reserved region before sending (use Stream_Zero instead of Stream_Seek), so no uninitialized memory ever leaves the client.
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 | 2.x | — | No fix listed | GHSA-hw7p-5h2r-83gq |
| — | FreeRDP | <= 3.30.0 | 3.31.0 | Patch available | GHSA-hw7p-5h2r-83gq |
- FreeRDP Vendor— Affected 2.x Fixed in — No fix listed GHSA-hw7p-5h2r-83gq
- FreeRDP Vendor— Affected <= 3.30.0 Fixed in 3.31.0 Patch available GHSA-hw7p-5h2r-83gq
Remediation
Upgrade FreeRDP to 3.31.0, which fixes versions up to and including 3.30.0. The sources list no fixed version for FreeRDP 2.x.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
- Fix · GHSA-hw7p-5h2r-83gq FreeRDP Fixed in 3.31.0 Advisory →
Timeline
- 2026-11-12 Threatist record created from GHSA-hw7p-5h2r-83gq
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences