Bug 1848029 (CVE-2020-11040) - CVE-2020-11040 freerdp: Out of bound access in clear_decompress_subcode_rlex
Summary: CVE-2020-11040 freerdp: Out of bound access in clear_decompress_subcode_rlex
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2020-11040
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1848030 1848031 1850823 1850824
Blocks: 1848044
TreeView+ depends on / blocked
 
Reported: 2020-06-17 14:41 UTC by Michael Kaplan
Modified: 2021-02-16 19:51 UTC (History)
5 users (show)

Fixed In Version: freerdp 2.1.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 22:01:52 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:4031 0 None None None 2020-09-29 20:44:28 UTC
Red Hat Product Errata RHSA-2020:4647 0 None None None 2020-11-04 02:39:21 UTC

Description Michael Kaplan 2020-06-17 14:41:37 UTC
In FreeRDP less than or equal to 2.0.0, there is an out-of-bound data read from memory in clear_decompress_subcode_rlex, visualized on screen as color. This has been patched in 2.1.0.

References:

https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-x4wq-m7c9-rjgr
https://pub.freerdp.com/cve/CVE-2020-11040/

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

Affects: fedora-all [bug 1848030]


Created freerdp1.2 tracking bugs for this issue:

Affects: fedora-all [bug 1848031]

Comment 2 Todd Cullum 2020-06-25 00:27:56 UTC
clear_decompress_subcode_rlex() in libfreerdp/codec/clear.c reads in rgb data for color palettes from the input stream using a loop but does not first ensure that there is enough bytes left in the stream before reading. It first reads in palleteCount from the stream as a UINT8. It then uses palleteCount to control the number of loop iterations when reading in rgb data. It's possible for the rdp server to send a bogus palleteCount to the client in the stream, which would cause the loop to perform the out-of-bounds read on the stream. The read is still somewhat limited as the most that could be read in a call is 765 bytes, or 3 * 255, since palleteCount is a BYTE type.

This vulnerability will only be triggered if /gfx connection modes are used in the client.

Upstream patch: https://github.com/FreeRDP/FreeRDP/commit/363d7046dfec4003b91aecf7867e3b05905f3843

The patch checks length of stream before reading.

Comment 4 Todd Cullum 2020-06-25 00:38:24 UTC
Mitigation:

The flaw can be mitigated by not running the freerdp client with the /gfx connection modes and/or not connecting to untrusted or compromised rdp servers.

Comment 6 errata-xmlrpc 2020-09-29 20:44:32 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 7 Product Security DevOps Team 2020-09-29 22:01:52 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-11040

Comment 8 errata-xmlrpc 2020-11-04 02:39:20 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


Note You need to log in before you can comment on or make changes to this bug.