Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E782DC61DA3 for ; Mon, 20 Feb 2023 23:00:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 92D09824DD; Mon, 20 Feb 2023 23:00:57 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 92D09824DD X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tf6LQ8o1xclF; Mon, 20 Feb 2023 23:00:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id A49E182503; Mon, 20 Feb 2023 23:00:55 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A49E182503 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 29FBF1BF2E3 for ; Mon, 20 Feb 2023 20:56:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 52C02612B2 for ; Mon, 20 Feb 2023 20:52:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 52C02612B2 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VqvAu5gwfZ-e for ; Mon, 20 Feb 2023 20:52:10 +0000 (UTC) Received: from busybox.osuosl.org (busybox.osuosl.org [140.211.167.122]) by smtp3.osuosl.org (Postfix) with ESMTP id 746C7612A4 for ; Mon, 20 Feb 2023 20:52:10 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 746C7612A4 Received: by busybox.osuosl.org (Postfix, from userid 4053) id 7143381979; Mon, 20 Feb 2023 20:52:10 +0000 (UTC) From: Peter Korsgaard To: buildroot@buildroot.org Date: Wed, 14 Dec 2022 20:02:14 +0100 X-Git-Refname: refs/heads/next X-Git-Oldrev: e38d5190ea16a7fda9f3045ba9ba316e4da53f5c X-Git-Newrev: b38286d7e5919693cad2dc5b19024b1c03d29c18 X-Patchwork-Hint: ignore Message-Id: <20230220205210.7143381979@busybox.osuosl.org> Subject: [Buildroot] [git commit branch/next] package/cairo: fix CVE-2019-6462 X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" commit: https://git.buildroot.net/buildroot/commit/?id=b38286d7e5919693cad2dc5b19024b1c03d29c18 branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next Add an upstream patch to fix CVE-2019-6462: An issue was discovered in cairo 1.16.0. There is an infinite loop in the function _arc_error_normalized in the file cairo-arc.c, related to _arc_max_angle_for_tolerance_normalized. Cc: Quentin Schulz Signed-off-by: Quentin Schulz Signed-off-by: Peter Korsgaard --- ...gle_for_tolerance_normalized-fix-infinite.patch | 39 ++++++++++++++++++++++ package/cairo/cairo.mk | 2 ++ 2 files changed, 41 insertions(+) diff --git a/package/cairo/0003-_arc_max_angle_for_tolerance_normalized-fix-infinite.patch b/package/cairo/0003-_arc_max_angle_for_tolerance_normalized-fix-infinite.patch new file mode 100644 index 0000000000..078e90fa42 --- /dev/null +++ b/package/cairo/0003-_arc_max_angle_for_tolerance_normalized-fix-infinite.patch @@ -0,0 +1,39 @@ +From ab2c5ee21e5f3d3ee4b3f67cfcd5811a4f99c3a0 Mon Sep 17 00:00:00 2001 +From: Heiko Lewin +Date: Sun, 1 Aug 2021 11:16:03 +0000 +Subject: [PATCH] _arc_max_angle_for_tolerance_normalized: fix infinite loop + +[Retrieved from: +https://gitlab.freedesktop.org/cairo/cairo/-/commit/ab2c5ee21e5f3d3ee4b3f67cfcd5811a4f99c3a0] +Signed-off-by: Quentin Schulz +--- + src/cairo-arc.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/cairo-arc.c b/src/cairo-arc.c +index 390397bae..1c891d1a0 100644 +--- a/src/cairo-arc.c ++++ b/src/cairo-arc.c +@@ -90,16 +90,18 @@ _arc_max_angle_for_tolerance_normalized (double tolerance) + { M_PI / 11.0, 9.81410988043554039085e-09 }, + }; + int table_size = ARRAY_LENGTH (table); ++ const int max_segments = 1000; /* this value is chosen arbitrarily. this gives an error of about 1.74909e-20 */ + + for (i = 0; i < table_size; i++) + if (table[i].error < tolerance) + return table[i].angle; + + ++i; ++ + do { + angle = M_PI / i++; + error = _arc_error_normalized (angle); +- } while (error > tolerance); ++ } while (error > tolerance && i < max_segments); + + return angle; + } +-- +2.38.1 + diff --git a/package/cairo/cairo.mk b/package/cairo/cairo.mk index f479aa252a..8bb7ca121d 100644 --- a/package/cairo/cairo.mk +++ b/package/cairo/cairo.mk @@ -14,6 +14,8 @@ CAIRO_INSTALL_STAGING = YES # 0002-ft-Use-FT_Done_MM_Var-instead-of-free-when-available-in-cairo_ft_apply_variation.patch CAIRO_IGNORE_CVES += CVE-2018-19876 +# 0003-_arc_max_angle_for_tolerance_normalized-fix-infinite.patch +CAIRO_IGNORE_CVES += CVE-2019-6462 CAIRO_CONF_ENV = LIBS="$(CAIRO_LIBS)" _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot