From ca46203a1fdcf2a83b1a4f41a8b5ef9eb2b787e6 Mon Sep 17 00:00:00 2001 From: Dan Andresan Date: Fri, 26 Oct 2018 10:26:16 +0200 Subject: libcroco: Fix CVE-2017-7961 libcroco in the upstream pyro is 0.6.11. CVE: CVE-2017-7961 Reference: CVE-2017-7961 https://gitlab.gnome.org/GNOME/libcroco/commit/9ad72875e9f08e4c519ef63d44cdbd94aa9504f7 Change-Id: I7769b73a81e012d52309e0f47b24d99b23eb4a05 Signed-off-by: Andreas Wellving Signed-off-by: Adrian Mangeac --- ...61-tknzr-support-only-max-long-rgb-values.patch | 47 ++++++++++++++++++++++ recipes-support/libcroco/libcroco_0.6.11.bbappend | 6 +++ 2 files changed, 53 insertions(+) create mode 100644 recipes-support/libcroco/libcroco/CVE-2017-7961-tknzr-support-only-max-long-rgb-values.patch create mode 100644 recipes-support/libcroco/libcroco_0.6.11.bbappend diff --git a/recipes-support/libcroco/libcroco/CVE-2017-7961-tknzr-support-only-max-long-rgb-values.patch b/recipes-support/libcroco/libcroco/CVE-2017-7961-tknzr-support-only-max-long-rgb-values.patch new file mode 100644 index 0000000..520a52d --- /dev/null +++ b/recipes-support/libcroco/libcroco/CVE-2017-7961-tknzr-support-only-max-long-rgb-values.patch @@ -0,0 +1,47 @@ +From 9ad72875e9f08e4c519ef63d44cdbd94aa9504f7 Mon Sep 17 00:00:00 2001 +From: Ignacio Casal Quinteiro +Date: Sun, 16 Apr 2017 13:56:09 +0200 +Subject: [PATCH] tknzr: support only max long rgb values + +This fixes a possible out of bound when reading rgbs which +are longer than the support MAXLONG + +CVE: CVE-2017-7961 +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libcroco/commit/9ad72875e9f08e4c519ef63d44cdbd94aa9504f7] + +Signed-off-by: Andreas Wellving +--- + src/cr-tknzr.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/cr-tknzr.c b/src/cr-tknzr.c +index 1a7cfeb..1548c35 100644 +--- a/src/cr-tknzr.c ++++ b/src/cr-tknzr.c +@@ -1279,6 +1279,11 @@ cr_tknzr_parse_rgb (CRTknzr * a_this, CRRgb ** a_rgb) + status = cr_tknzr_parse_num (a_this, &num); + ENSURE_PARSING_COND ((status == CR_OK) && (num != NULL)); + ++ if (num->val > G_MAXLONG) { ++ status = CR_PARSING_ERROR; ++ goto error; ++ } ++ + red = num->val; + cr_num_destroy (num); + num = NULL; +@@ -1298,6 +1303,11 @@ cr_tknzr_parse_rgb (CRTknzr * a_this, CRRgb ** a_rgb) + status = cr_tknzr_parse_num (a_this, &num); + ENSURE_PARSING_COND ((status == CR_OK) && (num != NULL)); + ++ if (num->val > G_MAXLONG) { ++ status = CR_PARSING_ERROR; ++ goto error; ++ } ++ + PEEK_BYTE (a_this, 1, &next_bytes[0]); + if (next_bytes[0] == '%') { + SKIP_CHARS (a_this, 1); +-- +2.7.4 + diff --git a/recipes-support/libcroco/libcroco_0.6.11.bbappend b/recipes-support/libcroco/libcroco_0.6.11.bbappend new file mode 100644 index 0000000..c1b3b6c --- /dev/null +++ b/recipes-support/libcroco/libcroco_0.6.11.bbappend @@ -0,0 +1,6 @@ +# look for files in the layer first +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += " \ + file://CVE-2017-7961-tknzr-support-only-max-long-rgb-values.patch \ + " -- cgit v1.2.3-54-g00ecf