diff --git a/poppler-0.73.0-negative-xref-indices.patch b/poppler-0.73.0-negative-xref-indices.patch new file mode 100644 index 0000000..637c9a7 --- /dev/null +++ b/poppler-0.73.0-negative-xref-indices.patch @@ -0,0 +1,29 @@ +From b54e1fc3e0d2600621a28d50f9f085b9e38619c2 Mon Sep 17 00:00:00 2001 +From: Adam Reichold +Date: Fri, 1 Feb 2019 08:42:27 +0100 +Subject: [PATCH] Also defend against requests for negative XRef indices. + oss-fuzz/12797 + +--- + poppler/XRef.cc | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/poppler/XRef.cc b/poppler/XRef.cc +index d042d1f4..ac2cd0ce 100644 +--- a/poppler/XRef.cc ++++ b/poppler/XRef.cc +@@ -1565,6 +1565,11 @@ DummyXRefEntry dummyXRefEntry; + + XRefEntry *XRef::getEntry(int i, bool complainIfMissing) + { ++ if (unlikely(i < 0)) { ++ error(errInternal, -1, "Request for invalid XRef entry [{0:d}]", i); ++ return &dummyXRefEntry; ++ } ++ + if (i >= size || entries[i].type == xrefEntryNone) { + + if ((!xRefStream) && mainXRefEntriesOffset) { +-- +2.20.1 + diff --git a/poppler.spec b/poppler.spec index 1cc76cd..a7e2f23 100644 --- a/poppler.spec +++ b/poppler.spec @@ -4,7 +4,7 @@ Summary: PDF rendering library Name: poppler Version: 0.73.0 -Release: 2%{?dist} +Release: 3%{?dist} License: (GPLv2 or GPLv3) and GPLv2+ and LGPLv2+ and MIT URL: http://poppler.freedesktop.org/ Source0: http://poppler.freedesktop.org/poppler-%{version}.tar.xz @@ -22,6 +22,9 @@ Patch6: poppler-0.63.0-tiling-patterns.patch Patch7: poppler-0.67.0-qt4-const.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1672419 +Patch8: poppler-0.73.0-negative-xref-indices.patch + BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: gettext-devel @@ -252,6 +255,10 @@ test "$(pkg-config --modversion poppler-splash)" = "%{version}" %{_mandir}/man1/* %changelog +* Wed Feb 20 2019 Marek Kasik - 0.73.0-3 +- Defend against requests for negative XRef indices +- Resolves: #1672420 + * Sat Feb 02 2019 Fedora Release Engineering - 0.73.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild