diff options
author | Ross Burton <ross.burton@intel.com> | 2015-05-18 17:45:23 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-20 21:41:05 +0100 |
commit | c271faed8fa798d5ce80e9679f3bd1226eefa44d (patch) | |
tree | 87a5dfb3f47f9c8b38bba400bacf5c33327ce161 /meta | |
parent | 9c6576b9b9ae7c40122725d0e4268c04ffd0189d (diff) | |
download | poky-c271faed8fa798d5ce80e9679f3bd1226eefa44d.tar.gz |
libxfont: upgrade to 1.5.1
Remove the backported patches as they're integrated in this release.
(From OE-Core rev: 425096a81afcf1f60dad8e74e10b2fe36d72a854)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-graphics/xorg-lib/libxfont/0001-bdfReadCharacters-bailout-if-a-char-s-bitmap-cannot-.patch | 40 | ||||
-rw-r--r-- | meta/recipes-graphics/xorg-lib/libxfont/0001-bdfReadCharacters-ensure-metrics-fit-into-xCharInfo-.patch | 80 | ||||
-rw-r--r-- | meta/recipes-graphics/xorg-lib/libxfont/0001-bdfReadProperties-property-count-needs-range-check-C.patch | 38 | ||||
-rw-r--r-- | meta/recipes-graphics/xorg-lib/libxfont_1.5.1.bb (renamed from meta/recipes-graphics/xorg-lib/libxfont_1.5.0.bb) | 9 |
4 files changed, 2 insertions, 165 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 deleted file mode 100644 index cc66c12452..0000000000 --- a/meta/recipes-graphics/xorg-lib/libxfont/0001-bdfReadCharacters-bailout-if-a-char-s-bitmap-cannot-.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | From 78c2e3d70d29698244f70164428bd2868c0ab34c Mon Sep 17 00:00:00 2001 | ||
2 | From: Alan Coopersmith <alan.coopersmith@oracle.com> | ||
3 | Date: Fri, 6 Feb 2015 15:54:00 -0800 | ||
4 | Subject: [PATCH] bdfReadCharacters: bailout if a char's bitmap cannot be read | ||
5 | [CVE-2015-1803] | ||
6 | |||
7 | Previously would charge on ahead with a NULL pointer in ci->bits, and | ||
8 | then crash later in FontCharInkMetrics() trying to access the bits. | ||
9 | |||
10 | Found with afl-1.23b. | ||
11 | |||
12 | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> | ||
13 | Reviewed-by: Julien Cristau <jcristau@debian.org> | ||
14 | |||
15 | Upstream-Status: backport | ||
16 | |||
17 | Signed-off-by: Li Zhou <li.zhou@windriver.com> | ||
18 | --- | ||
19 | src/bitmap/bdfread.c | 5 ++++- | ||
20 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/src/bitmap/bdfread.c b/src/bitmap/bdfread.c | ||
23 | index 6387908..1b29b81 100644 | ||
24 | --- a/src/bitmap/bdfread.c | ||
25 | +++ b/src/bitmap/bdfread.c | ||
26 | @@ -458,7 +458,10 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState, | ||
27 | ci->metrics.descent = -bb; | ||
28 | ci->metrics.characterWidth = wx; | ||
29 | ci->bits = NULL; | ||
30 | - bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes); | ||
31 | + if (!bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes)) { | ||
32 | + bdfError("could not read bitmap for character '%s'\n", charName); | ||
33 | + goto BAILOUT; | ||
34 | + } | ||
35 | ci++; | ||
36 | ndx++; | ||
37 | } else | ||
38 | -- | ||
39 | 1.7.9.5 | ||
40 | |||
diff --git a/meta/recipes-graphics/xorg-lib/libxfont/0001-bdfReadCharacters-ensure-metrics-fit-into-xCharInfo-.patch b/meta/recipes-graphics/xorg-lib/libxfont/0001-bdfReadCharacters-ensure-metrics-fit-into-xCharInfo-.patch deleted file mode 100644 index b64f1d9a87..0000000000 --- a/meta/recipes-graphics/xorg-lib/libxfont/0001-bdfReadCharacters-ensure-metrics-fit-into-xCharInfo-.patch +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | From 2351c83a77a478b49cba6beb2ad386835e264744 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alan Coopersmith <alan.coopersmith@oracle.com> | ||
3 | Date: Fri, 6 Mar 2015 22:54:58 -0800 | ||
4 | Subject: [PATCH] bdfReadCharacters: ensure metrics fit into xCharInfo struct | ||
5 | [CVE-2015-1804] | ||
6 | |||
7 | We use 32-bit ints to read from the bdf file, but then try to stick | ||
8 | into a 16-bit int in the xCharInfo struct, so make sure they won't | ||
9 | overflow that range. | ||
10 | |||
11 | Found by afl-1.24b. | ||
12 | |||
13 | v2: Verify that additions won't overflow 32-bit int range either. | ||
14 | v3: As Julien correctly observes, the previous check for bh & bw not | ||
15 | being < 0 reduces the number of cases we need to check for overflow. | ||
16 | |||
17 | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> | ||
18 | Reviewed-by: Julien Cristau <jcristau@debian.org> | ||
19 | |||
20 | Upstream-Status: backport | ||
21 | |||
22 | Signed-off-by: Li Zhou <li.zhou@windriver.com> | ||
23 | --- | ||
24 | src/bitmap/bdfread.c | 26 ++++++++++++++++++++++++-- | ||
25 | 1 file changed, 24 insertions(+), 2 deletions(-) | ||
26 | |||
27 | diff --git a/src/bitmap/bdfread.c b/src/bitmap/bdfread.c | ||
28 | index 1b29b81..a0ace8f 100644 | ||
29 | --- a/src/bitmap/bdfread.c | ||
30 | +++ b/src/bitmap/bdfread.c | ||
31 | @@ -62,8 +62,16 @@ from The Open Group. | ||
32 | |||
33 | #if HAVE_STDINT_H | ||
34 | #include <stdint.h> | ||
35 | -#elif !defined(INT32_MAX) | ||
36 | -#define INT32_MAX 0x7fffffff | ||
37 | +#else | ||
38 | +# ifndef INT32_MAX | ||
39 | +# define INT32_MAX 0x7fffffff | ||
40 | +# endif | ||
41 | +# ifndef INT16_MAX | ||
42 | +# define INT16_MAX 0x7fff | ||
43 | +# endif | ||
44 | +# ifndef INT16_MIN | ||
45 | +# define INT16_MIN (0 - 0x8000) | ||
46 | +# endif | ||
47 | #endif | ||
48 | |||
49 | #define INDICES 256 | ||
50 | @@ -417,6 +425,12 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState, | ||
51 | bdfError("DWIDTH y value must be zero\n"); | ||
52 | goto BAILOUT; | ||
53 | } | ||
54 | + /* xCharInfo metrics are stored as INT16 */ | ||
55 | + if ((wx < 0) || (wx > INT16_MAX)) { | ||
56 | + bdfError("character '%s' has out of range width, %d\n", | ||
57 | + charName, wx); | ||
58 | + goto BAILOUT; | ||
59 | + } | ||
60 | line = bdfGetLine(file, lineBuf, BDFLINELEN); | ||
61 | if ((!line) || (sscanf((char *) line, "BBX %d %d %d %d", &bw, &bh, &bl, &bb) != 4)) { | ||
62 | bdfError("bad 'BBX'\n"); | ||
63 | @@ -427,6 +441,14 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState, | ||
64 | charName, bw, bh); | ||
65 | goto BAILOUT; | ||
66 | } | ||
67 | + /* xCharInfo metrics are read as int, but stored as INT16 */ | ||
68 | + if ((bl > INT16_MAX) || (bl < INT16_MIN) || | ||
69 | + (bb > INT16_MAX) || (bb < INT16_MIN) || | ||
70 | + (bw > (INT16_MAX - bl)) || (bh > (INT16_MAX - bb))) { | ||
71 | + bdfError("character '%s' has out of range metrics, %d %d %d %d\n", | ||
72 | + charName, bl, (bl+bw), (bh+bb), -bb); | ||
73 | + goto BAILOUT; | ||
74 | + } | ||
75 | line = bdfGetLine(file, lineBuf, BDFLINELEN); | ||
76 | if ((line) && (bdfIsPrefix(line, "ATTRIBUTES"))) { | ||
77 | for (p = line + strlen("ATTRIBUTES "); | ||
78 | -- | ||
79 | 1.7.9.5 | ||
80 | |||
diff --git a/meta/recipes-graphics/xorg-lib/libxfont/0001-bdfReadProperties-property-count-needs-range-check-C.patch b/meta/recipes-graphics/xorg-lib/libxfont/0001-bdfReadProperties-property-count-needs-range-check-C.patch deleted file mode 100644 index 0779c26dcd..0000000000 --- a/meta/recipes-graphics/xorg-lib/libxfont/0001-bdfReadProperties-property-count-needs-range-check-C.patch +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | From 2deda9906480f9c8ae07b8c2a5510cc7e4c59a8e Mon Sep 17 00:00:00 2001 | ||
2 | From: Alan Coopersmith <alan.coopersmith@oracle.com> | ||
3 | Date: Fri, 6 Feb 2015 15:50:45 -0800 | ||
4 | Subject: [PATCH] bdfReadProperties: property count needs range check | ||
5 | [CVE-2015-1802] | ||
6 | |||
7 | Avoid integer overflow or underflow when allocating memory arrays | ||
8 | by multiplying the number of properties reported for a BDF font. | ||
9 | |||
10 | Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> | ||
11 | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> | ||
12 | Reviewed-by: Julien Cristau <jcristau@debian.org> | ||
13 | |||
14 | Upstream-Status: backport | ||
15 | |||
16 | Signed-off-by: Li Zhou <li.zhou@windriver.com> | ||
17 | --- | ||
18 | src/bitmap/bdfread.c | 4 +++- | ||
19 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/src/bitmap/bdfread.c b/src/bitmap/bdfread.c | ||
22 | index 914a024..6387908 100644 | ||
23 | --- a/src/bitmap/bdfread.c | ||
24 | +++ b/src/bitmap/bdfread.c | ||
25 | @@ -604,7 +604,9 @@ bdfReadProperties(FontFilePtr file, FontPtr pFont, bdfFileState *pState) | ||
26 | bdfError("missing 'STARTPROPERTIES'\n"); | ||
27 | return (FALSE); | ||
28 | } | ||
29 | - if (sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) { | ||
30 | + if ((sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) || | ||
31 | + (nProps <= 0) || | ||
32 | + (nProps > ((INT32_MAX / sizeof(FontPropRec)) - BDF_GENPROPS))) { | ||
33 | bdfError("bad 'STARTPROPERTIES'\n"); | ||
34 | return (FALSE); | ||
35 | } | ||
36 | -- | ||
37 | 1.7.9.5 | ||
38 | |||
diff --git a/meta/recipes-graphics/xorg-lib/libxfont_1.5.0.bb b/meta/recipes-graphics/xorg-lib/libxfont_1.5.1.bb index dfd2dc67a2..1b6e33c717 100644 --- a/meta/recipes-graphics/xorg-lib/libxfont_1.5.0.bb +++ b/meta/recipes-graphics/xorg-lib/libxfont_1.5.1.bb | |||
@@ -18,10 +18,5 @@ XORG_PN = "libXfont" | |||
18 | 18 | ||
19 | BBCLASSEXTEND = "native" | 19 | BBCLASSEXTEND = "native" |
20 | 20 | ||
21 | SRC_URI += "file://0001-bdfReadProperties-property-count-needs-range-check-C.patch \ | 21 | SRC_URI[md5sum] = "96f76ba94b4c909230bac1e2dcd551c4" |
22 | file://0001-bdfReadCharacters-bailout-if-a-char-s-bitmap-cannot-.patch \ | 22 | SRC_URI[sha256sum] = "b70898527c73f9758f551bbab612af611b8a0962202829568d94f3edf4d86098" |
23 | file://0001-bdfReadCharacters-ensure-metrics-fit-into-xCharInfo-.patch \ | ||
24 | " | ||
25 | |||
26 | SRC_URI[md5sum] = "664629bfa7cdf8b984155019fd395dcb" | ||
27 | SRC_URI[sha256sum] = "3a3c52c4adf9352b2160f07ff0596af17ab14f91d6509564e606678a1261c25f" | ||