Bug 2236744 (CVE-2023-40187)

Summary: CVE-2023-40187 freerdp: Use-After-Free in avc420_ensure_buffer, avc444_ensure_buffer
Product: [Other] Security Response Reporter: Marian Rehak <mrehak>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: desktop-qa-list, oholy
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: freerdp 3.0.0-beta3 Doc Type: If docs needed, set a value
Doc Text:
A use-after-free flaw was found in FreeRDP. This issue occurs in the `avc420_ensure_buffer` and `avc444_ensure_buffer` functions, which may result in a crash.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2236745, 2236746    
Bug Blocks: 2236652    

Description Marian Rehak 2023-09-01 12:56:17 UTC
FreeRDP is a free implementation of the Remote Desktop Protocol (RDP), released under the Apache license. Affected versions of the 3.x beta branch are subject to a Use-After-Free issue in the `avc420_ensure_buffer` and `avc444_ensure_buffer` functions. If the value of `piDstSize[x]` is 0, `ppYUVDstData[x]` will be freed. However, in this case `ppYUVDstData[x]` will not have been updated which leads to a Use-After-Free vulnerability. This issue has been addressed in version 3.0.0-beta3. Users of the 3.x beta releases are advised to upgrade. There are no known workarounds for this vulnerability.

https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-pwf9-v5p9-ch4f
https://github.com/FreeRDP/FreeRDP/blob/5be5553e0da72178a4b94cc1ffbdace9ceb153e5/libfreerdp/codec/h264.c#L413-L427

Comment 2 Ondrej Holy 2023-09-01 14:06:44 UTC
The upstream report says that this vulnerability affects just version 3. But freerdp 3 isn't included in Fedora, or RHEL. So I think that this can be closed, can't be?