Bug 1848038 (CVE-2020-11043)

Summary: CVE-2020-11043 freerdp: out of bound read in rfx_process_message_tileset
Product: [Other] Security Response Reporter: Michael Kaplan <mkaplan>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: mads, mailinglists, negativo17, oholy, pahan
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: freerdp 2.1.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 22:01:57 UTC 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: 1848039, 1848040, 1850833, 1850834    
Bug Blocks: 1848044    

Description Michael Kaplan 2020-06-17 14:47:26 UTC
In FreeRDP less than or equal to 2.0.0, there is an out-of-bounds read in rfx_process_message_tileset. Invalid data fed to RFX decoder results in garbage on screen (as colors). This has been patched in 2.1.0.

References:

https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-5mr4-28w3-rc84
https://pub.freerdp.com/cve/CVE-2020-11043/

Comment 1 Michael Kaplan 2020-06-17 14:47:47 UTC
Created freerdp tracking bugs for this issue:

Affects: fedora-all [bug 1848039]


Created freerdp1.2 tracking bugs for this issue:

Affects: fedora-all [bug 1848040]

Comment 2 Todd Cullum 2020-06-25 01:59:19 UTC
This flaw affects the freerdp CLIENT. In libfreerdp/codec/rfx.c's rfx_process_message_tileset() routine, blockLen is populated by parsing a UINT32 from the input stream. If an incorrect value is supplied and parsed into blockLen, a subsequent stream length check will pass even if there is not enough bytes left in the stream, which can lead to an out-of-bounds read. The length check looks like: if (Stream_GetRemainingLength(s) < blockLen - 6) . Thus, if blockLen == 6, then the check will pass even if the remaining stream length is 0 since 0 is not less than 0. After this, the routine reads 13 bytes from the stream, which could be out-of-bounds. This results in undefined behavior that could display garbage tile data on the screen or crash the client.

The patch uses Stream_SafeSeek() to ensure the out-of-bounds read won't occur.

Upstream patch: https://github.com/FreeRDP/FreeRDP/commit/3a06ce058f690b7fc1edad2f352c453376c2ebfe

Comment 3 Todd Cullum 2020-06-25 02:02:36 UTC
Mitigation:

To mitigate this flaw, do not use /rfx, /gfx or /network:auto command line options in the freerdp client.

Comment 5 errata-xmlrpc 2020-09-29 20:44:31 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2020:4031 https://access.redhat.com/errata/RHSA-2020:4031

Comment 6 Product Security DevOps Team 2020-09-29 22:01:57 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2020-11043

Comment 7 errata-xmlrpc 2020-11-04 02:39:24 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2020:4647 https://access.redhat.com/errata/RHSA-2020:4647