FreeRDP UVC H.264 extension-unit parser overreads short extra descriptor
Key facts
- Attack vector
- Physical
- 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-8jj2-67pg-j6mg. Fix status from GitHub.
Summary
FreeRDP's UVC H.264 extension-unit lookup trusts the length of a USB video-control interface extra descriptor after checking only its type and subtype. A local malicious USB camera can supply a four-byte extension-unit descriptor that reaches the 16-byte GUID comparison in the rdpecam V4L client path, causing an out-of-bounds heap read during camera stream setup. The attacker needs physical access, and the victim must run FreeRDP with the V4L camera path in use and interact with the redirected camera. The CVSS 3.1 base score is 2.1 (LOW).
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
Description from the GitHub advisory
## Summary FreeRDP's UVC H.264 extension-unit lookup trusts the length of a USB video-control interface extra descriptor after checking only its descriptor type and subtype. A local malicious USB camera can provide a four-byte extension-unit descriptor that reaches the 16-byte GUID comparison in the rdpecam V4L client path, causing an out-of-bounds heap read during camera stream setup. ## Affected - Project: freerdp - Repo: https://github.com/FreeRDP/FreeRDP - Pinned ref: 5044d5390035c6fd9a36ad885192d97d21e8a92d - Severity: CVSS 3.1 2.1/10 — `CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L` ## Root cause When a V4L camera stream is created, `channels/rdpecam/client/v4l/camera_v4l.c:527` calls `get_uvc_h624_unit_id(deviceId)` for the selected camera. That public helper in `channels/rdpecam/client/v4l/uvc_h264.c:482` dispatches through the USB device-id and libusb enumeration path; a matching local USB device reaches `libusb_get_config_descriptor()` at `channels/rdpecam/client/v4l/uvc_h264.c:400`. The descriptor walker then starts at `interface->extra` at `channels/rdpecam/client/v4l/uvc_h264.c:351` and continues while the pointer is still inside `extra_length`, but it casts the current pointer to `xu_descriptor` before proving that a full structure is present. A short descriptor with `bDescriptorType == USB_VIDEO_CONTROL_INTERFACE` and `bDescriptorSubType == USB_VIDEO_CONTROL_XU_TYPE` satisfies the checks at `channels/rdpecam/client/v4l/uvc_h264.c:355` and `channels/rdpecam/client/v4l/uvc_h264.c:356`; `channels/rdpecam/client/v4l/uvc_h264.c:357` then calls `memcmp(desc->guidExtensionCode, guid, 16)` even when `bLength` is only four bytes and the GUID field is absent. ## Reproduction [INT-usb-freerdp-uvc-xu-short-extra-oob.zip](https://github.com/user-attachments/files/29933431/INT-usb-freerdp-uvc-xu-short-extra-oob.zip) ```bash bash ./poc/run.sh ``` ```text run 1: exit=1 timed_out=False duration=0.14s matched=True phase=oracle fingerprint='get_guid_unit_id_from_config_descriptor' run 2: exit=1 timed_out=False duration=0.14s matched=True phase=oracle fingerprint='get_guid_unit_id_from_config_descriptor' run 3: exit=1 timed_out=False duration=0.14s matched=True phase=oracle fingerprint='get_guid_unit_id_from_config_descriptor' ``` The fingerprint is matched only when the ASan report contains the `get_guid_unit_id_from_config_descriptor` stack frame at the unchecked GUID comparison. A non-zero exit without that frame would be a setup or build failure rather than this descriptor overread. ## Impact The attacker model is a local physical attacker who can present a malicious USB video-class camera to a Linux FreeRDP client. The victim must run FreeRDP with the rdpecam V4L camera path in use so the client creates a stream for that local camera; no system credentials are required by the attacker, but user interaction is required to use the redirected camera. The malformed descriptor satisfies the video-control interface and extension-unit type/subtype guards, while the parser lacks a `bLength` or remaining-buffer check before reading the 16-byte GUID field. The demonstrated effect is a bounded heap out-of-bounds read that aborts sanitizer builds and may crash a non-sanitized client if the read crosses an inaccessible heap boundary; the evidence does not show attacker-visible data disclosure or control-flow corruption. ## Suggested fix ```001-fix.diff diff --git a/channels/rdpecam/client/v4l/uvc_h264.c b/channels/rdpecam/client/v4l/uvc_h264.c index 22951d7d1..4a814d2b9 100644 --- a/channels/rdpecam/client/v4l/uvc_h264.c +++ b/channels/rdpecam/client/v4l/uvc_h264.c @@ -349,24 +349,35 @@ static uint8_t get_guid_unit_id_from_config_descriptor(struct libusb_config_desc continue; const uint8_t* ptr = interface->extra; - while (ptr < interface->extra + interface->extra_length) + const uint8_t* end = interface->extra + interface->extra_length; + while (ptr < end) { - const xu_descriptor* desc = (const xu_descriptor*)ptr; - if (desc->bDescriptorType == USB_VIDEO_CONTROL_INTERFACE && - desc->bDescriptorSubType == USB_VIDEO_CONTROL_XU_TYPE && - memcmp(desc->guidExtensionCode, guid, 16) == 0) + const size_t remaining = WINPR_CXX_COMPAT_CAST(size_t, end - ptr); + if (remaining < 3) + break; + + const uint8_t length = ptr[0]; + if ((length == 0) || (length > remaining)) + break; + + if (ptr[1] == USB_VIDEO_CONTROL_INTERFACE && + ptr[2] == USB_VIDEO_CONTROL_XU_TYPE && length >= sizeof(xu_descriptor)) { - int8_t unit_id = desc->bUnitID; + const xu_descriptor* desc = (const xu_descriptor*)ptr; + if (memcmp(desc->guidExtensionCode, guid, 16) == 0) + { + int8_t unit_id = desc->bUnitID; - WLog_DBG(TAG, - "For camera %04" PRIx16 ":%04" PRIx16 - " found UVCX H264 UnitID %" PRId8, - ddesc->idVendor, ddesc->idProduct, unit_id); - if (unit_id < 0) - return 0; - return WINPR_CXX_COMPAT_CAST(uint8_t, unit_id); + WLog_DBG(TAG, + "For camera %04" PRIx16 ":%04" PRIx16 + " found UVCX H264 UnitID %" PRId8, + ddesc->idVendor, ddesc->idProduct, unit_id); + if (unit_id < 0) + return 0; + return WINPR_CXX_COMPAT_CAST(uint8_t, unit_id); + } } - ptr += desc->bLength; + ptr += length; } } } ``` *Reported by Team Atlanta.*
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) | <= 3.28.0 | 3.29.0 | Patch available | GHSA-8jj2-67pg-j6mg |
- FreeRDP (c) Vendor— Affected <= 3.28.0 Fixed in 3.29.0 Patch available GHSA-8jj2-67pg-j6mg
Remediation
Upgrade FreeRDP to 3.29.0, the first version fixed for 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-8jj2-67pg-j6mg FreeRDP (c) Fixed in 3.29.0 Advisory →
Timeline
- 2026-11-12 Threatist record created from GHSA-8jj2-67pg-j6mg
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences