From 9a11ff3fab691bf8641905de9a567798358b2baf Mon Sep 17 00:00:00 2001 From: yujingbo Date: Tue, 5 Aug 2025 09:38:44 +0800 Subject: [PATCH] fix CVE-2025-50420 --- backport-CVE-2025-50420.patch | 34 ++++++++++++++++++++++++++++++++++ poppler.spec | 6 +++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 backport-CVE-2025-50420.patch diff --git a/backport-CVE-2025-50420.patch b/backport-CVE-2025-50420.patch new file mode 100644 index 0000000..6afd927 --- /dev/null +++ b/backport-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 c5728d6..396db25 100644 --- a/poppler.spec +++ b/poppler.spec @@ -5,7 +5,7 @@ Name: poppler Version: 24.03.0 -Release: 6 +Release: 7 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/ @@ -17,6 +17,7 @@ Patch3: poppler-21.01.0-glib-introspection.patch Patch6000: backport-CVE-2024-6239.patch Patch6001: backport-CVE-2024-56378.patch +Patch6002: backport-CVE-2025-50420.patch BuildRequires: make BuildRequires: cmake @@ -248,6 +249,9 @@ test "$(pkg-config --modversion poppler-qt6)" = "%{version}" %{_mandir}/man1/* %changelog +* Tue Aug 05 2025 yujingbo - 24.03.0-7 +- fix CVE-2025-50420 + * Tue Feb 04 2025 Funda Wang - 24.03.0-6 - fix build with latest cmake migration -- Gitee