Bug 445829 (CVE-2008-1803)

Summary: CVE-2008-1803 rdesktop: channel_process() Integer Signedness Vulnerability
Product: [Other] Security Response Reporter: Tomas Hoger <thoger>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: davidz, kreilly, sandmann
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://nvd.nist.gov/nvd.cfm?cvename=CVE-2008-1803
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-25 06:23:55 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: 445841, 445842, 445843, 452978, 452979    
Bug Blocks:    

Description Tomas Hoger 2008-05-09 10:19:33 UTC
iDefense published advisory affecting rdesktop:

DESCRIPTION:
Remote exploitation of an integer signedness vulnerability in rdesktop, as
included in various vendors' operating system distributions, allows attackers
to execute arbitrary code with the privileges of the logged-in user.

The vulnerability exists within the code responsible for reallocating dynamic
buffers. The rdesktop xrealloc() function uses a signed comparison to determine
if the requested allocation size is less than 1. When this occurs, the function
will incorrectly set the allocation size to be 1. This results in an improperly
sized heap buffer being allocated, which can later be overflowed.

ANALYSIS:
Exploitation of this vulnerability results in the execution of arbitrary code
with the privileges of the logged in user. In order to exploit this
vulnerability, an attacker must persuade a targeted user to connect to a
malicious RDP server. 

Reference:
http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=698

Upstream patch:
http://rdesktop.cvs.sourceforge.net/rdesktop/rdesktop/rdesktop.c?r1=1.161&r2=1.162

Comment 5 Tomas Hoger 2008-05-14 06:12:03 UTC
Upstream released version 1.6.0 which address this issue:

http://sourceforge.net/mailarchive/message.php?msg_name=20080511065217.GA24455%40cse.unsw.EDU.AU


Comment 6 Fedora Update System 2008-05-14 22:08:24 UTC
rdesktop-1.6.0-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2008-05-14 22:12:26 UTC
rdesktop-1.6.0-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2008-05-14 22:15:08 UTC
rdesktop-1.6.0-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Tomas Hoger 2008-06-23 16:48:40 UTC
This issue did not affect rdesktop packages as shipped in Red Hat Enterprise
Linux 3 and 4.  xrealloc in those versions (1.2.0 and 1.3.1 respectively) does
not set size to 1 when size is lower than 1.  Negative size values are cast to
large positive when passed as size_t-typed argument to realloc.