Bug 998941 - (CVE-2014-0791) CVE-2014-0791 freerdp: integer overflow in heap allocation in license_read_scope_list()
CVE-2014-0791 freerdp: integer overflow in heap allocation in license_read_sc...
Status: NEW
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
: Security
Depends On: 983080 983081
Blocks: 982959 999871
  Show dependency treegraph
Reported: 2013-08-20 07:46 EDT by Florian Weimer
Modified: 2016-03-04 06:36 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Possible patch (773 bytes, patch)
2014-01-02 03:55 EST, Huzaifa S. Sidhpurwala
no flags Details | Diff

  None (edit)
Description Florian Weimer 2013-08-20 07:46:34 EDT
This is from libfreerdp-core/license_read_scope_list():

	stream_read_uint32(s, scopeCount); /* ScopeCount (4 bytes) */

	scopeList->count = scopeCount;
	scopeList->array = (LICENSE_BLOB*) xmalloc(sizeof(LICENSE_BLOB) * scopeCount);

Assuming that scopeCount is read from the wire, this results in an integer overflow in the size computation.  The array is subsequentially filled with pointers and constants, so this is probably not exploitable for anything but a crash:

	/* ScopeArray */
	for (i = 0; i < scopeCount; i++)
		scopeList->array[i].type = BB_SCOPE_BLOB;
		license_read_binary_blob(s, &scopeList->array[i]);

But I'm filing it as an embargoed security bug just to be sure.
Comment 6 Huzaifa S. Sidhpurwala 2014-01-02 03:55:29 EST
Created attachment 844423 [details]
Possible patch
Comment 7 Florian Weimer 2014-01-02 04:00:03 EST
(In reply to Huzaifa S. Sidhpurwala from comment #6)
> Created attachment 844423 [details]
> Possible patch

Patch looks good to me.
Comment 8 Huzaifa S. Sidhpurwala 2014-01-02 04:07:55 EST
This is now submitted as a pull request for upstream at:

Comment 9 Murray McAllister 2014-01-05 22:19:46 EST
This issue was assigned CVE-2014-0791:

Comment 10 Huzaifa S. Sidhpurwala 2014-03-24 01:57:11 EDT
Fixed upstream via:


(There is no new release yet)
Comment 11 Huzaifa S. Sidhpurwala 2014-05-28 04:36:23 EDT

This issue affects the version of freerdp as shipped with Red Hat Enterprise Linux 6. The Red Hat Security Response Team has rated this issue as having Moderate security impact, a future update may address this flaw.

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