public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Marek Kasik <mkasik@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/poppler] rawhide: Backport fixes for several CVEs
Date: Tue, 10 Nov 2026 14:39:22 GMT [thread overview]
Message-ID: <179432156245.1.5949855376954923328.rpms-poppler-5f2b64ef64cf@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/poppler
Branch : rawhide
Commit : 5f2b64ef64cf4ba90ebbca2fc4adb9a953491943
Author : Marek Kasik <mkasik@redhat.com>
Date : 2026-11-10T15:25:52+01:00
Stats : +264/-0 in 5 file(s)
URL : https://src.fedoraproject.org/rpms/poppler/c/5f2b64ef64cf4ba90ebbca2fc4adb9a953491943?branch=rawhide
Log:
Backport fixes for several CVEs
Fixes CVE-2026-102621, CVE-2026-102620, CVE-2026-107705 and CVE-2026-93653.
Resolves: #2543972, #2544506, #2548446, #2537011
---
diff --git a/poppler-26.08.0-clipToPath-integer-overflow.patch b/poppler-26.08.0-clipToPath-integer-overflow.patch
new file mode 100644
index 0000000..4551380
--- /dev/null
+++ b/poppler-26.08.0-clipToPath-integer-overflow.patch
@@ -0,0 +1,31 @@
+From 323c91036d99926a8b90dc14329f7b40aece22f8 Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Sat, 8 Aug 2026 15:02:27 +0200
+Subject: Fix integer overflow in SplashClip::clipToPath
+
+Issue #1763
+
+diff --git a/splash/SplashClip.cc b/splash/SplashClip.cc
+index 78249652c..b096beebd 100644
+--- a/splash/SplashClip.cc
++++ b/splash/SplashClip.cc
+@@ -23,6 +23,8 @@
+ #include <config.h>
+
+ #include <algorithm>
++#include "goo/GooCheckedOps.h"
++#include "goo/GooLikely.h"
+ #include "SplashErrorCodes.h"
+ #include "SplashMath.h"
+ #include "SplashPath.h"
+@@ -211,7 +213,9 @@ SplashError SplashClip::clipToPath(const SplashPath &path, const std::array<doub
+ } else {
+ if (antialias) {
+ xPath.aaScale();
+- yMinAA = yMinI * splashAASize;
++ if (unlikely(checkedMultiply(yMinI, splashAASize, &yMinAA))) {
++ return SplashError::Generic;
++ }
+ yMaxAA = (yMaxI + 1) * splashAASize - 1;
+ } else {
+ yMinAA = yMinI;
diff --git a/poppler-26.08.0-cvtSfnts-integer-overflow.patch b/poppler-26.08.0-cvtSfnts-integer-overflow.patch
new file mode 100644
index 0000000..4ea1cd2
--- /dev/null
+++ b/poppler-26.08.0-cvtSfnts-integer-overflow.patch
@@ -0,0 +1,24 @@
+From 245d3c6823377755f2c1d5fdddd010279c6ed94d Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Sat, 8 Aug 2026 15:47:43 +0200
+Subject: Fix integer overflow in FoFiTrueType::cvtSfnts
+
+Issue #1762
+
+diff --git a/fofi/FoFiTrueType.cc b/fofi/FoFiTrueType.cc
+index e15cfc576..9e280fe89 100644
+--- a/fofi/FoFiTrueType.cc
++++ b/fofi/FoFiTrueType.cc
+@@ -1204,7 +1204,11 @@ void FoFiTrueType::cvtSfnts(FoFiOutputFunc outputFunc, void *outputStream, const
+ checksum = 0;
+ glyfPos = tables[seekTable("glyf")].offset;
+ for (j = 0; j < nGlyphs; ++j) {
+- length += locaTable[j].len;
++ if (unlikely(checkedAdd(length, locaTable[j].len, &length))) {
++ error(errSyntaxError, -1, "Integer overflow in glyph table length calculation");
++ ok = false;
++ break;
++ }
+ if (length & 3) {
+ length += 4 - (length & 3);
+ }
diff --git a/poppler-26.08.0-decrypt-password-length.patch b/poppler-26.08.0-decrypt-password-length.patch
new file mode 100644
index 0000000..223ef2e
--- /dev/null
+++ b/poppler-26.08.0-decrypt-password-length.patch
@@ -0,0 +1,175 @@
+From 60e19a30152560fcccfb2ae7f7559eda560c0160 Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Thu, 8 Oct 2026 01:24:51 +0200
+Subject: Decrypt: Properly apply password length limit
+
+Previously we did apply it in the functions that used len but not on
+revision6Hash that took the string
+
+diff --git a/poppler/Decrypt.cc b/poppler/Decrypt.cc
+index 98d3df6ff..0cb72db7c 100644
+--- a/poppler/Decrypt.cc
++++ b/poppler/Decrypt.cc
+@@ -57,16 +57,18 @@ static void sha256(unsigned char *msg, int msgLen, unsigned char *hash);
+ static void sha384(unsigned char *msg, int msgLen, unsigned char *hash);
+ static void sha512(unsigned char *msg, int msgLen, unsigned char *hash);
+
+-static void revision6Hash(const GooString *inputPassword, unsigned char *K, const char *userKey);
++static void revision6Hash(const std::string &inputPassword, unsigned char *K, const char *userKey);
+
+ static const unsigned char passwordPad[32] = { 0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, 0x64, 0x00, 0x4e, 0x56, 0xff, 0xfa, 0x01, 0x08, 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, 0x3e, 0x80, 0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a };
+
++constexpr int kMaxPasswordLength = 127;
++
+ //------------------------------------------------------------------------
+ // Decrypt
+ //------------------------------------------------------------------------
+
+-bool Decrypt::makeFileKey(int encRevision, int keyLength, const GooString *ownerKey, const GooString *userKey, const GooString *ownerEnc, const GooString *userEnc, int permissions, const GooString *fileID, const GooString *ownerPassword,
+- const GooString *userPassword, unsigned char *fileKey, bool encryptMetadata, bool *ownerPasswordOk)
++bool Decrypt::makeFileKey(int encRevision, int keyLength, const GooString *ownerKey, const GooString *userKey, const GooString *ownerEnc, const GooString *userEnc, int permissions, const GooString *fileID, const GooString *ownerPasswordA,
++ const GooString *userPasswordA, unsigned char *fileKey, bool encryptMetadata, bool *ownerPasswordOk)
+ {
+ DecryptAES256State state;
+ unsigned char test[127 + 56], test2[32];
+@@ -74,20 +76,18 @@ bool Decrypt::makeFileKey(int encRevision, int keyLength, const GooString *owner
+ unsigned char fState[256];
+ unsigned char tmpKey[16];
+ unsigned char fx, fy;
+- int len, i, j;
++ int i, j;
+
+ *ownerPasswordOk = false;
+
+ if (encRevision == 5 || encRevision == 6) {
+
+ // check the owner password
+- if (ownerPassword) {
++ if (ownerPasswordA) {
+ //~ this is supposed to convert the password to UTF-8 using "SASLprep"
+- len = ownerPassword->size();
+- if (len > 127) {
+- len = 127;
+- }
+- memcpy(test, ownerPassword->c_str(), len);
++ const std::string ownerPassword = ownerPasswordA->toStr().substr(0, kMaxPasswordLength);
++ const int len = ownerPassword.size();
++ memcpy(test, ownerPassword.c_str(), len);
+ memcpy(test + len, ownerKey->c_str() + 32, 8);
+ memcpy(test + len + 8, userKey->c_str(), 48);
+ sha256(test, len + 56, test);
+@@ -98,7 +98,7 @@ bool Decrypt::makeFileKey(int encRevision, int keyLength, const GooString *owner
+ if (!memcmp(test, ownerKey->c_str(), 32)) {
+
+ // compute the file key from the owner password
+- memcpy(test, ownerPassword->c_str(), len);
++ memcpy(test, ownerPassword.c_str(), len);
+ memcpy(test + len, ownerKey->c_str() + 40, 8);
+ memcpy(test + len + 8, userKey->c_str(), 48);
+ sha256(test, len + 56, test);
+@@ -121,13 +121,11 @@ bool Decrypt::makeFileKey(int encRevision, int keyLength, const GooString *owner
+ }
+
+ // check the user password
+- if (userPassword) {
++ if (userPasswordA) {
+ //~ this is supposed to convert the password to UTF-8 using "SASLprep"
+- len = userPassword->size();
+- if (len > 127) {
+- len = 127;
+- }
+- memcpy(test, userPassword->c_str(), len);
++ const std::string userPassword = userPasswordA->toStr().substr(0, kMaxPasswordLength);
++ const int len = userPassword.size();
++ memcpy(test, userPassword.c_str(), len);
+ memcpy(test + len, userKey->c_str() + 32, 8);
+ sha256(test, len + 8, test);
+ if (encRevision == 6) {
+@@ -138,7 +136,7 @@ bool Decrypt::makeFileKey(int encRevision, int keyLength, const GooString *owner
+ if (!memcmp(test, userKey->c_str(), 32)) {
+
+ // compute the file key from the user password
+- memcpy(test, userPassword->c_str(), len);
++ memcpy(test, userPassword.c_str(), len);
+ memcpy(test + len, userKey->c_str() + 40, 8);
+ sha256(test, len + 8, test);
+ if (encRevision == 6) {
+@@ -162,13 +160,13 @@ bool Decrypt::makeFileKey(int encRevision, int keyLength, const GooString *owner
+ return false;
+ }
+ // try using the supplied owner password to generate the user password
+- if (ownerPassword) {
+- len = ownerPassword->size();
++ if (ownerPasswordA) {
++ const int len = ownerPasswordA->size();
+ if (len < 32) {
+- memcpy(test, ownerPassword->c_str(), len);
++ memcpy(test, ownerPasswordA->c_str(), len);
+ memcpy(test + len, passwordPad, 32 - len);
+ } else {
+- memcpy(test, ownerPassword->c_str(), 32);
++ memcpy(test, ownerPasswordA->c_str(), 32);
+ }
+ md5(test, 32, test);
+ if (encRevision == 3) {
+@@ -205,7 +203,7 @@ bool Decrypt::makeFileKey(int encRevision, int keyLength, const GooString *owner
+ }
+
+ // try using the supplied user password
+- return makeFileKey2(encRevision, keyLength, ownerKey, userKey, permissions, fileID, userPassword, fileKey, encryptMetadata);
++ return makeFileKey2(encRevision, keyLength, ownerKey, userKey, permissions, fileID, userPasswordA, fileKey, encryptMetadata);
+ }
+
+ bool Decrypt::makeFileKey2(int encRevision, int keyLength, const GooString *ownerKey, const GooString *userKey, int permissions, const GooString *fileID, const GooString *userPassword, unsigned char *fileKey, bool encryptMetadata)
+@@ -215,13 +213,13 @@ bool Decrypt::makeFileKey2(int encRevision, int keyLength, const GooString *owne
+ unsigned char fState[256];
+ unsigned char tmpKey[16];
+ unsigned char fx, fy;
+- int len, i, j;
++ int i, j;
+ bool ok;
+
+ // generate file key
+ buf = static_cast<unsigned char *>(gmalloc(72 + fileID->size()));
+ if (userPassword) {
+- len = userPassword->size();
++ const int len = userPassword->size();
+ if (len < 32) {
+ memcpy(buf, userPassword->c_str(), len);
+ memcpy(buf + len, passwordPad, 32 - len);
+@@ -237,7 +235,7 @@ bool Decrypt::makeFileKey2(int encRevision, int keyLength, const GooString *owne
+ buf[66] = (permissions >> 16) & 0xff;
+ buf[67] = (permissions >> 24) & 0xff;
+ memcpy(buf + 68, fileID->c_str(), fileID->size());
+- len = 68 + fileID->size();
++ int len = 68 + fileID->size();
+ if (!encryptMetadata) {
+ buf[len++] = 0xff;
+ buf[len++] = 0xff;
+@@ -1764,7 +1762,7 @@ static void sha384(unsigned char *msg, int msgLen, unsigned char *hash)
+ // Section 7.6.3.3 (Encryption Key algorithm) of ISO/DIS 32000-2
+ // Algorithm 2.B:Computing a hash (for revision 6).
+ //------------------------------------------------------------------------
+-static void revision6Hash(const GooString *inputPassword, unsigned char *K, const char *userKey)
++static void revision6Hash(const std::string &inputPassword, unsigned char *K, const char *userKey)
+ {
+ unsigned char K1[64 * (127 + 64 + 48)];
+ unsigned char E[64 * (127 + 64 + 48)];
+@@ -1772,7 +1770,7 @@ static void revision6Hash(const GooString *inputPassword, unsigned char *K, cons
+ unsigned char aesKey[16];
+ unsigned char BE16byteNumber[16];
+
+- int inputPasswordLength = inputPassword->size();
++ const int inputPasswordLength = inputPassword.size();
+ int KLength = 32;
+ const int userKeyLength = userKey ? 48 : 0;
+ int sequenceLength;
+@@ -1783,7 +1781,7 @@ static void revision6Hash(const GooString *inputPassword, unsigned char *K, cons
+ sequenceLength = inputPasswordLength + KLength + userKeyLength;
+ totalLength = 64 * sequenceLength;
+ // a.make the string K1
+- memcpy(K1, inputPassword->c_str(), inputPasswordLength);
++ memcpy(K1, inputPassword.c_str(), inputPasswordLength);
+ memcpy(K1 + inputPasswordLength, K, KLength);
+ if (userKey) {
+ memcpy(K1 + inputPasswordLength + KLength, userKey, userKeyLength);
diff --git a/poppler-26.08.0-splash-infinite-loop.patch b/poppler-26.08.0-splash-infinite-loop.patch
new file mode 100644
index 0000000..52a48b5
--- /dev/null
+++ b/poppler-26.08.0-splash-infinite-loop.patch
@@ -0,0 +1,21 @@
+From 3924f2bff45690230c1a7b1e4927ac69af2c0c48 Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Wed, 4 Nov 2026 23:23:27 +0100
+Subject: Fix infinite loop in broken files
+
+
+diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
+index 667b69244..8ace8092b 100644
+--- a/poppler/SplashOutputDev.cc
++++ b/poppler/SplashOutputDev.cc
+@@ -4278,6 +4278,10 @@ bool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog * /*
+ surface_height = static_cast<int>(ceil(fabs(ky)));
+ repeatX = x1 - x0;
+ repeatY = y1 - y0;
++ if (repeatX < 0 || repeatY < 0) {
++ state->setCTM(savedCTM[0], savedCTM[1], savedCTM[2], savedCTM[3], savedCTM[4], savedCTM[5]);
++ return false;
++ }
+ while (static_cast<unsigned long>(repeatX) * repeatY > 0x800000L) {
+ // try to avoid bogus memory allocation size
+ if (repeatX > 1) {
diff --git a/poppler.spec b/poppler.spec
index 8561c7a..5c50dc4 100644
--- a/poppler.spec
+++ b/poppler.spec
@@ -31,6 +31,19 @@ Patch1: poppler-0.90.0-position-independent-code.patch
Patch2: poppler-21.01.0-glib-introspection.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=2543972 - CVE-2026-102621
+Patch3: poppler-26.08.0-clipToPath-integer-overflow.patch
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=2544506 - CVE-2026-102620
+Patch4: poppler-26.08.0-cvtSfnts-integer-overflow.patch
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=2548446 - CVE-2026-107705
+Patch5: poppler-26.08.0-decrypt-password-length.patch
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=2537011 - CVE-2026-93653
+Patch6: poppler-26.08.0-splash-infinite-loop.patch
+
+
BuildRequires: make
BuildRequires: cmake
BuildRequires: gcc-c++
reply other threads:[~2026-11-10 14:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179432156245.1.5949855376954923328.rpms-poppler-5f2b64ef64cf@fedoraproject.org \
--to=mkasik@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox