public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pillow] f45: Backport patch for CVE-2026-112403
@ 2026-10-28 21:08 Sandro Mani
0 siblings, 0 replies; only message in thread
From: Sandro Mani @ 2026-10-28 21:08 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-pillow
Branch : f45
Commit : c83fa5dfc49460db212391c372a4b8b0586dcd60
Author : Sandro Mani <manisandro@gmail.com>
Date : 2026-10-28T22:08:06+01:00
Stats : +48/-3 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/python-pillow/c/c83fa5dfc49460db212391c372a4b8b0586dcd60?branch=f45
Log:
Backport patch for CVE-2026-112403
---
diff --git a/CVE-2026-112403.patch b/CVE-2026-112403.patch
new file mode 100644
index 0000000..a180d90
--- /dev/null
+++ b/CVE-2026-112403.patch
@@ -0,0 +1,39 @@
+diff -rupN Pillow-12.3.0/src/libImaging/JpegDecode.c Pillow-12.3.0-new/src/libImaging/JpegDecode.c
+--- Pillow-12.3.0/src/libImaging/JpegDecode.c 2026-07-01 11:09:01.000000000 +0200
++++ Pillow-12.3.0-new/src/libImaging/JpegDecode.c 2026-10-28 21:41:12.175199309 +0100
+@@ -241,6 +241,17 @@ ImagingJpegDecode(Imaging im, ImagingCod
+ break;
+ }
+
++ /* The scanline buffer was sized from the tile extents and the
++ unpacker, not from the JPEG header, so make sure the lines
++ libjpeg is about to produce actually fit in it. */
++ if (context->cinfo.output_width > (JDIMENSION)state->xsize ||
++ (size_t)context->cinfo.output_components * context->cinfo.output_width >
++ (size_t)state->bytes) {
++ jpeg_destroy_decompress(&context->cinfo);
++ state->errcode = IMAGING_CODEC_BROKEN;
++ return -1;
++ }
++
+ state->state++;
+ /* fall through */
+
+diff -rupN Pillow-12.3.0/Tests/test_file_jpeg.py Pillow-12.3.0-new/Tests/test_file_jpeg.py
+--- Pillow-12.3.0/Tests/test_file_jpeg.py 2026-07-01 11:09:01.000000000 +0200
++++ Pillow-12.3.0-new/Tests/test_file_jpeg.py 2026-10-28 21:41:44.073362305 +0100
+@@ -560,6 +560,14 @@ class TestFileJpeg:
+ with pytest.raises(OSError):
+ im.load()
+
++ def test_wider_than_tile(self) -> None:
++ # The decoder's scanline buffer is sized from the tile extents,
++ # so a JPEG wider than its tile must be rejected
++ with Image.open(TEST_FILE) as im:
++ im.tile = [im.tile[0]._replace(extents=(0, 0, 64, 64))]
++ with pytest.raises(OSError, match="broken data stream"):
++ im.load()
++
+ @mark_if_feature_version(
+ pytest.mark.valgrind_known_error, "libjpeg_turbo", "2.0", reason="Known Failing"
+ )
diff --git a/pillow_mingw.patch b/pillow_mingw.patch
index 62c01b6..97d75d9 100644
--- a/pillow_mingw.patch
+++ b/pillow_mingw.patch
@@ -1,6 +1,6 @@
diff -rupN --no-dereference Pillow-12.3.0/setup.py Pillow-12.3.0-new/setup.py
--- Pillow-12.3.0/setup.py 2026-07-01 11:09:01.000000000 +0200
-+++ Pillow-12.3.0-new/setup.py 2026-10-26 22:38:23.040439748 +0100
++++ Pillow-12.3.0-new/setup.py 2026-10-28 21:41:11.735728007 +0100
@@ -17,7 +17,6 @@ import sys
import warnings
from collections.abc import Iterator
@@ -93,7 +93,7 @@ diff -rupN --no-dereference Pillow-12.3.0/setup.py Pillow-12.3.0-new/setup.py
diff -rupN --no-dereference Pillow-12.3.0/src/libImaging/ImPlatform.h Pillow-12.3.0-new/src/libImaging/ImPlatform.h
--- Pillow-12.3.0/src/libImaging/ImPlatform.h 2026-07-01 11:09:01.000000000 +0200
-+++ Pillow-12.3.0-new/src/libImaging/ImPlatform.h 2026-10-26 22:38:23.040797195 +0100
++++ Pillow-12.3.0-new/src/libImaging/ImPlatform.h 2026-10-28 21:41:11.736078655 +0100
@@ -29,7 +29,7 @@
#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
diff --git a/python-pillow.spec b/python-pillow.spec
index a1038ec..80448a1 100644
--- a/python-pillow.spec
+++ b/python-pillow.spec
@@ -18,7 +18,7 @@
Name: python-%{srcname}
Version: 12.3.0
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Python image processing library
# License: see http://www.pythonware.com/products/pil/license.htm
@@ -34,6 +34,9 @@ Patch1: CVE-2026-112892.patch
# Backport fix for CVE-2026-112393
# https://github.com/python-pillow/Pillow/commit/11582e5ffbdceb973d5ee593f3105af5a9852b40
Patch2: CVE-2026-112393.patch
+# Backport fix for CVE-2026-112403
+# https://github.com/python-pillow/Pillow/commit/242a059aedc1935097d9aa1dc3f099750467ba75
+Patch3: CVE-2026-112403.patch
BuildRequires: freetype-devel
@@ -314,6 +317,9 @@ popd
%changelog
+* Wed Oct 28 2026 Sandro Mani <manisandro@gmail.com> - 12.3.0-6
+- Backport fix for CVE-2026-112403
+
* Tue Oct 27 2026 Sandro Mani <manisandro@gmail.com> - 12.3.0-5
- Backport fix for CVE-2026-112393
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-28 21:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-28 21:08 [rpms/python-pillow] f45: Backport patch for CVE-2026-112403 Sandro Mani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox