public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pillow] f44: Backport fix for CVE-2026-112900
@ 2026-10-30  8:56 Sandro Mani
  0 siblings, 0 replies; only message in thread
From: Sandro Mani @ 2026-10-30  8:56 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-pillow
Branch : f44
Commit : 85d85bd9c4d909299a63adb43bec13e0bc02d85c
Author : Sandro Mani <manisandro@gmail.com>
Date   : 2026-10-30T09:55:25+01:00
Stats  : +48/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/python-pillow/c/85d85bd9c4d909299a63adb43bec13e0bc02d85c?branch=f44

Log:
Backport fix for CVE-2026-112900

---
diff --git a/CVE-2026-112900.patch b/CVE-2026-112900.patch
new file mode 100644
index 0000000..02bbd75
--- /dev/null
+++ b/CVE-2026-112900.patch
@@ -0,0 +1,41 @@
+diff -rupN --no-dereference Pillow-12.3.0/src/PIL/EpsImagePlugin.py Pillow-12.3.0-new/src/PIL/EpsImagePlugin.py
+--- Pillow-12.3.0/src/PIL/EpsImagePlugin.py	2026-07-01 11:09:01.000000000 +0200
++++ Pillow-12.3.0-new/src/PIL/EpsImagePlugin.py	2026-10-30 09:54:54.446084723 +0100
+@@ -97,7 +97,10 @@ def Ghostscript(
+ 
+     infile_temp = None
+     if hasattr(fp, "name") and os.path.exists(fp.name):
+-        infile = fp.name
++        # Make the path absolute so that a filename beginning with "-" or "@"
++        # can never be interpreted by Ghostscript's argument parser
++        # as an option or an @-file token
++        infile = os.path.abspath(fp.name)
+     else:
+         in_fd, infile_temp = tempfile.mkstemp()
+         os.close(in_fd)
+diff -rupN --no-dereference Pillow-12.3.0/Tests/test_file_eps.py Pillow-12.3.0-new/Tests/test_file_eps.py
+--- Pillow-12.3.0/Tests/test_file_eps.py	2026-07-01 11:09:01.000000000 +0200
++++ Pillow-12.3.0-new/Tests/test_file_eps.py	2026-10-30 09:54:54.445887338 +0100
+@@ -303,6 +303,22 @@ def test_image_mode_not_supported(tmp_pa
+ 
+ 
+ @pytest.mark.skipif(not HAS_GHOSTSCRIPT, reason="Ghostscript not available")
++def test_filename_not_parsed_as_ghostscript_argument(
++    tmp_path: Path, monkeypatch: pytest.MonkeyPatch
++) -> None:
++    # Check that a filename starting with "-" is not passed to Ghostscript unmodified
++    # If it was, the help functionality would be triggered instead
++    monkeypatch.chdir(tmp_path)
++    name = "-h"
++    with open(name, "wb") as f:
++        f.write(b"\n".join(simple_eps_file))
++
++    with Image.open(name) as im:
++        im.load()
++        assert im.size == (100, 100)
++
++
++@pytest.mark.skipif(not HAS_GHOSTSCRIPT, reason="Ghostscript not available")
+ @skip_unless_feature("zlib")
+ def test_render_scale1() -> None:
+     # We need png support for these render test

diff --git a/python-pillow.spec b/python-pillow.spec
index 80448a1..e4ee5fc 100644
--- a/python-pillow.spec
+++ b/python-pillow.spec
@@ -18,7 +18,7 @@
 
 Name:           python-%{srcname}
 Version:        12.3.0
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        Python image processing library
 
 # License: see http://www.pythonware.com/products/pil/license.htm
@@ -37,6 +37,9 @@ Patch2:         CVE-2026-112393.patch
 # Backport fix for CVE-2026-112403
 # https://github.com/python-pillow/Pillow/commit/242a059aedc1935097d9aa1dc3f099750467ba75
 Patch3:         CVE-2026-112403.patch
+# Backport fix for CVE-2026-112900
+# https://github.com/python-pillow/Pillow/commit/a2c363141da31a265dd536c945677db4b64f3ec9
+Patch4:         CVE-2026-112900.patch
 
 
 BuildRequires:  freetype-devel
@@ -317,6 +320,9 @@ popd
 
 
 %changelog
+* Fri Oct 30 2026 Sandro Mani <manisandro@gmail.com> - 12.3.0-7
+- Backport fix for CVE-2026-112900
+
 * Wed Oct 28 2026 Sandro Mani <manisandro@gmail.com> - 12.3.0-6
 - Backport fix for CVE-2026-112403
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-30  8:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-30  8:56 [rpms/python-pillow] f44: Backport fix for CVE-2026-112900 Sandro Mani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox