From feb8d4c454f1c5e80685b1bb9a2b7339fbb3d390 Mon Sep 17 00:00:00 2001 From: yujingbo Date: Tue, 5 Aug 2025 10:02:57 +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 4397069..aa98074 100644 --- a/poppler.spec +++ b/poppler.spec @@ -4,7 +4,7 @@ Name: poppler Version: 23.12.0 -Release: 9 +Release: 10 Summary: PDF rendering library License: GPLv2+ and LGPLv2+ and MIT URL: http://poppler.freedesktop.org/ @@ -20,6 +20,7 @@ Patch6002: backport-CVE-2025-32364.patch Patch6003: backport-CVE-2025-32365.patch Patch6004: backport-CVE-2025-43903.patch Patch6005: backport-CVE-2025-52886.patch +Patch6006: backport-CVE-2025-50420.patch BuildRequires: make BuildRequires: cmake @@ -265,6 +266,9 @@ test "$(pkg-config --modversion poppler-qt6)" = "%{version}" %{_mandir}/man1/* %changelog +* Tue Aug 05 2025 yujingbo - 23.12.0-10 +- fix CVE-2025-50420 + * Thu Jul 24 2025 lingsheng - 23.12.0-9 - fix CVE-2025-52886 -- Gitee