diff --git a/CVE-2023-25193-Limit_how_far_we_skip_when_looking_back.patch b/CVE-2023-25193-Limit_how_far_we_skip_when_looking_back.patch new file mode 100644 index 0000000000000000000000000000000000000000..dc2f326cc78cdb43a9f1a0177024bb173258d790 --- /dev/null +++ b/CVE-2023-25193-Limit_how_far_we_skip_when_looking_back.patch @@ -0,0 +1,20 @@ +diff -urN harfbuzz-2.7.4.old/src/hb-ot-layout-gsubgpos.hh harfbuzz-2.7.4/src/hb-ot-layout-gsubgpos.hh +--- harfbuzz-2.7.4.old/src/hb-ot-layout-gsubgpos.hh 2020-12-27 05:31:18.000000000 +0530 ++++ harfbuzz-2.7.4/src/hb-ot-layout-gsubgpos.hh 2023-09-09 18:11:07.014324408 +0530 +@@ -468,7 +468,15 @@ + bool prev () + { + assert (num_items > 0); +- while (idx > num_items - 1) ++ unsigned stop = num_items - 1; ++ ++ /* When looking back, limit how far we search; this function is mostly ++ * used for looking back for base glyphs when attaching marks. If we ++ * don't limit, we can get O(n^2) behavior where n is the number of ++ * consecutive marks. */ ++ stop = (unsigned) hb_max ((int) stop, (int) idx - HB_MAX_CONTEXT_LENGTH); ++ ++ while (idx > stop) + { + idx--; + const hb_glyph_info_t &info = c->buffer->out_info[idx]; diff --git a/harfbuzz.spec b/harfbuzz.spec index cec4775a57d64531b82ba349f6493183526474d9..3798b41771cefbd68e1d0b866fb18a2fd1593015 100644 --- a/harfbuzz.spec +++ b/harfbuzz.spec @@ -1,7 +1,7 @@ %define anolis_release .0.1 Name: harfbuzz Version: 2.7.4 -Release: 8%{anolis_release}%{?dist} +Release: 10%{anolis_release}%{?dist} Summary: Text shaping library License: MIT @@ -10,6 +10,8 @@ Source0: https://github.com/harfbuzz/harfbuzz/releases/download/%{version # Upstream patch https://github.com/harfbuzz/harfbuzz/issues/3557 Patch0: CVE-2022-33068-sbix-Limit-glyph-extents.patch +# Upstream https://github.com/harfbuzz/harfbuzz/commit/85be877925ddbf34f74a1229f3ca1716bb6170dc#commitcomment-101335712 +Patch1: CVE-2023-25193-Limit_how_far_we_skip_when_looking_back.patch BuildRequires: cairo-devel BuildRequires: freetype-devel @@ -51,6 +53,8 @@ Doc pages for %{name}. %prep %autosetup -p1 +# rpminspect complained about invalid unicode characters like 0x202B and 0x202C +rm -f test/shaping/texts/in-house/shaper-arabic/script-arabic/language-persian/mehran.txt %build @@ -102,9 +106,15 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %doc NEWS AUTHORS README %changelog -* Mon May 15 2023 Chang Gao - 2.7.4-8.0.1 +* Wed May 15 2024 Chang Gao - 2.7.4-10.0.1 - Add doc subpack +* Mon Sep 18 2023 Parag Nemade - 2.7.4-10 +- Resolves:RHEL-2268 Fix CI tests results + +* Sat Sep 09 2023 Parag Nemade - 2.7.4-9 +- Resolves:RHEL-2268 CVE-2023-25193 + * Mon Jul 18 2022 Parag Nemade - 2.7.4-8 - Resolves:rh#2103849 - Update tests.yaml