Bug 1191089 (CVE-2014-9666)

Summary: CVE-2014-9666 freetype: integer overflow in tt_sbit_decoder_init() leading to out-of-bounds read
Product: [Other] Security Response Reporter: Vasyl Kaigorodov <vkaigoro>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: behdad, fonts-bugs, kevin, mkasik
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: freetype 2.5.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-23 09:55:46 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: 1191099    
Bug Blocks: 1191102    

Description Vasyl Kaigorodov 2015-02-10 12:51:41 UTC
Common Vulnerabilities and Exposures assigned CVE-2014-9666 to the following issue:

The tt_sbit_decoder_init function in sfnt/ttsbit.c in FreeType before 2.5.4
proceeds with a count-to-size association without restricting the count value,
which allows remote attackers to cause a denial of service (integer overflow and
out-of-bounds read) or possibly have unspecified other impact via a crafted
embedded bitmap.

http://code.google.com/p/google-security-research/issues/detail?id=167
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=257c270bd25e15890190a28a1456e7623bba4439

Comment 1 Vasyl Kaigorodov 2015-02-10 12:57:05 UTC
Created freetype tracking bugs for this issue:

Affects: fedora-all [bug 1191099]

Comment 2 Fedora Update System 2015-02-19 18:01:20 UTC
freetype-2.5.3-15.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 3 Fedora Update System 2015-02-20 08:30:55 UTC
freetype-2.5.0-9.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 4 Tomas Hoger 2015-02-23 09:55:46 UTC
Upstream bug is:
https://savannah.nongnu.org/bugs/?43591

Issue was fixed upstream in 2.5.4.

The issue is an integer overflow flaw in a check protecting against out-of-bounds reads.  The check was originally introduced in:

http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=88ab638e

Affected code is not build and used in the freetype packages in Red Hat Enterprise Linux.  In versions prior to 2.5, the code was only used when FT_CONFIG_OPTION_OLD_INTERNALS macro was not defined.  Upstream default was to define the macro and it only became undefined by default in upstream version 2.4.12:

http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=e4ecce3b

The freetype packages in Red Hat Enterprise Linux 7 are based on upstream version 2.4.11 or older and do not override this upstream default.

Statement:

This issue did not affect the versions of freetype as shipped with Red Hat Enterprise Linux 5, 6, and 7.