Read the docs

Heap out-of-bounds read in FreeRDP TSMF AVC1 decoding

Priority LOW 38Published · Updated

Key facts

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

No CVSS vector from any source. Fix status from GitHub.

Summary

FreeRDP versions up to and including 3.28.0 are affected. The TSMF FFmpeg decoder path reads fixed offsets from an AVC1 MPEG2VIDEOINFO media type without first checking that the supplied ExtraData is long enough, which is a missing bounds check. A server that sends a malformed media format can make the client read past a heap buffer, causing a crash. The sources report no exploitation, and the deprecated TSMF FFmpeg path must be available for the flaw to be reachable.

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

Description from the GitHub advisory

## Summary FreeRDP's deprecated/optional TSMF FFmpeg decoder path can read out of bounds when parsing AVC1 MPEG2VIDEOINFO media types with short ExtraData. The media type parser accepts a short nonzero ExtraData buffer, but the FFmpeg AVC1 converter later reads fixed offsets without checking the source length first. Reporter / credit: Bin Luo, UESTC ## Confirmed versions - Current HEAD tested during reproduction: 8d3b86022f0d71aefa7bd2e466d2d391693a41b3 - Supported release checked: 3.28.0 - Relevant files unchanged between 3.28.0 and the tested head: channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c and channels/tsmf/client/tsmf_codec.c ## Affected code path - channels/tsmf/client/tsmf_codec.c: tsmf_read_format_type() - channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c: tsmf_ffmpeg_init_stream() ## Root cause tsmf_read_format_type() accepts MPEG2VIDEOINFO media types where cbFormat leaves a short nonzero ExtraDataSize. For TSMF_FORMAT_TYPE_MPEG2VIDEOINFO, the parser sets: - mediatype->ExtraDataSize = cbFormat - parsed_header_size - mediatype->ExtraData = Stream_Pointer(s) It checks that the declared ExtraDataSize bytes exist in the stream, but it does not enforce the subtype-specific minimum expected by the AVC1 converter. tsmf_ffmpeg_init_stream() then handles AVC1 + MPEG2VIDEOINFO and reads fixed offsets before checking that ExtraDataSize is large enough: - media_type->ExtraData[8] - media_type->ExtraData[12] - media_type->ExtraData + 20 - *(s + 1) The existing required-size checks guard the destination extradata allocation, not the source ExtraDataSize before fixed-offset reads. ## Reproduction evidence I reproduced this with a Docker/ASan harness that uses production parsing and decoder code: 1. Build an AVC1 + MPEG2VIDEOINFO media type. 2. Parse it with tsmf_codec_parse_media_type(). 3. Enter the real FFmpeg decoder via ffmpeg_freerdp_tsmf_client_decoder_subsystem_entry(). 4. Call decoder->SetFormat(), which reaches tsmf_ffmpeg_init_stream(). ASan result for ExtraDataSize=1: parsed MajorType=1 SubType=10 FormatType=3 ExtraDataSize=1 ERROR: AddressSanitizer: heap-buffer-overflow READ of size 1 tsmf_ffmpeg_init_stream channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c:226 Control for ExtraDataSize=24: parsed MajorType=1 SubType=10 FormatType=3 ExtraDataSize=24 SetFormat returned 0 The control uses enough source bytes to avoid the fixed-offset OOB read; FFmpeg later rejects the intentionally invalid codec data without ASan findings. ## Impact Confirmed impact is client-side heap out-of-bounds read / crash from malformed server-controlled media format data. Constraints: - TSMF is deprecated and optional. - The FFmpeg decoder path must be available. - No RCE or attacker-controlled write primitive is demonstrated. ## Suggested fix Before the AVC1/MPEG2VIDEOINFO conversion reads fixed offsets, validate the source ExtraDataSize. A robust fix should check each source length field before reading it, then validate that size + 2 remains available before memcpy().

Why it matters now

Fix Fixed FreeRDP (c/c++): 3.29.0

SSVC decision points

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

Affected products

VendorProductAffected versionsFixed inStatusSource
—FreeRDP (c/c++)<= 3.28.03.29.0Patch availableGHSA-whq8-c3v3-p8v8
  • FreeRDP (c/c++) Vendor— Affected <= 3.28.0 Fixed in 3.29.0 Patch available GHSA-whq8-c3v3-p8v8

Remediation

Upgrade FreeRDP to version 3.29.0 or later, which fixes the flaw.

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

  • Fix · GHSA-whq8-c3v3-p8v8 FreeRDP (c/c++) Fixed in 3.29.0 Advisory →

Timeline

  1. 2026-11-12 Threatist record created from GHSA-whq8-c3v3-p8v8

References

Sources

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