发布日期:2012-12-25
更新日期:2012-12-27
受影响系统:
FreeType FreeType 2.4.11
描述:
--------------------------------------------------------------------------------
BUGTRAQ ID: 57041
CVE(CAN) ID: CVE-2012-5669
FreeType是一个流行的字体函数库。
FreeType 2.4.11之前版本字体呈现引擎处理Glyph信息和相关BDF位图时,src/bdf/bdflib.c使用了不恰当的大小来检测'glyph_enc'而导致缓冲区越界读漏洞。攻击者通过提供特制的BDF字体文件,使用了FreeType库的应用程序处理恶意特制字体时将崩溃。
漏洞相关信息可参见官方修补代码变化:
-----------------------------------------------------------------------------
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5c9e7eb..2cf618d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2012-12-15 Werner Lemberg <wl@gnu.org>
+ [bdf] Fix Savannah bug #37906.
+
+ * src/bdf/bdflib.c (_bdf_parse_glyphs): Use correct array size for
+ checking `glyph_enc'.
+
+2012-12-15 Werner Lemberg <wl@gnu.org>
+
[bdf] Fix Savannah bug #37905.
* src/bdf/bdflib.c (_bdf_parse_start): Reset `props_size' to zero in
diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c
index 8d7f9a0..f9c06ca 100644
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -1628,8 +1628,9 @@
/* Check that the encoding is in the Unicode range because */
/* otherwise p->have (a bitmap with static size) overflows. */
- if ( p->glyph_enc > 0 &&
- (size_t)p->glyph_enc >= sizeof ( p->have ) * 8 )
+ if ( p->glyph_enc > 0 &&
+ (size_t)p->glyph_enc >= sizeof ( p->have ) /
+ sizeof ( unsigned long ) * 32 )
{
FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG5, lineno, "ENCODING" ));
error = BDF_Err_Invalid_File_Format;
-----------------------------------------------------------------------------
<*来源:Mateusz Jurczyk
链接:
https://bugzilla.RedHat.com/show_bug.cgi?id=CVE-2012-5669
*>
建议:
--------------------------------------------------------------------------------
厂商补丁:
FreeType
--------
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
?id=07bdb6e289c7954e2a533039dc93c1c136099d2d