Bug 445825 (CVE-2008-1801)

Summary: CVE-2008-1801 rdesktop: iso_recv_msg() Integer Underflow 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, zcerza
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://nvd.nist.gov/nvd.cfm?cvename=CVE-2008-1801
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-25 06:21:20 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, 452980, 452981    
Bug Blocks:    
Attachments:
Description Flags
Public PoC none

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

DESCRIPTION:
Remote exploitation of an integer underflow 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 reading in an RDP
request. When reading a request, a 16-bit integer value that represents the
number of bytes that follow is taken from the packet. This value is then
decremented by 4, and used to calculate how many bytes to read into a heap
buffer. The subtraction operation can underflow, which will then lead to the
heap buffer being 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=696

Upstream patch:
http://rdesktop.cvs.sourceforge.net/rdesktop/rdesktop/iso.c?r1=1.19&r2=1.20

Comment 5 Tomas Hoger 2008-05-14 06:12:08 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:17 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:30 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:10 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-05-27 14:44:04 UTC
Created attachment 306783 [details]
Public PoC

http://www.milw0rm.com/exploits/5561

Comment 11 Tomas Hoger 2008-06-23 16:17:47 UTC
As for CVSSv2 score, two possibilities should be considered.  User needs to be
convinced to connect to untrusted RDP server for this issue to be exploited. 
This is lot more likely to happen if malicious RDP server is within some local
network (AV:A/AC:M) and not so likely for random RDP server in the Internet
(AV:N/AC:H), hence Internet vector should have higher access complexity.

AV:A/AC:M results in higher base score of:
5.4/AV:A/AC:M/Au:N/C:P/I:P/A:P