Open
[sync] PR-91: fix CVE-2026-95512 #97
openeuler-ci-botAdd on Oct 13
[sync] PR-91: fix CVE-2026-95512 #97
Open
Total: 2 files changed+43-1
| @@ -0,0 +1,38 @@ | |||
| 1 | +From f3ca71c9900fe860849b3163a6e2c1e765b291d9 Mon Sep 17 00:00:00 2001 | ||
| 2 | +From: Alexei Podtelezhnikov <apodtele@gmail.com> | ||
| 3 | +Date: Mon, 7 Sep 2026 15:02:23 -0400 | ||
| 4 | +Subject: [PATCH] * src/cid/cidload.c (cid_read_subrs): Limit overlaps. | ||
| 5 | + | ||
| 6 | +Overlaps between subroutine dictionaries can be useful but prone to | ||
| 7 | +abuses. The arbitrary limit can be adjusted in the future. Fixes #1457. | ||
| 8 | +--- | ||
| 9 | + src/cid/cidload.c | 9 +++++++++ | ||
| 10 | + 1 file changed, 9 insertions(+) | ||
| 11 | + | ||
| 12 | +diff --git a/src/cid/cidload.c b/src/cid/cidload.c | ||
| 13 | +index 1a0e6b156..b9ab1b9e0 100644 | ||
| 14 | +--- a/src/cid/cidload.c | ||
| 15 | ++++ b/src/cid/cidload.c | ||
| 16 | +@@ -517,6 +517,7 @@ | ||
| 17 | + CID_Subrs subr; | ||
| 18 | + FT_UInt max_offsets = 0; | ||
| 19 | + FT_ULong* offsets = NULL; | ||
| 20 | ++ FT_ULong cum_len = 0; | ||
| 21 | + PSAux_Service psaux = (PSAux_Service)face->psaux; | ||
| 22 | + | ||
| 23 | + | ||
| 24 | +@@ -584,6 +585,14 @@ | ||
| 25 | + /* now, compute the size of subrs charstrings, */ | ||
| 26 | + /* allocate, and read them */ | ||
| 27 | + data_len = offsets[num_subrs] - offsets[0]; | ||
| 28 | ++ cum_len += data_len; | ||
| 29 | ++ | ||
| 30 | ++ if ( cum_len / 4 > stream->size ) | ||
| 31 | ++ { | ||
| 32 | ++ FT_ERROR(( "cid_read_subrs: excessive overlaps\n" )); | ||
| 33 | ++ error = FT_THROW( Invalid_File_Format ); | ||
| 34 | ++ goto Fail; | ||
| 35 | ++ } | ||
| 36 | + | ||
| 37 | + if ( FT_NEW_ARRAY( subr->code, num_subrs + 1 ) || | ||
| 38 | + FT_ALLOC( subr->code[0], data_len ) ) | ||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | Name: freetype | 7 | Name: freetype |
| 8 | Version: 2.13.2 | 8 | Version: 2.13.2 |
| 9 | -Release: 6 | 9 | +Release: 7 |
| 10 | Summary: FreeType is a freely available software library to render fonts | 10 | Summary: FreeType is a freely available software library to render fonts |
| 11 | License: (FTL OR GPL-2.0-or-later) AND BSD-3-Clause AND MIT AND MIT-Modern-Variant AND Zlib | 11 | License: (FTL OR GPL-2.0-or-later) AND BSD-3-Clause AND MIT AND MIT-Modern-Variant AND Zlib |
| 12 | URL: https://www.freetype.org | 12 | URL: https://www.freetype.org |
| @@ -27,6 +27,7 @@ Patch6005: backport-freetype-2.10.1-debughook.patch | |||
| 27 | Patch6006: backport-CVE-2025-27363.patch | 27 | Patch6006: backport-CVE-2025-27363.patch |
| 28 | Patch6007: backport-001-CVE-2026-23865.patch | 28 | Patch6007: backport-001-CVE-2026-23865.patch |
| 29 | Patch6008: backport-002-CVE-2026-23865.patch | 29 | Patch6008: backport-002-CVE-2026-23865.patch |
| 30 | +Patch6009: backport-CVE-2026-95512.patch | ||
| 30 | 31 | ||
| 31 | BuildRequires: gcc meson | 32 | BuildRequires: gcc meson |
| 32 | BuildRequires: pkgconfig(bzip2) | 33 | BuildRequires: pkgconfig(bzip2) |
| @@ -166,6 +167,9 @@ meson test -C out | |||
| 166 | %{_mandir}/man1/* | 167 | %{_mandir}/man1/* |
| 167 | 168 | ||
| 168 | %changelog | 169 | %changelog |
| 170 | +* Tue Oct 13 2026 m0_65840473 <liuyiting_2001@163.com> - 2.13.2-7 | ||
| 171 | +- fix CVE-2026-95512 | ||
| 172 | + | ||
| 169 | * Tue Jun 30 2026 mahailiang <mahailiang@uniontech.com> - 2.13.2-6 | 173 | * Tue Jun 30 2026 mahailiang <mahailiang@uniontech.com> - 2.13.2-6 |
| 170 | - add buildrequires on with_xfree86 | 174 | - add buildrequires on with_xfree86 |
| 171 | 175 | ||