FreeRDP rdpecam StartStreamsRequest divide-by-zero DoS
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · Low
- Fix status
- Fixed
Attack profile from CVSS 3.1 · GHSA-v89x-pc32-hqr7. Fix status from GitHub. Impact type from CWE-369.
Summary
FreeRDP's rdpecam camera redirection client does not reject a FrameRateDenominator of 0 in a StartStreamsRequest PDU. ecam_encoder_context_init() divides FrameRateNumerator by that value, so a malicious or compromised RDP server can cause a division by zero (CWE-369) and crash the client with SIGFPE before the camera HAL StartStream callback runs. The crash does not require a camera device. The issue is rated CVSS 4.3 (MEDIUM) and affects FreeRDP 3.28.0 and earlier.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
Description from the GitHub advisory
## Summary I found a locally reproducible client-side denial-of-service issue in FreeRDP's rdpecam camera redirection client. `ecam_dev_process_start_streams_request()` reads a server-controlled `CAM_MEDIA_TYPE_DESCRIPTION` from a `StartStreamsRequest` PDU. The parser validates the media format and flags, but it does not reject `FrameRateDenominator == 0`. The value is stored in `stream->currMediaType`, and `ecam_encoder_context_init()` immediately computes: ```c const UINT32 framerate = stream->currMediaType.FrameRateNumerator / stream->currMediaType.FrameRateDenominator; ``` A malicious or compromised RDP server can send `FrameRateNumerator = 30` and `FrameRateDenominator = 0`, causing SIGFPE / integer division-by-zero in the FreeRDP client before the camera HAL `StartStream` callback is reached. This was reproduced locally in Docker against current upstream HEAD `1cc783d4c78bd2f66d3a8582dfe70a663d141444` and checked against FreeRDP `3.28.0` (`5370fb26fbf034ecd11d3026b6ad639b5fff493f`). Credit: Bin Luo, University of Electronic Science and Technology of China (UESTC), `[email protected]`. ## Affected code - `channels/rdpecam/client/camera_device_main.c`, `ecam_dev_read_media_type()` - reads `FrameRateNumerator` - reads `FrameRateDenominator` - validates only `Format` and `Flags` - `channels/rdpecam/client/camera_device_main.c`, `ecam_dev_process_start_streams_request()` - stores `stream->currMediaType = mediaType` - calls `ecam_encoder_context_init(stream)` - `channels/rdpecam/client/encoding.c`, `ecam_encoder_context_init()` - divides `FrameRateNumerator / FrameRateDenominator` The same unchecked division is present in FreeRDP `3.28.0`. ## Reachability 1. The FreeRDP client enables camera redirection. 2. A malicious or compromised RDP server opens the rdpecam dynamic virtual channel. 3. The server sends a `CAM_MSG_ID_StartStreamsRequest` PDU. 4. `ecam_dev_on_data_received()` dispatches it to `ecam_dev_process_start_streams_request()`. 5. `ecam_dev_read_media_type()` reads the server-controlled frame-rate numerator and denominator. 6. `ecam_encoder_context_init()` divides by the denominator before `dev->ihal->StartStream()`. The crash does not require a real camera device because it occurs before the HAL `StartStream` callback. ## Reproduction evidence Harness: - `audit_freerdp_20260706/docker_repro/freerdp_rdpecam_start_stream_harness.c` This harness includes the production `channels/rdpecam/client/encoding.c` and `channels/rdpecam/client/camera_device_main.c`, links against the local FreeRDP/WinPR build, constructs a `StartStreamsRequest` PDU, and calls the real `ecam_dev_process_start_streams_request()` parser/dispatcher path. Current HEAD matrix: - `audit_freerdp_20260706/docker_repro/rdpecam_start_stream_matrix.txt` Key result: ```text ===== asan num=30 den=0 ===== calling ecam_dev_process_start_streams_request(width=640, height=480, fps=30/0) /workspace/scan_repos/freerdp_1cc783d/channels/rdpecam/client/encoding.c:127:47: runtime error: division by zero AddressSanitizer: FPE SUMMARY: AddressSanitizer: FPE ... in ecam_encoder_context_init exit=134 ===== release num=30 den=0 ===== calling ecam_dev_process_start_streams_request(width=640, height=480, fps=30/0) exit=136 ``` Control cases: - `FrameRateNumerator=30`, `FrameRateDenominator=1`: exits cleanly - `FrameRateNumerator=0`, `FrameRateDenominator=1`: exits cleanly - `FrameRateNumerator=30`, `FrameRateDenominator=0`: crashes Supported-release check: - `audit_freerdp_20260706/docker_repro/rdpecam_start_stream_v3_28_0_stubvideo_matrix.txt` The `3.28.0` source check uses the same production rdpecam source files with a minimal `freerdp_video_context_reconfigure()` stub to avoid local host FFmpeg/glibc dependency mismatch. The stub is marked `noinline` and consumes the `framerate` argument so the division is not optimized away. Key result: ```text ===== v3.28.0-stubvideo-release num=30 den=0 ===== calling ecam_dev_process_start_streams_request(width=640, height=480, fps=30/0) exit=136 ``` ## Impact Confirmed impact is client process abort / denial of service. I am not claiming RCE or memory corruption. ## Suggested fix Reject zero frame-rate numerator/denominator values before `ecam_encoder_context_init()`: ```c if (mediaType.FrameRateDenominator == 0 || mediaType.FrameRateNumerator == 0) { ecam_channel_send_error_response(dev->ecam, hchannel, CAM_ERROR_CODE_InvalidMediaType); return ERROR_INVALID_DATA; } ``` The denominator check is required to prevent the confirmed SIGFPE. The numerator check avoids accepting a nonsensical `0 fps` media type, which the current code accepts in the local control case.
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 (c/c++ native project) | <= 3.28.0 | 3.29.0 | Patch available | GHSA-v89x-pc32-hqr7 |
- FreeRDP (c/c++ native project) Vendor— Affected <= 3.28.0 Fixed in 3.29.0 Patch available GHSA-v89x-pc32-hqr7
Remediation
Update FreeRDP to 3.29.0, which fixes the issue.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
- Fix · GHSA-v89x-pc32-hqr7 FreeRDP (c/c++ native project) Fixed in 3.29.0 Advisory →
Timeline
- 2026-11-12 Threatist record created from GHSA-v89x-pc32-hqr7
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences