diff --git a/backport-CVE-2023-2004.patch b/backport-CVE-2023-2004.patch new file mode 100644 index 0000000000000000000000000000000000000000..4480300f22fff91e4a8f77493f0837b59306099a --- /dev/null +++ b/backport-CVE-2023-2004.patch @@ -0,0 +1,37 @@ +From e6fda039ad638866b7a6a5d046f03278ba1b7611 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg +Date: Mon, 14 Nov 2022 19:18:19 +0100 +Subject: [PATCH] * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Integer + overflow. + +Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50462 +--- + src/truetype/ttgxvar.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c +index aad3e29..a69a9b5 100644 +--- a/src/truetype/ttgxvar.c ++++ b/src/truetype/ttgxvar.c +@@ -42,6 +42,7 @@ + #include + #include + #include FT_CONFIG_CONFIG_H ++#include + #include + #include + #include +@@ -1075,7 +1076,7 @@ + delta == 1 ? "" : "s", + vertical ? "VVAR" : "HVAR" )); + +- *avalue += delta; ++ *avalue = ADD_INT(*avalue, delta ); + + Exit: + return error; +-- +2.33.0 + diff --git a/freetype.spec b/freetype.spec index 767a4a399515fef4f57aaded25b1feccba448647..f68a67898d60bc37710d108d0c1a0f148baf702f 100644 --- a/freetype.spec +++ b/freetype.spec @@ -4,7 +4,7 @@ Name: freetype Version: 2.11.0 -Release: 2 +Release: 3 Summary: FreeType is a freely available software library to render fonts License: (FTL or GPLv2+) and BSD and MIT and Public Domain and zlib with acknowledgement URL: http://www.freetype.org @@ -24,6 +24,7 @@ Patch6006: backport-CVE-2022-27404.patch Patch6007: backport-0001-CVE-2022-27405.patch Patch6008: backport-0002-CVE-2022-27405.patch Patch6009: backport-CVE-2022-27406.patch +Patch6010: backport-CVE-2023-2004.patch BuildRequires: gcc libX11-devel libpng-devel zlib-devel bzip2-devel @@ -75,6 +76,7 @@ popd %patch6007 -p1 %patch6008 -p1 %patch6009 -p1 +%patch6010 -p1 %build %configure --disable-static --with-zlib=yes --with-bzip2=yes --with-png=yes --enable-freetype-config --with-harfbuzz=no @@ -148,6 +150,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/co %{_mandir}/man1/* %changelog +* Mon Apr 17 2023 zhouwenpei - 2.11.0-3 +- fix CVE-2023-2004 + * Sat May 14 2022 wangkerong - 2.11.0-2 - fix CVE-2022-27404,CVE-2022-27405,CVE-2022-27406