FreeType2 Heap Overflows in Parsing PFB and TTF Font Files Lets Remote Users Execute Arbitrary Code
SecurityTracker Alert ID: 1020240|
SecurityTracker URL: http://securitytracker.com/id/1020240
(Links to External Site)
Date: Jun 11 2008
Execution of arbitrary code via network, User access via network|
Fix Available: Yes Vendor Confirmed: Yes |
Version(s): 2.3.5 and prior versions|
A vulnerability was reported in FreeType2. A remote user can cause arbitrary code to be executed on the target user's system.|
A remote user can create a specially crafted Printer Font Binary (PFB) format or TrueType Font file that, when loaded by the target user or application, will trigger a heap overflow and execute arbitrary code on the target system. The code will run with the privileges of the target user or application.
The vendor was notified on June 3, 2008.
regenrecht reported this vulnerability via iDefense.
A remote user can create a file that, when loaded by the target user or application, will execute arbitrary code on the target system.|
The vendor has issued a fixed version (2.3.6), available at:|
The vendor's advisory is available at:
Vendor URL: www.freetype.org/ (Links to External Site)
|Underlying OS: Linux (Any), UNIX (Any)|
This archive entry has one or more follow-up message(s) listed below.|
Source Message Contents
Subject: iDefense Security Advisory 06.10.08: Multiple Vendor FreeType2 Multiple|
iDefense Security Advisory 06.10.08
Jun 10, 2008
FreeType2 is an open source library for parsing fonts that is used by
many applications. This includes projects such as X.Org, Second Life,
and the Sun Java JRE. For more information, please see the vendor's
website at the following URL.
Remote exploitation of multiple heap overflow vulnerabilities in the
FreeType2 library, as included in various vendors' operating systems,
could allow an attacker to execute arbitrary code with the privileges
of the affected application.
Two vulnerabilities exist within the code responsible for parsing font
The first vulnerability occurs when parsing Printer Font Binary (PFB)
format font files. PFB files contain various data structures, some of
which are stored in a tabular format. When parsing tables, the code
doesn't correctly validate a value used as an array index into a heap
buffer. The calculation contains an off-by-one error, which can result
in a heap overflow.
The second vulnerability occurs when parsing TrueType Font (TTF) font
files. TrueType font files contain "font programs" that are executed in
a TrueType virtual machine. One of the instructions in the instruction
set is 'SHC', which is used to shift a contour in the font by a
specified value. When parsing this instruction, the code doesn't
correctly validate an array index, which leads to an off-by-one heap
Exploitation of these vulnerabilities results in the execution of
arbitrary code with the privileges of the application using the
library. Since FreeType2 is a library and not a standalone application,
the exploitation vector will vary. iDefense Labs verified that local
privilege escalation was possible via the X.Org Xserver.
iDefense has confirmed the existence of these vulnerabilities in
FreeType2 version 2.3.5. Previous versions may also be affected.
iDefense is currently unaware of any workarounds for these issues.
Changing the permissions on the freetype.so library may not always be
effective since applications that run with root privileges are not
restricted by file permissions.
VI. VENDOR RESPONSE
The FreeType maintainers addressed these vulnerabilities with the
release of version 2.3.6. For more information, refer to the release
notes at the following URL.
VII. CVE INFORMATION
The Common Vulnerabilities and Exposures (CVE) project has assigned the
name CVE-2008-1808 to this issue. This is a candidate for inclusion in
the CVE list (http://cve.mitre.org/), which standardizes names for
VIII. DISCLOSURE TIMELINE
06/03/2008 Initial vendor notification
06/04/2008 Initial vendor response
06/10/2008 Coordinated public disclosure
These vulnerabilities were reported to iDefense by regenrecht.
Get paid for vulnerability research
Free tools, research and upcoming events
X. LEGAL NOTICES
Permission is granted for the redistribution of this alert
electronically. It may not be edited in any way without the express
written consent of iDefense. If you wish to reprint the whole or any
part of this alert in any other medium other than electronically,
please e-mail firstname.lastname@example.org for permission.
Disclaimer: The information in the advisory is believed to be accurate
at the time of publishing based on currently available information. Use
of the information constitutes acceptance for use in an AS IS condition.
There are no warranties with regard to this information. Neither the
author nor the publisher accepts any liability for any direct,
indirect, or consequential loss or damage arising from use of, or
reliance on, this information.