public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pillow] f43: Backport fix for CVE-2026-112892
@ 2026-10-31 11:28 Sandro Mani
0 siblings, 0 replies; only message in thread
From: Sandro Mani @ 2026-10-31 11:28 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-pillow
Branch : f43
Commit : 598e33b6362ec25f8a1213a8ae4fe04247b3b747
Author : Sandro Mani <manisandro@gmail.com>
Date : 2026-10-31T09:44:40+01:00
Stats : +58/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-pillow/c/598e33b6362ec25f8a1213a8ae4fe04247b3b747?branch=f43
Log:
Backport fix for CVE-2026-112892
(cherry picked from commit d39ca781e43e7e9eaada815fff8d0d225c3e0944)
---
diff --git a/CVE-2026-112892.patch b/CVE-2026-112892.patch
new file mode 100644
index 0000000..bc41b57
--- /dev/null
+++ b/CVE-2026-112892.patch
@@ -0,0 +1,51 @@
+diff -rupN --no-dereference Pillow-12.3.0/src/PIL/MspImagePlugin.py Pillow-12.3.0-new/src/PIL/MspImagePlugin.py
+--- Pillow-12.3.0/src/PIL/MspImagePlugin.py 2026-07-01 11:09:01.000000000 +0200
++++ Pillow-12.3.0-new/src/PIL/MspImagePlugin.py 2026-10-26 22:38:23.183448785 +0100
+@@ -115,7 +115,7 @@ class MspDecoder(ImageFile.PyDecoder):
+ def decode(self, buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]:
+ assert self.fd is not None
+
+- img = io.BytesIO()
++ data = bytearray()
+ blank_line = bytearray((0xFF,) * ((self.state.xsize + 7) // 8))
+ try:
+ self.fd.seek(32)
+@@ -129,30 +129,33 @@ class MspDecoder(ImageFile.PyDecoder):
+ for x, rowlen in enumerate(rowmap):
+ try:
+ if rowlen == 0:
+- img.write(blank_line)
++ data += blank_line
+ continue
+ row = self.fd.read(rowlen)
+ if len(row) != rowlen:
+ msg = f"Truncated MSP file, expected {rowlen} bytes on row {x}"
+ raise OSError(msg)
+ idx = 0
++ row_data = bytearray()
+ while idx < rowlen:
+ runtype = row[idx]
+ idx += 1
+ if runtype == 0:
+ (runcount, runval) = struct.unpack_from("Bc", row, idx)
+- img.write(runval * runcount)
++ runcount = min(runcount, self.state.xsize - len(row_data))
++ row_data += runval * runcount
+ idx += 2
+ else:
+- runcount = runtype
+- img.write(row[idx : idx + runcount])
++ runcount = min(runtype, self.state.xsize - len(row_data))
++ row_data += row[idx : idx + runcount]
+ idx += runcount
++ data += row_data
+
+ except struct.error as e:
+ msg = f"Corrupted MSP file in row {x}"
+ raise OSError(msg) from e
+
+- self.set_as_raw(img.getvalue(), "1")
++ self.set_as_raw(bytes(data), "1")
+
+ return -1, 0
+
diff --git a/python-pillow.spec b/python-pillow.spec
index a7628b2..f52c02a 100644
--- a/python-pillow.spec
+++ b/python-pillow.spec
@@ -18,7 +18,7 @@
Name: python-%{srcname}
Version: 11.3.0
-Release: 10%{?dist}
+Release: 11%{?dist}
Summary: Python image processing library
# License: see http://www.pythonware.com/products/pil/license.htm
@@ -44,6 +44,9 @@ Patch6: https://github.com/python-pillow/Pillow/commit/853ece9ed20c5d80f
Patch7: https://github.com/python-pillow/Pillow/commit/cce3bdb867c77a3420261ed1bfdb6b0787ec8fc1.patch
# Backport fix for CVE-2026-54058
Patch8: https://github.com/python-pillow/Pillow/commit/6a8de891fb00968e5ea79bfa84368ed90b3cfc1d.patch
+# Backport fix for CVE-2026-112892
+# https://github.com/python-pillow/Pillow/commit/5dcb630b9798efd91929cb873d677aeee6ed0bb3
+Patch9: CVE-2026-112892.patch
BuildRequires: freetype-devel
BuildRequires: gcc
@@ -322,6 +325,9 @@ popd
%changelog
+* Mon Oct 26 2026 Sandro Mani <manisandro@gmail.com> - 11.3.0-11
+- Backport fix for CVE-2026-112892
+
* Sun Jul 19 2026 Sandro Mani <manisandro@gmail.com> - 11.3.0-10
- Backport fixes for CVE-2026-59197 and CVE-2026-54058
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-31 11:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-31 11:28 [rpms/python-pillow] f43: Backport fix for CVE-2026-112892 Sandro Mani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox