diff --git a/meta-oe/recipes-support/poppler/poppler/CVE-2025-50420.patch b/meta-oe/recipes-support/poppler/poppler/CVE-2025-50420.patch new file mode 100644 index 0000000000..ad322cbf97 --- /dev/null +++ b/meta-oe/recipes-support/poppler/poppler/CVE-2025-50420.patch @@ -0,0 +1,38 @@ +From a7025904e3330dd6cf95f3664ef6fc77034cc5e1 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 + +CVE: CVE-2025-50420 +Upstream-Status: Backport [https://gitlab.freedesktop.org/poppler/poppler/-/commit/a7025904e3330dd6cf95f3664ef6fc77034cc5e1] + +Signed-off-by: Yogita Urade +--- + poppler/PDFDoc.cc | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc +index 20bb191..c2e90be 100644 +--- a/poppler/PDFDoc.cc ++++ b/poppler/PDFDoc.cc +@@ -1771,6 +1771,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()) { +-- +2.40.0 diff --git a/meta-oe/recipes-support/poppler/poppler_22.04.0.bb b/meta-oe/recipes-support/poppler/poppler_22.04.0.bb index bb6e64d657..47c88d751c 100644 --- a/meta-oe/recipes-support/poppler/poppler_22.04.0.bb +++ b/meta-oe/recipes-support/poppler/poppler_22.04.0.bb @@ -14,6 +14,7 @@ SRC_URI = "http://poppler.freedesktop.org/${BP}.tar.xz \ file://CVE-2025-32364.patch \ file://CVE-2025-32365.patch \ file://CVE-2025-43903.patch \ + file://CVE-2025-50420.patch \ " SRC_URI[sha256sum] = "813fb4b90e7bda63df53205c548602bae728887a60f4048aae4dbd9b1927deff"