Skip to contentSkip to conversation

package/poppler: backport patch to fix CVE-2023-34872

PATCH In review Thomas Petazzoni via buildroot 2 participants 6 messages Sep 2, 2023 – Sep 14, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/poppler: backport patch to fix CVE-2023-34872

---
 ...em-open-Fix-crash-on-malformed-files.patch | 45 +++++++++++++++++++
 package/poppler/poppler.mk                    |  2 +
 2 files changed, 47 insertions(+)
 create mode 100644 package/poppler/0001-OutlineItem-open-Fix-crash-on-malformed-files.patch
package/poppler/0001-OutlineItem-open-Fix-crash-on-malformed-files.patch new file +45 -0
new file mode 100644
index 0000000000..478759e0cc
@@ -0,0 +1,45 @@
+From e5cc11e0b5b867f4705fd28ff1b981c1224be1cd Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <[email protected]>
+Date: Wed, 17 May 2023 22:42:05 +0200
+Subject: [PATCH] OutlineItem::open: Fix crash on malformed files
+
+Fixes #1399
+
+Upstream: https://gitlab.freedesktop.org/poppler/poppler/-/commit/591235c8b6c65a2eee88991b9ae73490fd9afdfe
+[Thomas: backported to fix CVE-2023-34872]
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ poppler/Outline.cc | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/poppler/Outline.cc b/poppler/Outline.cc
+index cbb6cb49..4c68be99 100644
+--- a/poppler/Outline.cc
++++ b/poppler/Outline.cc
+@@ -14,7 +14,7 @@
+ // under GPL version 2 or later
+ //
+ // Copyright (C) 2005 Marco Pesenti Gritti <[email protected]>
+-// Copyright (C) 2008, 2016-2019, 2021 Albert Astals Cid <[email protected]>
++// Copyright (C) 2008, 2016-2019, 2021, 2023 Albert Astals Cid <[email protected]>
+ // Copyright (C) 2009 Nick Jones <[email protected]>
+ // Copyright (C) 2016 Jason Crain <[email protected]>
+ // Copyright (C) 2017 Adrian Johnson <[email protected]>
+@@ -483,8 +483,12 @@ void OutlineItem::open()
+ {
+     if (!kids) {
+         Object itemDict = xref->fetch(ref);
+-        const Object &firstRef = itemDict.dictLookupNF("First");
+-        kids = readItemList(this, &firstRef, xref, doc);
++        if (itemDict.isDict()) {
++            const Object &firstRef = itemDict.dictLookupNF("First");
++            kids = readItemList(this, &firstRef, xref, doc);
++        } else {
++            kids = new std::vector<OutlineItem *>();
++        }
+     }
+ }
+ 
+-- 
+2.41.0
+
package/poppler/poppler.mk +2 -0
index 5524bfc420..4c6017a5f5 100644
@@ -11,6 +11,8 @@ POPPLER_DEPENDENCIES = fontconfig host-pkgconf
 POPPLER_LICENSE = GPL-2.0+
 POPPLER_LICENSE_FILES = COPYING
 POPPLER_CPE_ID_VENDOR = freedesktop
+# 0001-OutlineItem-open-Fix-crash-on-malformed-files.patch
+POPPLER_IGNORE_CVES += CVE-2023-34872
 POPPLER_INSTALL_STAGING = YES
 
 POPPLER_CONF_OPTS = \
Signature · 6 lines
2.41.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/2 package/poppler: bump version to matest in 22.x series

This commit updates poppler to the latest version in the 22.x series, with only has bug fixes. Here is the list of commits between 22.10.0 and 22.12.0:

df568263c51950ceed6f1fb42f80e99a2614c275 (tag: poppler-22.12.0) poppler 22.12.0 198dc1d0674c0a462668e6868c35b1ee0e731005 Form::addFontToDefaultResources: Be stubborn in finding a font we can use a5952ab70716a2d4f792a943c2dcf3068f1d6885 Revert "CI: Fix Debian brokenness" 8fcaa7c622d24761a9ecb3922f95d072077d6f34 CI: Fix Debian brokenness cc665f757af6b87dd245d36e079dd44d8d2d2182 (tag: poppler-22.11.0) poppler 22.11.0 a296982e1d5b4968b2bd044d80647ae6f9267526 Do not include a poppler/ file from a splash/ header bc4a0d9a2abfcd75d9b0ee4be3f7600905fe6001 Form: Provide Unicode marker when ensuring fonts 111f38a722eedddd94faa52dda8c5e0da561fb41 Cairo: Update font after restore 907d05a6a141284aee22fbd16ab0a2fb4e0f2724 Fix crash in file that wants to do huge transparency group e53f5aae3bce7d09788f2ad62be998895fb9807b PSOutputDev::setupResources: Fix stack overflow in malformed doc a4ca3a96a6b1f65b335a1ea362e6c202e46ae055 topIdx can't be negative e471f8e09bf2e38df0cf5df1acecbcca70685573 Init all the fields of JPXStreamPrivate 5190c0d4369bd9f501922585140be4ec736e24f2 No need to store smaskInData in priv 6263bb90b09326103b10e4c4edfbc5b84c884921 Page label ranges can't start in < 0

Note: this version bump does not include the fix for CVE-2023-34872, so we still need the backported patch.

---
 package/poppler/poppler.hash | 2 +-
 package/poppler/poppler.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/poppler/poppler.hash +1 -1
index 93681e04af..bb07b2ee6a 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  04e40fad924a6de62e63017a6fd4c04696c1f526dedc2ba5ef275cedf646292a  poppler-22.10.0.tar.xz
+sha256  d9aa9cacdfbd0f8e98fc2b3bb008e645597ed480685757c3e7bc74b4278d15c0  poppler-22.12.0.tar.xz
 sha256  ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6  COPYING
package/poppler/poppler.mk +1 -1
index 4c6017a5f5..776fb4d566 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-POPPLER_VERSION = 22.10.0
+POPPLER_VERSION = 22.12.0
 POPPLER_SOURCE = poppler-$(POPPLER_VERSION).tar.xz
 POPPLER_SITE = https://poppler.freedesktop.org
 POPPLER_DEPENDENCIES = fontconfig host-pkgconf
Signature · 6 lines
2.41.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 2/2] package/poppler: bump version to matest in 22.x series

Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni via buildroot <[email protected]> writes:

This commit updates poppler to the latest version in the 22.x series, with only has bug fixes. Here is the list of commits between 22.10.0 and 22.12.0:

Committed after fixing the typo in the subject, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

Re: [Buildroot] [PATCH 2/2] package/poppler: bump version to matest in 22.x series

In reply to Thomas Petazzoni via buildroot
Quoted 21 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni via buildroot <[email protected]> writes:

This commit updates poppler to the latest version in the 22.x series, with only has bug fixes. Here is the list of commits between 22.10.0 and 22.12.0:

df568263c51950ceed6f1fb42f80e99a2614c275 (tag: poppler-22.12.0) poppler 22.12.0 198dc1d0674c0a462668e6868c35b1ee0e731005 Form::addFontToDefaultResources: Be stubborn in finding a font we can use a5952ab70716a2d4f792a943c2dcf3068f1d6885 Revert "CI: Fix Debian brokenness" 8fcaa7c622d24761a9ecb3922f95d072077d6f34 CI: Fix Debian brokenness cc665f757af6b87dd245d36e079dd44d8d2d2182 (tag: poppler-22.11.0) poppler 22.11.0 a296982e1d5b4968b2bd044d80647ae6f9267526 Do not include a poppler/ file from a splash/ header bc4a0d9a2abfcd75d9b0ee4be3f7600905fe6001 Form: Provide Unicode marker when ensuring fonts 111f38a722eedddd94faa52dda8c5e0da561fb41 Cairo: Update font after restore 907d05a6a141284aee22fbd16ab0a2fb4e0f2724 Fix crash in file that wants to do huge transparency group e53f5aae3bce7d09788f2ad62be998895fb9807b PSOutputDev::setupResources: Fix stack overflow in malformed doc a4ca3a96a6b1f65b335a1ea362e6c202e46ae055 topIdx can't be negative e471f8e09bf2e38df0cf5df1acecbcca70685573 Init all the fields of JPXStreamPrivate 5190c0d4369bd9f501922585140be4ec736e24f2 No need to store smaskInData in priv 6263bb90b09326103b10e4c4edfbc5b84c884921 Page label ranges can't start in < 0

Quoted 4 lines

Note: this version bump does not include the fix for CVE-2023-34872, so we still need the backported patch.

Committed to 2023.02.x and 2023.05.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw
In reply to Thomas Petazzoni via buildroot
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni via buildroot <[email protected]> writes:

Committed to 2023.02.x and 2023.05.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot