diff options
author | Ross Burton <ross.burton@arm.com> | 2024-01-10 21:01:53 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-01-12 11:54:05 +0000 |
commit | ef9f8330c1b85325969f76bc97272905eeedd5e0 (patch) | |
tree | ac2a91865c58f40b4ff08e4336fff79f90a336cb /meta | |
parent | ac6fb1aa6a524e133422e6bb468122b07b9c87e9 (diff) | |
download | poky-ef9f8330c1b85325969f76bc97272905eeedd5e0.tar.gz |
cairo: upgrade to 1.18.0
The changelog is large[1] but:
Added:
- Type 3 colour and COLRv2 fonts
- Tee surfice automatically enabled
- Meson build system
Removed:
- The cairo-sphinx tool
- The XML, GL, GLES, Qt5, BeOS, OS/2, DirectFB, DRM, Cogl, and OpenVL
backends
- Autotools build system
These CVE patches have been merged upstream:
CVE-2018-19876.patch: https://gitlab.freedesktop.org/cairo/cairo/-/commit/90e85c2493fdfa3551f202ff10282463f1e36645
CVE-2019-6461.patch: https://gitlab.freedesktop.org/cairo/cairo/-/commit/09643ee1abdd5daacebfcb564448f29be9a79bac
CVE-2019-6462.patch: https://gitlab.freedesktop.org/cairo/cairo/-/commit/bbeaf08190d3006a80b80a77724801cd477a37b8
CVE-2020-35492.patch: https://gitlab.freedesktop.org/cairo/cairo/-/commit/c986a7310bb06582b7d8a566d5f007ba4e5e75bf
Some niche options have been removed in the migration to Meson, so the
recipe can be cleaned up.
Put libcairo-fdr ("flight data recorder") in the perf-utils package
instead of deleting it.
There is an executable test for IPC behaviour that needs to be set via a
cross file if qemu-user isn't available, thanks to Alex Kanavin for this
portion.
[1] https://www.cairographics.org/news/cairo-1.18.0/
(From OE-Core rev: 9a4ca6b08d6031ebb67adcdd650aa59acd4fb5fb)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-graphics/cairo/cairo/CVE-2018-19876.patch | 34 | ||||
-rw-r--r-- | meta/recipes-graphics/cairo/cairo/CVE-2019-6461.patch | 20 | ||||
-rw-r--r-- | meta/recipes-graphics/cairo/cairo/CVE-2019-6462.patch | 40 | ||||
-rw-r--r-- | meta/recipes-graphics/cairo/cairo/CVE-2020-35492.patch | 60 | ||||
-rw-r--r-- | meta/recipes-graphics/cairo/cairo/cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff | 2 | ||||
-rw-r--r-- | meta/recipes-graphics/cairo/cairo_1.18.0.bb (renamed from meta/recipes-graphics/cairo/cairo_1.16.0.bb) | 73 |
6 files changed, 27 insertions, 202 deletions
diff --git a/meta/recipes-graphics/cairo/cairo/CVE-2018-19876.patch b/meta/recipes-graphics/cairo/cairo/CVE-2018-19876.patch deleted file mode 100644 index 4252a5663b..0000000000 --- a/meta/recipes-graphics/cairo/cairo/CVE-2018-19876.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | CVE: CVE-2018-19876 | ||
2 | Upstream-Status: Backport | ||
3 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
4 | |||
5 | From 90e85c2493fdfa3551f202ff10282463f1e36645 Mon Sep 17 00:00:00 2001 | ||
6 | From: Carlos Garcia Campos <cgarcia@igalia.com> | ||
7 | Date: Mon, 19 Nov 2018 12:33:07 +0100 | ||
8 | Subject: [PATCH] ft: Use FT_Done_MM_Var instead of free when available in | ||
9 | cairo_ft_apply_variations | ||
10 | |||
11 | Fixes a crash when using freetype >= 2.9 | ||
12 | --- | ||
13 | src/cairo-ft-font.c | 4 ++++ | ||
14 | 1 file changed, 4 insertions(+) | ||
15 | |||
16 | diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c | ||
17 | index 325dd61b4..981973f78 100644 | ||
18 | --- a/src/cairo-ft-font.c | ||
19 | +++ b/src/cairo-ft-font.c | ||
20 | @@ -2393,7 +2393,11 @@ skip: | ||
21 | done: | ||
22 | free (coords); | ||
23 | free (current_coords); | ||
24 | +#if HAVE_FT_DONE_MM_VAR | ||
25 | + FT_Done_MM_Var (face->glyph->library, ft_mm_var); | ||
26 | +#else | ||
27 | free (ft_mm_var); | ||
28 | +#endif | ||
29 | } | ||
30 | } | ||
31 | |||
32 | -- | ||
33 | 2.11.0 | ||
34 | |||
diff --git a/meta/recipes-graphics/cairo/cairo/CVE-2019-6461.patch b/meta/recipes-graphics/cairo/cairo/CVE-2019-6461.patch deleted file mode 100644 index a2dba6cb20..0000000000 --- a/meta/recipes-graphics/cairo/cairo/CVE-2019-6461.patch +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | There is an assertion in function _cairo_arc_in_direction(). | ||
2 | |||
3 | CVE: CVE-2019-6461 | ||
4 | Upstream-Status: Pending | ||
5 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
6 | |||
7 | diff --git a/src/cairo-arc.c b/src/cairo-arc.c | ||
8 | index 390397bae..1bde774a4 100644 | ||
9 | --- a/src/cairo-arc.c | ||
10 | +++ b/src/cairo-arc.c | ||
11 | @@ -186,7 +186,8 @@ _cairo_arc_in_direction (cairo_t *cr, | ||
12 | if (cairo_status (cr)) | ||
13 | return; | ||
14 | |||
15 | - assert (angle_max >= angle_min); | ||
16 | + if (angle_max < angle_min) | ||
17 | + return; | ||
18 | |||
19 | if (angle_max - angle_min > 2 * M_PI * MAX_FULL_CIRCLES) { | ||
20 | angle_max = fmod (angle_max - angle_min, 2 * M_PI); | ||
diff --git a/meta/recipes-graphics/cairo/cairo/CVE-2019-6462.patch b/meta/recipes-graphics/cairo/cairo/CVE-2019-6462.patch deleted file mode 100644 index 7c3209291b..0000000000 --- a/meta/recipes-graphics/cairo/cairo/CVE-2019-6462.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | CVE: CVE-2019-6462 | ||
2 | Upstream-Status: Backport | ||
3 | Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> | ||
4 | |||
5 | From ab2c5ee21e5f3d3ee4b3f67cfcd5811a4f99c3a0 Mon Sep 17 00:00:00 2001 | ||
6 | From: Heiko Lewin <hlewin@gmx.de> | ||
7 | Date: Sun, 1 Aug 2021 11:16:03 +0000 | ||
8 | Subject: [PATCH] _arc_max_angle_for_tolerance_normalized: fix infinite loop | ||
9 | |||
10 | --- | ||
11 | src/cairo-arc.c | 4 +++- | ||
12 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/src/cairo-arc.c b/src/cairo-arc.c | ||
15 | index 390397bae..1c891d1a0 100644 | ||
16 | --- a/src/cairo-arc.c | ||
17 | +++ b/src/cairo-arc.c | ||
18 | @@ -90,16 +90,18 @@ _arc_max_angle_for_tolerance_normalized (double tolerance) | ||
19 | { M_PI / 11.0, 9.81410988043554039085e-09 }, | ||
20 | }; | ||
21 | int table_size = ARRAY_LENGTH (table); | ||
22 | + const int max_segments = 1000; /* this value is chosen arbitrarily. this gives an error of about 1.74909e-20 */ | ||
23 | |||
24 | for (i = 0; i < table_size; i++) | ||
25 | if (table[i].error < tolerance) | ||
26 | return table[i].angle; | ||
27 | |||
28 | ++i; | ||
29 | + | ||
30 | do { | ||
31 | angle = M_PI / i++; | ||
32 | error = _arc_error_normalized (angle); | ||
33 | - } while (error > tolerance); | ||
34 | + } while (error > tolerance && i < max_segments); | ||
35 | |||
36 | return angle; | ||
37 | } | ||
38 | -- | ||
39 | 2.38.1 | ||
40 | |||
diff --git a/meta/recipes-graphics/cairo/cairo/CVE-2020-35492.patch b/meta/recipes-graphics/cairo/cairo/CVE-2020-35492.patch deleted file mode 100644 index fb6ce5cfdf..0000000000 --- a/meta/recipes-graphics/cairo/cairo/CVE-2020-35492.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | Fix stack buffer overflow. | ||
2 | |||
3 | CVE: CVE-2020-35492 | ||
4 | Upstream-Status: Backport | ||
5 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
6 | |||
7 | From 03a820b173ed1fdef6ff14b4468f5dbc02ff59be Mon Sep 17 00:00:00 2001 | ||
8 | From: Heiko Lewin <heiko.lewin@worldiety.de> | ||
9 | Date: Tue, 15 Dec 2020 16:48:19 +0100 | ||
10 | Subject: [PATCH] Fix mask usage in image-compositor | ||
11 | |||
12 | --- | ||
13 | src/cairo-image-compositor.c | 8 ++-- | ||
14 | test/Makefile.sources | 1 + | ||
15 | test/bug-image-compositor.c | 39 ++++++++++++++++++++ | ||
16 | test/reference/bug-image-compositor.ref.png | Bin 0 -> 185 bytes | ||
17 | 4 files changed, 44 insertions(+), 4 deletions(-) | ||
18 | create mode 100644 test/bug-image-compositor.c | ||
19 | create mode 100644 test/reference/bug-image-compositor.ref.png | ||
20 | |||
21 | diff --git a/src/cairo-image-compositor.c b/src/cairo-image-compositor.c | ||
22 | index 79ad69f68..4f8aaed99 100644 | ||
23 | --- a/src/cairo-image-compositor.c | ||
24 | +++ b/src/cairo-image-compositor.c | ||
25 | @@ -2601,14 +2601,14 @@ _inplace_src_spans (void *abstract_renderer, int y, int h, | ||
26 | unsigned num_spans) | ||
27 | { | ||
28 | cairo_image_span_renderer_t *r = abstract_renderer; | ||
29 | - uint8_t *m; | ||
30 | + uint8_t *m, *base = (uint8_t*)pixman_image_get_data(r->mask); | ||
31 | int x0; | ||
32 | |||
33 | if (num_spans == 0) | ||
34 | return CAIRO_STATUS_SUCCESS; | ||
35 | |||
36 | x0 = spans[0].x; | ||
37 | - m = r->_buf; | ||
38 | + m = base; | ||
39 | do { | ||
40 | int len = spans[1].x - spans[0].x; | ||
41 | if (len >= r->u.composite.run_length && spans[0].coverage == 0xff) { | ||
42 | @@ -2655,7 +2655,7 @@ _inplace_src_spans (void *abstract_renderer, int y, int h, | ||
43 | spans[0].x, y, | ||
44 | spans[1].x - spans[0].x, h); | ||
45 | |||
46 | - m = r->_buf; | ||
47 | + m = base; | ||
48 | x0 = spans[1].x; | ||
49 | } else if (spans[0].coverage == 0x0) { | ||
50 | if (spans[0].x != x0) { | ||
51 | @@ -2684,7 +2684,7 @@ _inplace_src_spans (void *abstract_renderer, int y, int h, | ||
52 | #endif | ||
53 | } | ||
54 | |||
55 | - m = r->_buf; | ||
56 | + m = base; | ||
57 | x0 = spans[1].x; | ||
58 | } else { | ||
59 | *m++ = spans[0].coverage; | ||
60 | -- | ||
diff --git a/meta/recipes-graphics/cairo/cairo/cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff b/meta/recipes-graphics/cairo/cairo/cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff index 7aaad2eedd..6c761bf2a7 100644 --- a/meta/recipes-graphics/cairo/cairo/cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff +++ b/meta/recipes-graphics/cairo/cairo/cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff | |||
@@ -3,7 +3,7 @@ Cairo: Fix Denial-of-Service Attack due to Logical Problem in Program | |||
3 | https://bugs.freedesktop.org/show_bug.cgi?id=100763 | 3 | https://bugs.freedesktop.org/show_bug.cgi?id=100763 |
4 | 4 | ||
5 | CVE: CVE-2017-7475 | 5 | CVE: CVE-2017-7475 |
6 | Upstream-Status: Submitted | 6 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/cairo/cairo/-/issues/80] |
7 | 7 | ||
8 | Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com> | 8 | Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com> |
9 | 9 | ||
diff --git a/meta/recipes-graphics/cairo/cairo_1.16.0.bb b/meta/recipes-graphics/cairo/cairo_1.18.0.bb index ffb813d290..fe72537b77 100644 --- a/meta/recipes-graphics/cairo/cairo_1.16.0.bb +++ b/meta/recipes-graphics/cairo/cairo_1.18.0.bb | |||
@@ -7,7 +7,7 @@ optional translucence (opacity/alpha) and combined using the \ | |||
7 | extended Porter/Duff compositing algebra as found in the X Render \ | 7 | extended Porter/Duff compositing algebra as found in the X Render \ |
8 | Extension." | 8 | Extension." |
9 | HOMEPAGE = "http://cairographics.org" | 9 | HOMEPAGE = "http://cairographics.org" |
10 | BUGTRACKER = "http://bugs.freedesktop.org" | 10 | BUGTRACKER = "https://gitlab.freedesktop.org/cairo/cairo/-/issues" |
11 | SECTION = "libs" | 11 | SECTION = "libs" |
12 | 12 | ||
13 | LICENSE = "(MPL-1.1 | LGPL-2.1-only) & GPL-3.0-or-later" | 13 | LICENSE = "(MPL-1.1 | LGPL-2.1-only) & GPL-3.0-or-later" |
@@ -26,62 +26,41 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77 \ | |||
26 | ${@bb.utils.contains('PACKAGECONFIG', 'trace', 'file://util/cairo-trace/COPYING-GPL-3;md5=d32239bcb673463ab874e80d47fae504', '', d)}" | 26 | ${@bb.utils.contains('PACKAGECONFIG', 'trace', 'file://util/cairo-trace/COPYING-GPL-3;md5=d32239bcb673463ab874e80d47fae504', '', d)}" |
27 | 27 | ||
28 | 28 | ||
29 | DEPENDS = "fontconfig glib-2.0 libpng pixman zlib" | 29 | DEPENDS = "fontconfig freetype glib-2.0 libpng pixman zlib" |
30 | 30 | ||
31 | SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \ | 31 | SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \ |
32 | file://cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff \ | 32 | file://cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff \ |
33 | file://CVE-2018-19876.patch \ | ||
34 | file://CVE-2019-6461.patch \ | ||
35 | file://CVE-2019-6462.patch \ | ||
36 | file://CVE-2020-35492.patch \ | ||
37 | " | 33 | " |
38 | 34 | ||
39 | SRC_URI[md5sum] = "f19e0353828269c22bd72e271243a552" | 35 | SRC_URI[sha256sum] = "243a0736b978a33dee29f9cca7521733b78a65b5418206fef7bd1c3d4cf10b64" |
40 | SRC_URI[sha256sum] = "5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331" | ||
41 | 36 | ||
42 | inherit autotools pkgconfig upstream-version-is-even gtk-doc multilib_script | 37 | inherit meson pkgconfig upstream-version-is-even gtk-doc multilib_script |
38 | |||
39 | # if qemu usermode isn't available, this value needs to be set statically | ||
40 | # (otherwise it's determinted by running a small target executable with qemu) | ||
41 | do_write_config:append:class-target() { | ||
42 | cat >${WORKDIR}/cairo.cross <<EOF | ||
43 | [properties] | ||
44 | ipc_rmid_deferred_release = 'true' | ||
45 | EOF | ||
46 | } | ||
47 | EXTRA_OEMESON:append:class-target = "${@' --cross-file ${WORKDIR}/cairo.cross' if d.getVar('EXEWRAPPER_ENABLED') == 'False' else ''}" | ||
48 | |||
49 | GTKDOC_MESON_OPTION = "gtk_doc" | ||
43 | 50 | ||
44 | MULTILIB_SCRIPTS = "${PN}-perf-utils:${bindir}/cairo-trace" | 51 | MULTILIB_SCRIPTS = "${PN}-perf-utils:${bindir}/cairo-trace" |
45 | 52 | ||
46 | X11DEPENDS = "virtual/libx11 libsm libxrender libxext" | 53 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xlib xcb', '', d)} trace" |
47 | 54 | PACKAGECONFIG[xlib] = "-Dxlib=enabled,-Dxlib=disabled,virtual/libx11 libxrender libxext" | |
48 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \ | 55 | PACKAGECONFIG[xcb] = "-Dxcb=enabled,-Dxcb=disabled,libxcb" |
49 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \ | 56 | # cairo-trace is GPLv3 so add an option to remove it |
50 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)} \ | 57 | PACKAGECONFIG[trace] = "" |
51 | trace" | ||
52 | PACKAGECONFIG:class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)}" | ||
53 | PACKAGECONFIG:class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)}" | ||
54 | |||
55 | PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}" | ||
56 | PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb" | ||
57 | PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb" | ||
58 | PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind" | ||
59 | PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl" | ||
60 | PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2" | ||
61 | PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl" | ||
62 | # trace is under GPLv3 | ||
63 | PACKAGECONFIG[trace] = "--enable-trace,--disable-trace" | ||
64 | |||
65 | EXTRA_OECONF += " \ | ||
66 | ${@bb.utils.contains('TARGET_FPU', 'soft', '--disable-some-floating-point', '', d)} \ | ||
67 | --enable-tee \ | ||
68 | " | ||
69 | |||
70 | # We don't depend on binutils so we need to disable this | ||
71 | export ac_cv_lib_bfd_bfd_openr="no" | ||
72 | # Ensure we don't depend on LZO | ||
73 | export ac_cv_lib_lzo2_lzo2a_decompress="no" | ||
74 | 58 | ||
75 | do_install:append () { | 59 | do_install:append () { |
76 | rm -rf ${D}${bindir}/cairo-sphinx | 60 | if ! ${@bb.utils.contains('PACKAGECONFIG', 'trace', 'true', 'false', d)}; then |
77 | rm -rf ${D}${libdir}/cairo/cairo-fdr* | 61 | rm ${D}${bindir}/cairo-trace ${D}${libdir}/cairo/libcairo-trace.so |
78 | rm -rf ${D}${libdir}/cairo/cairo-sphinx* | 62 | rmdir --ignore-fail-on-non-empty ${D}${bindir} ${D}${libdir}/cairo |
79 | rm -rf ${D}${libdir}/cairo/.debug/cairo-fdr* | 63 | fi |
80 | rm -rf ${D}${libdir}/cairo/.debug/cairo-sphinx* | ||
81 | [ ! -d ${D}${bindir} ] || | ||
82 | rmdir -p --ignore-fail-on-non-empty ${D}${bindir} | ||
83 | [ ! -d ${D}${libdir}/cairo ] || | ||
84 | rmdir -p --ignore-fail-on-non-empty ${D}${libdir}/cairo | ||
85 | } | 64 | } |
86 | 65 | ||
87 | PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils" | 66 | PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils" |
@@ -99,7 +78,7 @@ DESCRIPTION:cairo-perf-utils = "The Cairo library performance utilities" | |||
99 | FILES:${PN} = "${libdir}/libcairo.so.*" | 78 | FILES:${PN} = "${libdir}/libcairo.so.*" |
100 | FILES:${PN}-gobject = "${libdir}/libcairo-gobject.so.*" | 79 | FILES:${PN}-gobject = "${libdir}/libcairo-gobject.so.*" |
101 | FILES:${PN}-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*" | 80 | FILES:${PN}-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*" |
102 | FILES:${PN}-perf-utils = "${bindir}/cairo-trace* ${libdir}/cairo/*.la ${libdir}/cairo/libcairo-trace.so" | 81 | FILES:${PN}-perf-utils = "${bindir}/cairo-* ${libdir}/cairo/libcairo-trace.so ${libdir}/cairo/libcairo-fdr.so" |
103 | 82 | ||
104 | BBCLASSEXTEND = "native nativesdk" | 83 | BBCLASSEXTEND = "native nativesdk" |
105 | 84 | ||