Read the docs

FreeRDP serial DeviceControl reachable assertion DoS

Priority LOW 35Published · Updated

Key facts

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

Attack profile from CVSS 3.1 · GHSA-pfxq-3qmw-8vjx. Fix status from GitHub.

Summary

FreeRDP's serial channel client has a reachable assertion in serial_process_irp_device_control() in channels/serial/client/serial_main.c. When serial redirection is enabled and a remote server sends an unsupported or failing IOCTL with OutputBufferLength set to 1, CommDeviceIoControl() returns BytesReturned = 0, the WINPR_ASSERT(OutputBufferLength == BytesReturned) check fails, and the client aborts. The issue is rated CVSS 3.1 4.3 (MEDIUM) with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L.

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

Description from the GitHub advisory

# FreeRDP serial DeviceControl reachable assertion DoS ## Summary I found a locally reproducible client-side denial-of-service issue in FreeRDP's serial redirected-device handling. `channels/serial/client/serial_main.c` contains a reachable assertion in `serial_process_irp_device_control()`: ```c WINPR_ASSERT(OutputBufferLength == BytesReturned); ``` `OutputBufferLength` is read from a server-controlled serial `IRP_MJ_DEVICE_CONTROL` request. If serial redirection is enabled and the remote server sends an unsupported or failing IOCTL with `OutputBufferLength = 1`, `CommDeviceIoControl()` can fail with `BytesReturned = 0`. The mismatch is logged, and the client aborts at the assertion. This was reproduced locally in Docker against current upstream HEAD `1cc783d4c78bd2f66d3a8582dfe70a663d141444` and the latest supported 3.x release tag `3.28.0` (`5370fb26fbf034ecd11d3026b6ad639b5fff493f`). Credit: Bin Luo, University of Electronic Science and Technology of China (UESTC), `[email protected]`. ## Affected code - `channels/serial/client/serial_main.c:366`, `serial_process_irp_device_control()` - `OutputBufferLength` is read from the IRP at line `381` - `InputBufferLength` is read at line `382` - `CommDeviceIoControl()` is called at lines `411-412` - reachable assertion at line `432` Production dispatch path: - `serial_process_irp()` dispatches `IRP_MJ_DEVICE_CONTROL` at lines `466-504` - `serial_irp_request()` posts server IRPs to the serial worker queue at lines `769-788` ## Reproduction Harness: - Minimal local Docker harness available on request; it includes the production `channels/serial/client/serial_main.c` source and calls the real `serial_process_irp()` dispatch path with an `IRP_MJ_DEVICE_CONTROL` request. The harness includes the production `channels/serial/client/serial_main.c` source and calls the real `serial_process_irp()` dispatch path with an `IRP_MJ_DEVICE_CONTROL` request. The stronger reproducer maps a WinPR comm device to Docker's `/dev/ptmx`: ```text DefineCommDevice("COM1", "/dev/ptmx") CommCreateFileA("COM1", GENERIC_READ | GENERIC_WRITE, ...) serial_process_irp(out_len=1, in_len=0, ioctl=0x0BADF00D) ``` Control case: - `OutputBufferLength = 0` - unsupported IOCTL fails cleanly - process exits `0` Trigger case: - `OutputBufferLength = 1` - unsupported IOCTL fails with `BytesReturned = 0` - process aborts at `serial_main.c:432` - process exits `134` ## Fresh local Docker evidence Rerun on 2026-07-07: ```text === release realdev out0 === exit=0 === release realdev out1 === exit=134 === v3.28.0 asan realdev out1 === exit=134 opened WinPR comm device COM1 -> /dev/ptmx calling serial_process_irp(out_len=0, in_len=0, ioctl=0x0badf00d) [WARN][com.winpr.comm] - unsupported IoControlCode=[0x0BADF00D] returned rc=0 IoStatus=0xc0000002 output_pos=4 opened WinPR comm device COM1 -> /dev/ptmx calling serial_process_irp(out_len=1, in_len=0, ioctl=0x0badf00d) [WARN][com.winpr.comm] - unsupported IoControlCode=[0x0BADF00D] [WARN][com.winpr.comm] - lpBytesReturned=0 and nOutBufferSize=1 are different! freerdp_serial_device_control_harness_release: /workspace/scan_repos/freerdp_1cc783d/channels/serial/client/serial_main.c:432: serial_process_irp_device_control: Assertion `((OutputBufferLength == BytesReturned))' failed. opened WinPR comm device COM1 -> /dev/ptmx calling serial_process_irp(out_len=1, in_len=0, ioctl=0x0badf00d) [WARN][com.winpr.comm] - unsupported IoControlCode=[0x0BADF00D] [WARN][com.winpr.comm] - lpBytesReturned=0 and nOutBufferSize=1 are different! freerdp_serial_device_control_harness_v3_28_0_asan: /workspace/audit_freerdp_20260706/freerdp_3_28_0_src/channels/serial/client/serial_main.c:432: serial_process_irp_device_control: Assertion `((OutputBufferLength == BytesReturned))' failed. ``` Stored evidence is available on request; the key local Docker output is included above. ## Reachability This is a client-side optional channel issue: 1. The user enables serial port redirection. 2. The FreeRDP client connects to a malicious or compromised RDP server. 3. The server sends a serial redirected-device `IRP_MJ_DEVICE_CONTROL` request. 4. The request reaches `serial_irp_request()` and the serial worker dispatches it through `serial_process_irp()`. 5. `serial_process_irp_device_control()` reads the server-controlled `OutputBufferLength`. 6. A failing/unsupported IOCTL leaves `BytesReturned = 0`. 7. If `OutputBufferLength != 0`, the assertion aborts the client. ## Impact The confirmed impact is availability only: client process abort. I do not claim code execution or memory corruption. This is a reliable optional-channel client DoS. ## Suggested fix direction Do not assert that the driver returned exactly the requested output length after a failed IOCTL. Safer behavior would be: - treat mismatch as a warning/debug signal only; - write the actual `BytesReturned`; - cap `BytesReturned <= OutputBufferLength` before writing response data; - return the appropriate `IoStatus` for the failed IOCTL.

Why it matters now

Fix Fixed FreeRDP: 3.29.0

SSVC decision points

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

Affected products

VendorProductAffected versionsFixed inStatusSource
—FreeRDP<= 3.28.03.29.0Patch availableGHSA-pfxq-3qmw-8vjx
  • FreeRDP Vendor— Affected <= 3.28.0 Fixed in 3.29.0 Patch available GHSA-pfxq-3qmw-8vjx

Remediation

Upgrade FreeRDP to 3.29.0, which fixes this issue. Versions up to and including 3.28.0 are affected.

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

  • Fix · GHSA-pfxq-3qmw-8vjx FreeRDP Fixed in 3.29.0 Advisory →

Timeline

  1. 2026-11-12 Threatist record created from GHSA-pfxq-3qmw-8vjx

References

Sources

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