diff --git a/bugfix-for-cve-2025-32364.patch b/bugfix-for-cve-2025-32364.patch deleted file mode 100644 index dc40b103589a3a61d6447a61d31f2db4972a9aee..0000000000000000000000000000000000000000 --- a/bugfix-for-cve-2025-32364.patch +++ /dev/null @@ -1,34 +0,0 @@ -From d87bc726c7cc98f8c26b60ece5f20236e9de1bc3 Mon Sep 17 00:00:00 2001 -From: Albert Astals Cid -Date: Mon, 24 Mar 2025 00:44:54 +0100 -Subject: [PATCH] PSStack::roll: Protect against doing int = -INT_MIN - ---- - poppler/Function.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/poppler/Function.cc b/poppler/Function.cc -index d84c4e350..f3168f191 100644 ---- a/poppler/Function.cc -+++ b/poppler/Function.cc -@@ -13,7 +13,7 @@ - // All changes made under the Poppler project to this file are licensed - // under GPL version 2 or later - // --// Copyright (C) 2006, 2008-2010, 2013-2015, 2017-2020, 2022, 2023 Albert Astals Cid -+// Copyright (C) 2006, 2008-2010, 2013-2015, 2017-2020, 2022-2025 Albert Astals Cid - // Copyright (C) 2006 Jeff Muizelaar - // Copyright (C) 2010 Christian Feuersänger - // Copyright (C) 2011 Andrea Canciani -@@ -1066,7 +1066,7 @@ void PSStack::roll(int n, int j) - PSObject obj; - int i, k; - -- if (unlikely(n == 0)) { -+ if (unlikely(n == 0 || j == INT_MIN)) { - return; - } - if (j >= 0) { --- -GitLab - diff --git a/bugfix-for-cve-2025-32365.patch b/bugfix-for-cve-2025-32365.patch deleted file mode 100644 index 7934970c7796284a0551e5c3f3a8903875018782..0000000000000000000000000000000000000000 --- a/bugfix-for-cve-2025-32365.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 1f151565bbca5be7449ba8eea6833051cc1baa41 Mon Sep 17 00:00:00 2001 -From: Albert Astals Cid -Date: Mon, 31 Mar 2025 14:35:49 +0200 -Subject: [PATCH] Move isOk check to inside JBIG2Bitmap::combine - ---- - poppler/JBIG2Stream.cc | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc -index cf9e0c984..4e81d4a8c 100644 ---- a/poppler/JBIG2Stream.cc -+++ b/poppler/JBIG2Stream.cc -@@ -15,7 +15,7 @@ - // - // Copyright (C) 2006 Raj Kumar - // Copyright (C) 2006 Paul Walmsley --// Copyright (C) 2006-2010, 2012, 2014-2022 Albert Astals Cid -+// Copyright (C) 2006-2010, 2012, 2014-2022, 2024, 2025 Albert Astals Cid - // Copyright (C) 2009 David Benjamin - // Copyright (C) 2011 Edward Jiang - // Copyright (C) 2012 William Bader -@@ -770,6 +770,9 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp - unsigned int src0, src1, src, dest, s1, s2, m1, m2, m3; - bool oneByte; - -+ if (unlikely(!isOk())) { -+ return; -+ } - // check for the pathological case where y = -2^31 - if (y < -0x7fffffff) { - return; -@@ -2200,9 +2203,7 @@ void JBIG2Stream::readTextRegionSeg(unsigned int segNum, bool imm, bool lossless - if (pageH == 0xffffffff && y + h > curPageH) { - pageBitmap->expand(y + h, pageDefPixel); - } -- if (pageBitmap->isOk()) { -- pageBitmap->combine(bitmap.get(), x, y, extCombOp); -- } -+ pageBitmap->combine(bitmap.get(), x, y, extCombOp); - - // store the region bitmap - } else { --- -GitLab - diff --git a/fix-CVE-2024-56378.patch b/fix-CVE-2024-56378.patch deleted file mode 100644 index 7519346d82b658bef3e1ecf328380a80bc46d1b5..0000000000000000000000000000000000000000 --- a/fix-CVE-2024-56378.patch +++ /dev/null @@ -1,73 +0,0 @@ -From ade9b5ebed44b0c15522c27669ef6cdf93eff84e Mon Sep 17 00:00:00 2001 -From: Albert Astals Cid -Date: Tue, 17 Dec 2024 18:59:01 +0100 -Subject: [PATCH] JBIG2Bitmap::combine: Fix crash on malformed files - -Fixes #1553 ---- - poppler/JBIG2Stream.cc | 15 +++++++++------ - 1 file changed, 9 insertions(+), 6 deletions(-) - -diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc -index f482a123f..b2f96e149 100644 ---- a/poppler/JBIG2Stream.cc -+++ b/poppler/JBIG2Stream.cc -@@ -762,7 +762,7 @@ void JBIG2Bitmap::duplicateRow(int yDest, int ySrc) - - void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp) - { -- int x0, x1, y0, y1, xx, yy; -+ int x0, x1, y0, y1, xx, yy, yyy; - unsigned char *srcPtr, *destPtr; - unsigned int src0, src1, src, dest, s1, s2, m1, m2, m3; - bool oneByte; -@@ -809,14 +809,17 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp - oneByte = x0 == ((x1 - 1) & ~7); - - for (yy = y0; yy < y1; ++yy) { -- if (unlikely((y + yy >= h) || (y + yy < 0))) { -+ if (unlikely(checkedAdd(y, yy, &yyy))) { -+ continue; -+ } -+ if (unlikely((yyy >= h) || (yyy < 0))) { - continue; - } - - // one byte per line -- need to mask both left and right side - if (oneByte) { - if (x >= 0) { -- destPtr = data + (y + yy) * line + (x >> 3); -+ destPtr = data + yyy * line + (x >> 3); - srcPtr = bitmap->data + yy * bitmap->line; - dest = *destPtr; - src1 = *srcPtr; -@@ -839,7 +842,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp - } - *destPtr = dest; - } else { -- destPtr = data + (y + yy) * line; -+ destPtr = data + yyy * line; - srcPtr = bitmap->data + yy * bitmap->line + (-x >> 3); - dest = *destPtr; - src1 = *srcPtr; -@@ -869,7 +872,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp - - // left-most byte - if (x >= 0) { -- destPtr = data + (y + yy) * line + (x >> 3); -+ destPtr = data + yyy * line + (x >> 3); - srcPtr = bitmap->data + yy * bitmap->line; - src1 = *srcPtr++; - dest = *destPtr; -@@ -893,7 +896,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp - *destPtr++ = dest; - xx = x0 + 8; - } else { -- destPtr = data + (y + yy) * line; -+ destPtr = data + yyy * line; - srcPtr = bitmap->data + yy * bitmap->line + (-x >> 3); - src1 = *srcPtr++; - xx = x0; --- -GitLab - diff --git a/fix-cve-2024-6239.patch b/fix-cve-2024-6239.patch deleted file mode 100644 index aebd15b8c06c53526bc4b36fc779e79dfe6bd225..0000000000000000000000000000000000000000 --- a/fix-cve-2024-6239.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 5d83ce7a6540ef424c2e2e8bd8947361c69eef3e Mon Sep 17 00:00:00 2001 -From: Yang_X_Y -Date: Fri, 2 Aug 2024 16:21:29 +0800 -Subject: [PATCH] fix-cve-2024-6239 - ---- - utils/pdfinfo.cc | 33 ++++++++++++++------------------- - 1 file changed, 14 insertions(+), 19 deletions(-) - -diff --git a/utils/pdfinfo.cc b/utils/pdfinfo.cc -index 1f4ca79..320600a 100644 ---- a/utils/pdfinfo.cc -+++ b/utils/pdfinfo.cc -@@ -112,11 +112,11 @@ static const ArgDesc argDesc[] = { { "-f", argInt, &firstPage, 0, "first page to - { "-?", argFlag, &printHelp, 0, "print usage information" }, - {} }; - --static void printTextString(const GooString *s, const UnicodeMap *uMap) -+static void printStdTextString(const std::string &s, const UnicodeMap *uMap) - { - Unicode *u; - char buf[8]; -- int len = TextStringToUCS4(s->toStr(), &u); -+ int len = TextStringToUCS4(s, &u); - for (int i = 0; i < len; i++) { - int n = uMap->mapUnicode(u[i], buf, sizeof(buf)); - fwrite(buf, 1, n, stdout); -@@ -124,6 +124,11 @@ static void printTextString(const GooString *s, const UnicodeMap *uMap) - gfree(u); - } - -+static void printTextString(const GooString *s, const UnicodeMap *uMap) -+{ -+ printStdTextString(s->toStr(), uMap); -+} -+ - static void printUCS4String(const Unicode *u, int len, const UnicodeMap *uMap) - { - char buf[8]; -@@ -295,11 +300,6 @@ static void printStruct(const StructElement *element, unsigned indent) - } - } - --struct GooStringCompare --{ -- bool operator()(GooString *lhs, GooString *rhs) const { return lhs->cmp(const_cast(rhs)) < 0; } --}; -- - static void printLinkDest(const std::unique_ptr &dest) - { - GooString s; -@@ -370,29 +370,25 @@ static void printLinkDest(const std::unique_ptr &dest) - - static void printDestinations(PDFDoc *doc, const UnicodeMap *uMap) - { -- std::map, GooStringCompare>> map; -+ std::map>> map; - - int numDests = doc->getCatalog()->numDestNameTree(); - for (int i = 0; i < numDests; i++) { -- GooString *name = new GooString(doc->getCatalog()->getDestNameTreeName(i)); -+ const GooString *name = doc->getCatalog()->getDestNameTreeName(i); - std::unique_ptr dest = doc->getCatalog()->getDestNameTreeDest(i); -- if (dest && dest->isPageRef()) { -+ if (name && dest && dest->isPageRef()) { - Ref pageRef = dest->getPageRef(); -- map[pageRef].insert(std::make_pair(name, std::move(dest))); -- } else { -- delete name; -+ map[pageRef].insert(std::make_pair(name->toStr(), std::move(dest))); - } - } - - numDests = doc->getCatalog()->numDests(); - for (int i = 0; i < numDests; i++) { -- GooString *name = new GooString(doc->getCatalog()->getDestsName(i)); -+ const char *name = doc->getCatalog()->getDestsName(i); - std::unique_ptr dest = doc->getCatalog()->getDestsDest(i); -- if (dest && dest->isPageRef()) { -+ if (name && dest && dest->isPageRef()) { - Ref pageRef = dest->getPageRef(); - map[pageRef].insert(std::make_pair(name, std::move(dest))); -- } else { -- delete name; - } - } - -@@ -406,9 +402,8 @@ static void printDestinations(PDFDoc *doc, const UnicodeMap *uMap) - printf("%4d ", i); - printLinkDest(it.second); - printf(" \""); -- printTextString(it.first, uMap); -+ printStdTextString(it.first, uMap); - printf("\"\n"); -- delete it.first; - } - } - } --- -2.33.0 - diff --git a/poppler-0.90.0-position-independent-code.patch b/poppler-0.90.0-position-independent-code.patch index 12c879ea6996cc79ddff240ae3f0b361ec1b2015..b93d39920fe65e78db22861de4309a77268fbec4 100644 --- a/poppler-0.90.0-position-independent-code.patch +++ b/poppler-0.90.0-position-independent-code.patch @@ -1,6 +1,6 @@ ---- poppler-0.90.0/CMakeLists.txt -+++ poppler-0.90.0/CMakeLists.txt -@@ -17,6 +17,9 @@ else() +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -19,6 +19,9 @@ else() include(MacroOptionalFindPackage) find_package(PkgConfig) diff --git a/poppler-21.01.0-glib-introspection.patch b/poppler-21.01.0-glib-introspection.patch index 6b827383ba916c2e837798689823c63f2944e28c..3118ce846b72133266f0166689dc944d4e5f0e91 100644 --- a/poppler-21.01.0-glib-introspection.patch +++ b/poppler-21.01.0-glib-introspection.patch @@ -1,6 +1,6 @@ ---- poppler-21.01.0/glib/CMakeLists.txt -+++ poppler-21.01.0/glib/CMakeLists.txt -@@ -121,7 +121,7 @@ if (HAVE_INTROSPECTION AND BUILD_SHARED_ +--- a/glib/CMakeLists.txt ++++ b/glib/CMakeLists.txt +@@ -132,7 +132,7 @@ if (HAVE_INTROSPECTION AND BUILD_SHARED_ # General gir: Reset object-list for introspection & load tool args set(INTROSPECTION_GIRS) diff --git a/poppler-23.05.0.tar.xz b/poppler-23.05.0.tar.xz deleted file mode 100644 index 2653f4420cd0690897d55603b773da560b9e196b..0000000000000000000000000000000000000000 Binary files a/poppler-23.05.0.tar.xz and /dev/null differ diff --git a/poppler-25.04.0.tar.xz b/poppler-25.04.0.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..104b886c8dd457571f43b3460e5ab1a0362e08f6 Binary files /dev/null and b/poppler-25.04.0.tar.xz differ diff --git a/poppler-CVE-2023-34872.patch b/poppler-CVE-2023-34872.patch deleted file mode 100644 index 5ae568fcb9fa7558fd5e28b1b3f62f6132dfb6ca..0000000000000000000000000000000000000000 --- a/poppler-CVE-2023-34872.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 591235c8b6c65a2eee88991b9ae73490fd9afdfe Mon Sep 17 00:00:00 2001 -From: Albert Astals Cid -Date: Wed, 17 May 2023 22:42:05 +0200 -Subject: OutlineItem::open: Fix crash on malformed files - -Fixes #1399 ---- - poppler/Outline.cc | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/poppler/Outline.cc b/poppler/Outline.cc -index cbb6cb49..4c68be99 100644 ---- a/poppler/Outline.cc -+++ b/poppler/Outline.cc -@@ -14,7 +14,7 @@ - // under GPL version 2 or later - // - // Copyright (C) 2005 Marco Pesenti Gritti --// Copyright (C) 2008, 2016-2019, 2021 Albert Astals Cid -+// Copyright (C) 2008, 2016-2019, 2021, 2023 Albert Astals Cid - // Copyright (C) 2009 Nick Jones - // Copyright (C) 2016 Jason Crain - // Copyright (C) 2017 Adrian Johnson -@@ -483,8 +483,12 @@ void OutlineItem::open() - { - if (!kids) { - Object itemDict = xref->fetch(ref); -- const Object &firstRef = itemDict.dictLookupNF("First"); -- kids = readItemList(this, &firstRef, xref, doc); -+ if (itemDict.isDict()) { -+ const Object &firstRef = itemDict.dictLookupNF("First"); -+ kids = readItemList(this, &firstRef, xref, doc); -+ } else { -+ kids = new std::vector(); -+ } - } - } - --- -cgit v1.2.1 - diff --git a/poppler.spec b/poppler.spec index f6c38f6b3c37764743b44e1a70712c3c8c774bba..daea67fc0b8553c3520a017a8a7b7cb557f013d2 100644 --- a/poppler.spec +++ b/poppler.spec @@ -1,31 +1,16 @@ -%define anolis_release 6 +%define anolis_release 1 # %%global qt6 1 Summary: PDF rendering library Name: poppler -Version: 23.05.0 -Release: %{anolis_release}%{?dist} +Version: 25.04.0 +Release: %{anolis_release}%{?dist}_2 License: (GPLv2 or GPLv3) and GPLv2+ and LGPLv2+ and MIT URL: https://poppler.freedesktop.org/ Source0: https://poppler.freedesktop.org/%{name}-%{version}.tar.xz -# test_sha ae4c5f64986aeaa6701bb65235eccd99243c76bc -# test_date 2023-03-15 Source1: https://gitlab.freedesktop.org/poppler/test/-/archive/master/test-master.tar.bz2 Patch1: poppler-0.90.0-position-independent-code.patch Patch2: poppler-21.01.0-glib-introspection.patch -Patch3: poppler-CVE-2023-34872.patch - -#https://gitlab.freedesktop.org/poppler/poppler/-/commit/0554731052d1a97745cb179ab0d45620589dd9c4 -Patch4: fix-cve-2024-6239.patch - -#https://gitlab.freedesktop.org/poppler/poppler/-/commit/ade9b5ebed44b0c15522c27669ef6cdf93eff84e -Patch5: fix-CVE-2024-56378.patch - -# https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/1792/diffs?commit_id=1f151565bbca5be7449ba8eea6833051cc1baa41 -Patch6: bugfix-for-cve-2025-32365.patch - -# https://gitlab.freedesktop.org/poppler/poppler/-/commit/d87bc726c7cc98f8c26b60ece5f20236e9de1bc3 -Patch7: bugfix-for-cve-2025-32364.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -58,6 +43,7 @@ BuildRequires: pkgconfig(Qt5Gui) >= 5.12 BuildRequires: pkgconfig(Qt5Test) >= 5.12 BuildRequires: pkgconfig(Qt5Widgets) >= 5.12 BuildRequires: pkgconfig(Qt5Xml) >= 5.12 +BuildRequires: cmake(Gpgmepp) %if 0%{?qt6} BuildRequires: cmake(Qt6Core) BuildRequires: cmake(Qt6Gui) @@ -179,7 +165,8 @@ other formats. -DENABLE_LIBOPENJPEG=openjpeg2 \ -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \ -DENABLE_ZLIB=OFF \ - -DTESTDATADIR=%{_builddir}/test-master + -DTESTDATADIR=%{_builddir}/test-master \ + -DENABLE_QT6=OFF \ %cmake_build %install @@ -238,7 +225,7 @@ other formats. %endif %files cpp -%{_libdir}/libpoppler-cpp.so.0* +%{_libdir}/libpoppler-cpp.so.2* %files cpp-devel %{_libdir}/pkgconfig/poppler-cpp.pc @@ -248,12 +235,16 @@ other formats. %files utils %{_bindir}/pdf* %{_mandir}/man1/* +%{_datadir}/locale/* %changelog -* Mon Apr 14 2025 tomcruise - 23.05.0-6 +* Thu Apr 24 2025 tomcruiseqi <10762123+tomcruiseqi@user.noreply.gitee.com> - 25.04.0-1 +- Update to 25.04.0 to fix CVE-2025-43903 + +* Mon Apr 14 2025 tomcruiseqi <10762123+tomcruiseqi@user.noreply.gitee.com> - 23.05.0-6 - Fix CVE-2025-32364 -* Sat Apr 12 2025 tomcruise - 23.05.0-5 +* Sat Apr 12 2025 tomcruiseqi <10762123+tomcruiseqi@user.noreply.gitee.com> - 23.05.0-5 - Fix CVE-2025-32365 * Mon Jan 13 2025 mgb01105731 - 23.05.0-4 diff --git a/test-master.tar.bz2 b/test-master.tar.bz2 index df8002ad12e3b781a664ae575163e0fe10f70191..7d828536a2e2aef494e0bd10375f8b012282931c 100644 Binary files a/test-master.tar.bz2 and b/test-master.tar.bz2 differ