Bug 800591 (CVE-2012-1133)
Summary: | CVE-2012-1133 freetype: heap buffer underflow in BDF parser _bdf_parse_glyphs() (#35607) | ||
---|---|---|---|
Product: | [Other] Security Response | Reporter: | Jan Lieskovsky <jlieskov> |
Component: | vulnerability | Assignee: | Red Hat Product Security <security-response-team> |
Status: | CLOSED NOTABUG | QA Contact: | |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | unspecified | CC: | behdad, fonts-bugs, jrusnack, kevin, mkasik |
Target Milestone: | --- | Keywords: | Security |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-02-24 22:03:12 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: | 806270, 806271, 889398 | ||
Bug Blocks: | 800639 |
Description
Jan Lieskovsky
2012-03-06 18:51:19 UTC
Added CVE as per http://www.openwall.com/lists/oss-security/2012/03/06/16 This issue did NOT affect the versions of the freetype package, as shipped with Red Hat Enterprise Linux 5 and 6. -- This issue affects the versions of the freetype package, as shipped with Fedora release of 15 and 16. This problem is triggered by a negative value of the glyph's ENCODING parameter and can cause freetype to index glyphs array (an array of bdf_glyph_t) using index -1. The glyph structure is both read and written to. It seems this issue existed in old freetype versions. It was later resolved via the following commit: http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=481838e2 That commit addresses a security issue CVE-2006-1861 (bug 484437, bug 190593) related to the large ENCODING values causing buffer overflow. The fix ensures that ENCODING value is not negative and not too large. The fix was backported to freetype packages in Red Hat Enterprise Linux 2.1, 3, and 4: https://access.redhat.com/security/cve/CVE-2006-1861 The freetype packages in Red Hat Enterprise Linux 5 and 6 are based on upstream versions that include the fix. However, the fix introduced a regression and caused valid ENCODING value of -1 to be rejected as invalid. This was reported upstream and resolved via: https://savannah.nongnu.org/bugs/?33663 http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=96ddc679 That regression fix re-introduced the security problem. The regression fix is no included in freetype packages in Red Hat Enterprise Linux 4, 5 and 6. Statement: Not vulnerable. This issue did not affect freetype packages as shipped with Red Hat Enterprise Linux 3, 4, 5, and 6. (In reply to comment #8) > It seems this issue existed in old freetype versions. It was later resolved > via the following commit: > > http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=481838e2 Note there is additional follow up patch: http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=b698eeda That patch add explicit conversion of p->glyph_enc to size_t for comparison (which causes negative values to be converted to large positive unsigned value). However, as glyph_enc is (signed) long and the right side of the comparison is of the size_t type, gcc does implicit conversion of the p->glyph_enc to unsigned long and hence error is reported. > The freetype packages in Red Hat Enterprise Linux 5 and 6 are based on > upstream versions that include the fix. freetype packages in Red Hat Enterprise Linux 5 and 6 include explicit conversion to size_t, patch that was added to earlier Red Hat Enterprise Linux versions does not include explicit type conversion. |