Xvid Codec MBlock Indexing Buffer Overflow

Notification Type: IBM Internet Security Systems Protection Advisory
Notification Date: June 01, 2009
Notification Version: 1.0
   
Name:

Xvid Codec MBlock Indexing Buffer Overflow

Public disclosure/
In the wild date:
May 29, 2009 (vuln disclosure)
CVE:

CVE-2009-0893

Description: Xvid video codec is vulnerable to a heap-based buffer overflow, caused by improper bounds checking.  By persuading a victim to open a specially-crafted movie file, a remote attacker could overflow a buffer to corrupt memory and execute arbitrary code on the affected system with privileges of the victim.
Discoverer: This vulnerability was discovered and researched by John McDonald and
Christopher Valasek of the IBM X-Force.

 

ISS Coverage

Product Content Version

Network Sensor 7.0
Proventia A
Proventia IPS (G/GX)
Server Sensor 7.0
Proventia Multifunction Appliance
Proventia Mail
Proventia Server (Linux)

XPU 29.050
Proventia Server (Windows)
Proventia Desktop
2390
Propagation Techniques ISS Protection Available
remote exploit Codec_Range_Error  May 12, 2009

Detailed Description

Business Impact:

Compromise of machines using affected versions of the Xvid
software may lead to exposure of confidential information, loss of productivity,
and further compromise. In order to perform a sucessful attack, an attacker must cause the victim user to view a malicious movie file. Successful exploitation grants an attacker the privileges of the victim user.

Vulnerable users can be attacked through this vulnerability on both Windows and Unix systems, through any media application that uses the Xvid codec. IBM ISS has verified vulnerability on Windows Media Player under Windows, but it is likely that the issue is exploitable under Unix systems as well. The DivX codec is not vulnerable to this issue, which can make a vulnerable system appear safe due to its filter interpositioning. However, a knowledgable attacker can often bypass DivX and directly invoke the Xvid codec by using specific media types.

CVSS: Base Score: 9.3
  Access Vector: Network
Access Complexity: Medium
Authentication: None
Confidentiality Impact: Complete
Integrity Impact: Complete
Availability Impact: Complete
Impact Bias: Normal 
Adjusted Temporal Score: 6.9
  Exploitability: Unproven
Remediation Level: Official fix
Report Confidence: Confirmed 
Affected Products: For a full list of affected software and versions, see references below.
Technical Description:

In certain situations, a video stream can directly provide a macroblock number, which is an index into a large datastructure used in the decoding of video. This macroblock number is stored in the file using a variable bit-length field that attempts to use as few bits as necessary to represent the number. This design appears safe as it considerably limits the maximum macroblock that a file can index, but it is insufficient protection. An attacker can carefully choose other aspects of the file and specify a macroblock number that will modify memory outside of the bounds of the intended data structure.  Ultimately, this leads to attacker-controlled corruption of data on the heap, which leads to arbitrary code execution.

Remediation:

Patches were made available on  May 29, 2009.  IBM ISS customers should also enable protection described in this advisory.

References

Xvid: http://www.xvid.org/News.64.0.html?&cHash=0170b4e439&tx_ttnews[backPid]=64&tx_ttnews[tt_news]=7
XFDB: http://xforce.iss.net/xforce/xfdb/44654

Revision History

1.0 Initial publication.

* According to the Forum of Incident Response and Security Teams (FIRST), the Common Vulnerability Scoring System (CVSS) is an "industry open standard designed to convey vulnerability severity and help to determine urgency and priority of response." IBM PROVIDES THE CVSS SCORES "AS IS" WITHOUT WARRANTY OF ANY KIND, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. CUSTOMERS ARE RESPONSIBLE FOR ASSESSING THE IMPACT OF ANY ACTUAL OR POTENTIAL SECURITY VULNERABILITY.
The information within this database may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall IBM be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.

About IBM Internet Security Systems

IBM Internet Security Systems is a trusted security advisor to thousands of the world's leading businesses and governments, helping to provide pre-emptive protection for networks, desktops and servers. The IBM Proventia® integrated security platform is designed to automatically protect against both known and unknown threats, helping to keep networks up and running and shield customers from online attacks before they impact business assets. IBM Internet Security Systems products and services are based on the proactive security intelligence of its X-Force® research and development team – an unequivocal world authority in vulnerability and threat research. The IBM Internet Security Systems product line is also complemented by comprehensive Managed Security Services and Professional Security Services. For more information, visit the IBM Internet Security Systems Web site at www.iss.net or call 800-776-2362.