summaryrefslogtreecommitdiff
path: root/meta/recipes-graphics/xorg-lib
diff options
context:
space:
mode:
authorLi Zhou <li.zhou@windriver.com>2015-04-27 10:49:22 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-28 07:56:00 +0100
commit2c7a15a074501beb6b8a4c7bdf30604b1a432a6b (patch)
treebfcd1a06d7c43f3b5c594844d3015bb0fc247423 /meta/recipes-graphics/xorg-lib
parent0ff9f2bf0e44a7b47a98234a12714c780825e286 (diff)
downloadopenembedded-core-2c7a15a074501beb6b8a4c7bdf30604b1a432a6b.tar.gz
openembedded-core-2c7a15a074501beb6b8a4c7bdf30604b1a432a6b.tar.bz2
openembedded-core-2c7a15a074501beb6b8a4c7bdf30604b1a432a6b.zip
libxfont: Security Advisory - libxfont - CVE-2015-1803
bdfReadCharacters: bailout if a char's bitmap cannot be read Previously would charge on ahead with a NULL pointer in ci->bits, and then crash later in FontCharInkMetrics() trying to access the bits. Signed-off-by: Li Zhou <li.zhou@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/xorg-lib')
-rw-r--r--meta/recipes-graphics/xorg-lib/libxfont/0001-bdfReadCharacters-bailout-if-a-char-s-bitmap-cannot-.patch40
-rw-r--r--meta/recipes-graphics/xorg-lib/libxfont_1.5.0.bb1
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-lib/libxfont/0001-bdfReadCharacters-bailout-if-a-char-s-bitmap-cannot-.patch b/meta/recipes-graphics/xorg-lib/libxfont/0001-bdfReadCharacters-bailout-if-a-char-s-bitmap-cannot-.patch
new file mode 100644
index 0000000000..cc66c12452
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxfont/0001-bdfReadCharacters-bailout-if-a-char-s-bitmap-cannot-.patch
@@ -0,0 +1,40 @@
+From 78c2e3d70d29698244f70164428bd2868c0ab34c Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri, 6 Feb 2015 15:54:00 -0800
+Subject: [PATCH] bdfReadCharacters: bailout if a char's bitmap cannot be read
+ [CVE-2015-1803]
+
+Previously would charge on ahead with a NULL pointer in ci->bits, and
+then crash later in FontCharInkMetrics() trying to access the bits.
+
+Found with afl-1.23b.
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+Upstream-Status: backport
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ src/bitmap/bdfread.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/bitmap/bdfread.c b/src/bitmap/bdfread.c
+index 6387908..1b29b81 100644
+--- a/src/bitmap/bdfread.c
++++ b/src/bitmap/bdfread.c
+@@ -458,7 +458,10 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
+ ci->metrics.descent = -bb;
+ ci->metrics.characterWidth = wx;
+ ci->bits = NULL;
+- bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes);
++ if (!bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes)) {
++ bdfError("could not read bitmap for character '%s'\n", charName);
++ goto BAILOUT;
++ }
+ ci++;
+ ndx++;
+ } else
+--
+1.7.9.5
+
diff --git a/meta/recipes-graphics/xorg-lib/libxfont_1.5.0.bb b/meta/recipes-graphics/xorg-lib/libxfont_1.5.0.bb
index 4a3c9b7db7..64ec6a3422 100644
--- a/meta/recipes-graphics/xorg-lib/libxfont_1.5.0.bb
+++ b/meta/recipes-graphics/xorg-lib/libxfont_1.5.0.bb
@@ -19,6 +19,7 @@ XORG_PN = "libXfont"
BBCLASSEXTEND = "native"
SRC_URI += "file://0001-bdfReadProperties-property-count-needs-range-check-C.patch \
+ file://0001-bdfReadCharacters-bailout-if-a-char-s-bitmap-cannot-.patch \
"
SRC_URI[md5sum] = "664629bfa7cdf8b984155019fd395dcb"