Control: tags 1018971 + patch
Control: tags 1018971 + pending

Dear maintainer,

I've prepared an NMU for poppler (versioned as 22.08.0-2.1) and
uploaded it to DELAYED/5. Please feel free to tell me if I
should delay it longer.

Regards,
Salvatore
diff -Nru poppler-22.08.0/debian/changelog poppler-22.08.0/debian/changelog
--- poppler-22.08.0/debian/changelog	2022-08-21 19:13:33.000000000 +0200
+++ poppler-22.08.0/debian/changelog	2022-09-03 21:30:51.000000000 +0200
@@ -1,3 +1,10 @@
+poppler (22.08.0-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * JBIG2Stream: Fix crash on broken file (CVE-2022-38784) (Closes: #1018971)
+
+ -- Salvatore Bonaccorso <car...@debian.org>  Sat, 03 Sep 2022 21:30:51 +0200
+
 poppler (22.08.0-2) unstable; urgency=medium
 
   * Team upload
diff -Nru poppler-22.08.0/debian/patches/JBIG2Stream-Fix-crash-on-broken-file.patch poppler-22.08.0/debian/patches/JBIG2Stream-Fix-crash-on-broken-file.patch
--- poppler-22.08.0/debian/patches/JBIG2Stream-Fix-crash-on-broken-file.patch	1970-01-01 01:00:00.000000000 +0100
+++ poppler-22.08.0/debian/patches/JBIG2Stream-Fix-crash-on-broken-file.patch	2022-09-03 21:29:13.000000000 +0200
@@ -0,0 +1,34 @@
+From: Albert Astals Cid <aa...@kde.org>
+Date: Thu, 25 Aug 2022 00:14:22 +0200
+Subject: JBIG2Stream: Fix crash on broken file
+Origin: https://gitlab.freedesktop.org/poppler/poppler/-/commit/27354e9d9696ee2bc063910a6c9a6b27c5184a52
+Bug-Debian: https://bugs.debian.org/1018971
+Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2022-38784
+
+https://github.com/jeffssh/CVE-2021-30860
+
+Thanks to David Warren for the heads up
+---
+ poppler/JBIG2Stream.cc | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
+index 662276e547eb..9f70431de49e 100644
+--- a/poppler/JBIG2Stream.cc
++++ b/poppler/JBIG2Stream.cc
+@@ -1976,7 +1976,11 @@ void JBIG2Stream::readTextRegionSeg(unsigned int segNum, bool imm, bool lossless
+     for (i = 0; i < nRefSegs; ++i) {
+         if ((seg = findSegment(refSegs[i]))) {
+             if (seg->getType() == jbig2SegSymbolDict) {
+-                numSyms += ((JBIG2SymbolDict *)seg)->getSize();
++                const unsigned int segSize = ((JBIG2SymbolDict *)seg)->getSize();
++                if (unlikely(checkedAdd(numSyms, segSize, &numSyms))) {
++                    error(errSyntaxError, getPos(), "Too many symbols in JBIG2 text region");
++                    return;
++                }
+             } else if (seg->getType() == jbig2SegCodeTable) {
+                 codeTables.push_back(seg);
+             }
+-- 
+2.37.2
+
diff -Nru poppler-22.08.0/debian/patches/series poppler-22.08.0/debian/patches/series
--- poppler-22.08.0/debian/patches/series	2022-08-21 19:13:33.000000000 +0200
+++ poppler-22.08.0/debian/patches/series	2022-09-03 21:29:22.000000000 +0200
@@ -1 +1,2 @@
 segfault-on-unset-catalog.patch
+JBIG2Stream-Fix-crash-on-broken-file.patch

Reply via email to