public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Sandro Mani <manisandro@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-pillow] f43: Backport patch for CVE-2026-112403
Date: Sat, 31 Oct 2026 11:28:05 GMT	[thread overview]
Message-ID: <179344608538.1.7579431684395194751.rpms-python-pillow-c43d51e21f31@fedoraproject.org> (raw)

            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
 

                 reply	other threads:[~2026-10-31 11:28 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=179344608538.1.7579431684395194751.rpms-python-pillow-c43d51e21f31@fedoraproject.org \
    --to=manisandro@gmail.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