From: Peter Marko Date: Sun, 30 Mar 2025 20:42:37 +0000 (+0200) Subject: freetype: follow-up patch for CVE-2025-27363 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=41f855ea5a2018d08e0e9457d710032e96fe669b;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git freetype: follow-up patch for CVE-2025-27363 Per [1] there are two patches needed - [2] which is already included in 3.13.1 and [3] which is only in 2.13.3. Backport the second patch. [1] https://gitlab.freedesktop.org/freetype/freetype/-/issues/1322 [2] https://gitlab.freedesktop.org/freetype/freetype/-/commit/ef636696524b081f1b8819eb0c6a0b932d35757d [3] https://gitlab.freedesktop.org/freetype/freetype/-/commit/73720c7c9958e87b3d134a7574d1720ad2d24442 Signed-off-by: Peter Marko Signed-off-by: Steve Sakoman --- diff --git a/meta/recipes-graphics/freetype/freetype/CVE-2025-27363.patch b/meta/recipes-graphics/freetype/freetype/CVE-2025-27363.patch new file mode 100644 index 00000000000..0882b014980 --- /dev/null +++ b/meta/recipes-graphics/freetype/freetype/CVE-2025-27363.patch @@ -0,0 +1,33 @@ +From 73720c7c9958e87b3d134a7574d1720ad2d24442 Mon Sep 17 00:00:00 2001 +From: Alexei Podtelezhnikov +Date: Sun, 23 Jun 2024 10:58:00 -0400 +Subject: [PATCH] * src/truetype/ttgload.c (load_truetype_glyph): Unsigned fix. + +CVE: CVE-2025-27363 +Upstream-Status: Backport [https://gitlab.freedesktop.org/freetype/freetype/-/commit/73720c7c9958e87b3d134a7574d1720ad2d24442] +Signed-off-by: Peter Marko +--- + src/truetype/ttgload.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c +index 8cddc394c..b656ccf04 100644 +--- a/src/truetype/ttgload.c ++++ b/src/truetype/ttgload.c +@@ -1741,14 +1741,14 @@ + if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) || + FT_IS_VARIATION( FT_FACE( face ) ) ) + { +- short i, limit; ++ FT_UShort i, limit; + FT_SubGlyph subglyph; + + FT_Outline outline = { 0, 0, NULL, NULL, NULL, 0 }; + FT_Vector* unrounded = NULL; + + +- limit = (short)gloader->current.num_subglyphs; ++ limit = (FT_UShort)gloader->current.num_subglyphs; + + /* construct an outline structure for */ + /* communication with `TT_Vary_Apply_Glyph_Deltas' */ diff --git a/meta/recipes-graphics/freetype/freetype_2.13.2.bb b/meta/recipes-graphics/freetype/freetype_2.13.2.bb index 4e7a0ad160b..ce7a615a3c8 100644 --- a/meta/recipes-graphics/freetype/freetype_2.13.2.bb +++ b/meta/recipes-graphics/freetype/freetype_2.13.2.bb @@ -13,7 +13,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=843b6efc16f6b1652ec97f89d5a516c0 \ file://docs/GPLv2.TXT;md5=8ef380476f642c20ebf40fecb0add2ec \ " -SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BP}.tar.xz" +SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BP}.tar.xz \ + file://CVE-2025-27363.patch \ +" SRC_URI[sha256sum] = "12991c4e55c506dd7f9b765933e62fd2be2e06d421505d7950a132e4f1bb484d" UPSTREAM_CHECK_REGEX = "freetype-(?P\d+(\.\d+)+)"