diff --git a/CVE-2025-50420.patch b/CVE-2025-50420.patch new file mode 100644 index 0000000000000000000000000000000000000000..6afd9270322b90cd2ab8197b47e26f93cffb0825 --- /dev/null +++ b/CVE-2025-50420.patch @@ -0,0 +1,34 @@ +From 08d7894e4dd0e313c179e30f06ad8f546619b1b3 Mon Sep 17 00:00:00 2001 +From: Sune Vuorela +Date: Tue, 29 Jul 2025 14:14:00 +0200 +Subject: [PATCH] Fix crash in pdfseparate + +Don't continue recursing in PDFDoc::mark* if things looks a bit weirder +than expected +--- + poppler/PDFDoc.cc | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc +index 0b0b3215cb..0cfb273884 100644 +--- a/poppler/PDFDoc.cc ++++ b/poppler/PDFDoc.cc +@@ -1857,6 +1857,15 @@ bool PDFDoc::markAnnotations(Object *annotsObj, XRef *xRef, XRef *countRef, unsi + if (obj1.isDict()) { + Dict *dict = obj1.getDict(); + Object type = dict->lookup("Type"); ++ if (type.isNull()) { ++ Object subType = dict->lookup("SubType"); ++ // Type is optional, subtype is required ++ // If neither of them exists, something is probably ++ // weird here, so let us just skip this entry ++ if (subType.isNull()) { ++ continue; ++ } ++ } + if (type.isName() && strcmp(type.getName(), "Annot") == 0) { + const Object &obj2 = dict->lookupNF("P"); + if (obj2.isRef()) { +-- +GitLab + diff --git a/poppler.spec b/poppler.spec index 59d2017b5a239eae395ef75967aad003b664279b..c5b7bc221daa394469edb6ac0f0a5741653d2f41 100644 --- a/poppler.spec +++ b/poppler.spec @@ -5,7 +5,7 @@ Name: poppler Version: 25.07.0 -Release: 1 +Release: 2 Summary: PDF rendering library License: (GPL-2.0-only OR GPL-3.0-only) AND GPL-2.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND MIT URL: https://poppler.freedesktop.org/ @@ -15,6 +15,7 @@ Source1: https://gitlab.freedesktop.org/poppler/test/-/archive/%{test_sha}/test- Patch0: backport-Enable-SHA-1-within-test-pdf-validate-signature.cc.patch Patch1: poppler-0.90.0-position-independent-code.patch Patch3: poppler-21.01.0-glib-introspection.patch +Patch4: CVE-2025-50420.patch BuildRequires: make BuildRequires: cmake >= 3.22.0 @@ -240,6 +241,9 @@ other formats. %{_mandir}/man1/* %changelog +* Tue Aug 5 2025 yujingbo - 25.07.0-2 +- fix CVE-2025-50420 + * Fri Jul 11 2025 Funda Wang - 25.07.0-1 - update to 25.07.0