Read the docs

Integer overflow in FreeRDP audin Apple backends miscalculates buffer size

Priority LOW 38CWE-131Published · 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

The audin Apple backends (macOS and iOS) in FreeRDP up to and including 3.30.0 compute AudioQueue buffer sizes without overflow checks. The size is calculated by multiplying a server-controlled FramesPerPacket value, so the result can wrap around (CWE-190). A malicious RDP server can trigger a much smaller allocation than intended during audio channel setup.

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

Description from the GitHub advisory

While auditing FreeRDP master on July 22, 2026, I found that the audin Apple backends (macOS and iOS) still use unchecked arithmetic when computing the AudioQueueAllocateBuffer size from attacker-influenced values. Reachable path: - channels/audin/client/audin_main.c: audin_process_open() reads server-controlled FramesPerPacket from MSG_SNDIN_OPEN and only rejects values >= INT32_MAX. - audin_open_device() then passes the selected format and FramesPerPacket into the backend SetFormat/Open path. - channels/audin/client/mac/audin_mac.m allocates AudioQueue buffers using: mac->FramesPerPacket * 2 * mac->format.nChannels - channels/audin/client/ios/audin_ios.m allocates AudioQueue buffers using: ios->FramesPerPacket * 2 * ios->format.nChannels Why this appears to be a bug: - Similar integer-overflow protections were added to other audin backends on July 15, 2026, but equivalent guards are not present in the Apple backends. - On macOS, audin_mac_format_supported() requires PCM with 2 channels, which is still enough to trigger wraparound with a server-controlled FramesPerPacket value below INT32_MAX. - Example reachable value: FramesPerPacket = 0x40000001 (1073741825). This passes the current audin_process_open() range check. Local runtime confirmation on macOS 26.5.2: I compiled a small Objective-C harness with AddressSanitizer + UndefinedBehaviorSanitizer that reproduces the same size expression used in the macOS backend. Observed result: - unsigned integer overflow is reported at the multiplication site - the computed allocation size wraps to 4 bytes - AudioQueueAllocateBuffer() succeeds with that wrapped size and returns a non-null buffer Observed output: work/audin_mac_alloc_probe.m:42:44: runtime error: unsigned integer overflow: 2147483650 * 2 cannot be represented in type 'unsigned int' FramesPerPacket=1073741825 nChannels=2 allocSize=4 AudioQueueAllocateBuffer rc=0 buffer=0x60b000012940 This confirms that the arithmetic is overflow-prone in practice and can lead to an undersized allocation request on macOS. Impact: At minimum, this is a remotely reachable integer overflow from a malicious RDP server in the audin negotiation path. Because the wrapped result can produce a very small successful allocation instead of a clean failure, I believe this should be treated as a potential memory-safety issue, not only resource exhaustion. I have not yet completed an end-to-end proof of an out-of-bounds write through subsequent audio-buffer usage, so the final severity may depend on maintainer validation. Affected scope: - current master as of July 22, 2026 - likely FreeRDP 3.x builds with the audin Apple backends enabled Suggested fix direction: - apply checked size arithmetic before AudioQueueAllocateBuffer() in the macOS and iOS audin backends - reject unreasonable FramesPerPacket / channel combinations early - align Apple backend protections with the checks already added to the other audin backends

Why it matters now

Fix Fixed FreeRDP: 3.31.0

SSVC decision points

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

Affected products

VendorProductAffected versionsFixed inStatusSource
—FreeRDP<= 3.30.03.31.0Patch availableGHSA-f5p6-88mh-59vg
  • FreeRDP Vendor— Affected <= 3.30.0 Fixed in 3.31.0 Patch available GHSA-f5p6-88mh-59vg

Remediation

Upgrade FreeRDP to version 3.31.0, which fixes the issue.

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

  • Fix · GHSA-f5p6-88mh-59vg FreeRDP Fixed in 3.31.0 Advisory →

Timeline

  1. 2026-11-12 Threatist record created from GHSA-f5p6-88mh-59vg

References

Sources

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