public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pillow] f43: Backport patch for CVE-2026-112403
@ 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 : c43d51e21f31d1a803638f07ae2e29f424896154
Author : Sandro Mani <manisandro@gmail.com>
Date : 2026-10-31T09:44:40+01:00
Stats : +46/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-pillow/c/c43d51e21f31d1a803638f07ae2e29f424896154?branch=f43
Log:
Backport patch for CVE-2026-112403
(cherry picked from commit c83fa5dfc49460db212391c372a4b8b0586dcd60)
---
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/python-pillow.spec b/python-pillow.spec
index 3b0beda..255d3af 100644
--- a/python-pillow.spec
+++ b/python-pillow.spec
@@ -18,7 +18,7 @@
Name: python-%{srcname}
Version: 11.3.0
-Release: 12%{?dist}
+Release: 13%{?dist}
Summary: Python image processing library
# License: see http://www.pythonware.com/products/pil/license.htm
@@ -50,6 +50,9 @@ Patch9: CVE-2026-112892.patch
# Backport fix for CVE-2026-112393
# https://github.com/python-pillow/Pillow/commit/11582e5ffbdceb973d5ee593f3105af5a9852b40
Patch10: CVE-2026-112393.patch
+# Backport fix for CVE-2026-112403
+# https://github.com/python-pillow/Pillow/commit/242a059aedc1935097d9aa1dc3f099750467ba75
+Patch11: CVE-2026-112403.patch
BuildRequires: freetype-devel
BuildRequires: gcc
@@ -328,6 +331,9 @@ popd
%changelog
+* Wed Oct 28 2026 Sandro Mani <manisandro@gmail.com> - 11.3.0-13
+- Backport fix for CVE-2026-112403
+
* Tue Oct 27 2026 Sandro Mani <manisandro@gmail.com> - 11.3.0-12
- Backport fix for CVE-2026-112393
^ 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 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