cairo: backport patch for CVE-2020-35492
PATCH 1/3 cairo: backport patch for CVE-2020-35492
--- .../cairo/cairo/CVE-2020-35492.patch | 60 +++++++++++++++++++ meta/recipes-graphics/cairo/cairo_1.16.0.bb | 1 + 2 files changed, 61 insertions(+) create mode 100644 meta/recipes-graphics/cairo/cairo/CVE-2020-35492.patch
meta/recipes-graphics/cairo/cairo/CVE-2020-35492.patch new file +60 -0
@@ -0,0 +1,60 @@ +Fix stack buffer overflow. + +CVE: CVE-2020-35492 +Upstream-Status: Backport +Signed-off-by: Ross Burton <[email protected]> + +From 03a820b173ed1fdef6ff14b4468f5dbc02ff59be Mon Sep 17 00:00:00 2001 +From: Heiko Lewin <[email protected]> +Date: Tue, 15 Dec 2020 16:48:19 +0100 +Subject: [PATCH] Fix mask usage in image-compositor + +--- + src/cairo-image-compositor.c | 8 ++-- + test/Makefile.sources | 1 + + test/bug-image-compositor.c | 39 ++++++++++++++++++++ + test/reference/bug-image-compositor.ref.png | Bin 0 -> 185 bytes + 4 files changed, 44 insertions(+), 4 deletions(-) + create mode 100644 test/bug-image-compositor.c + create mode 100644 test/reference/bug-image-compositor.ref.png + +diff --git a/src/cairo-image-compositor.c b/src/cairo-image-compositor.c +index 79ad69f68..4f8aaed99 100644 +--- a/src/cairo-image-compositor.c ++++ b/src/cairo-image-compositor.c +@@ -2601,14 +2601,14 @@ _inplace_src_spans (void *abstract_renderer, int y, int h, + unsigned num_spans) + { + cairo_image_span_renderer_t *r = abstract_renderer; +- uint8_t *m; ++ uint8_t *m, *base = (uint8_t*)pixman_image_get_data(r->mask); + int x0; + + if (num_spans == 0) + return CAIRO_STATUS_SUCCESS; + + x0 = spans[0].x; +- m = r->_buf; ++ m = base; + do { + int len = spans[1].x - spans[0].x; + if (len >= r->u.composite.run_length && spans[0].coverage == 0xff) { +@@ -2655,7 +2655,7 @@ _inplace_src_spans (void *abstract_renderer, int y, int h, + spans[0].x, y, + spans[1].x - spans[0].x, h); + +- m = r->_buf; ++ m = base; + x0 = spans[1].x; + } else if (spans[0].coverage == 0x0) { + if (spans[0].x != x0) { +@@ -2684,7 +2684,7 @@ _inplace_src_spans (void *abstract_renderer, int y, int h, + #endif + } + +- m = r->_buf; ++ m = base; + x0 = spans[1].x; + } else { + *m++ = spans[0].coverage; +--
meta/recipes-graphics/cairo/cairo_1.16.0.bb +1 -0
@@ -27,6 +27,7 @@ SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \ file://CVE-2018-19876.patch \ file://CVE-2019-6461.patch \ file://CVE-2019-6462.patch \ + file://CVE-2020-35492.patch \ " SRC_URI[md5sum] = "f19e0353828269c22bd72e271243a552"
Signature · 1 line
2.25.1
PATCH 2/3 libnotify: whitelist CVE-2013-7381 (specific to the NodeJS bindings)
Signed-off-by Ross Burton <[email protected]>
--- meta/recipes-gnome/libnotify/libnotify_0.7.9.bb | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-gnome/libnotify/libnotify_0.7.9.bb +3 -0
@@ -30,3 +30,6 @@ PROVIDES += "libnotify3" RPROVIDES_${PN} += "libnotify3" RCONFLICTS_${PN} += "libnotify3" RREPLACES_${PN} += "libnotify3" + +# -7381 is specific to the NodeJS bindings +CVE_CHECK_WHITELIST += "CVE-2013-7381"
Signature · 1 line
2.25.1
PATCH 3/3 builder: whitelist CVE-2008-4178 (a different builder)
In reply to Ross BurtonSigned-off-by Ross Burton <[email protected]>
--- meta/recipes-graphics/builder/builder_0.1.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-graphics/builder/builder_0.1.bb +2 -0
@@ -29,3 +29,5 @@ do_install () { chown builder.builder ${D}${sysconfdir}/mini_x/session.d/builder_session.sh } +# -4178 is an unrelated 'builder' +CVE_CHECK_WHITELIST = "CVE-2008-4178"
Signature · 1 line
2.25.1