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] f45: Backport fixes for CVE-2026-112899 and CVE-2026-112902
Date: Fri, 27 Nov 2026 00:29:23 GMT [thread overview]
Message-ID: <179573936349.1.14064631510312691606.rpms-python-pillow-34a45d25da97@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-pillow
Branch : f45
Commit : 34a45d25da97382f3cb8b5f2680faebeb7c6a132
Author : Sandro Mani <manisandro@gmail.com>
Date : 2026-11-27T01:29:12+01:00
Stats : +555/-1 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/python-pillow/c/34a45d25da97382f3cb8b5f2680faebeb7c6a132?branch=f45
Log:
Backport fixes for CVE-2026-112899 and CVE-2026-112902
---
diff --git a/CVE-2026-112899.patch b/CVE-2026-112899.patch
new file mode 100644
index 0000000..d7ea2b3
--- /dev/null
+++ b/CVE-2026-112899.patch
@@ -0,0 +1,39 @@
+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-11-27 01:28:47.245801917 +0100
++++ Pillow-12.3.0-new/src/PIL/EpsImagePlugin.py 2026-11-27 01:28:47.250137186 +0100
+@@ -88,6 +88,7 @@ def Ghostscript(
+ scale = int(scale) or 1
+ width = size[0] * scale
+ height = size[1] * scale
++ Image._decompression_bomb_check((width, height))
+ # resolution is dependent on bbox and size
+ res_x = 72.0 * width / (bbox[2] - bbox[0])
+ res_y = 72.0 * height / (bbox[3] - bbox[1])
+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-11-27 01:28:47.246142636 +0100
++++ Pillow-12.3.0-new/Tests/test_file_eps.py 2026-11-27 01:28:47.250416023 +0100
+@@ -109,6 +109,24 @@ def test_load() -> None:
+ assert px[0, 0] == (255, 255, 255)
+
+
++def test_load_scale_decompression_bomb(
++ monkeypatch: pytest.MonkeyPatch, tmp_path: Path
++) -> None:
++ def failing_check_call(command: list[str], **kwargs: object) -> None:
++ pytest.fail("EPS size not checked before invoking Ghostscript")
++
++ monkeypatch.setattr(EpsImagePlugin, "has_ghostscript", lambda: True)
++ monkeypatch.setattr(EpsImagePlugin, "gs_binary", "")
++ monkeypatch.setattr(subprocess, "check_call", failing_check_call)
++
++ with Image.open(FILE1) as im:
++ assert isinstance(im, EpsImagePlugin.EpsImageFile)
++ monkeypatch.setattr(Image, "MAX_IMAGE_PIXELS", im.width * im.height)
++
++ with pytest.raises(Image.DecompressionBombError):
++ im.load(scale=2)
++
++
+ def test_binary() -> None:
+ if HAS_GHOSTSCRIPT:
+ assert EpsImagePlugin.gs_binary is not None
diff --git a/CVE-2026-112902.patch b/CVE-2026-112902.patch
new file mode 100644
index 0000000..bb27ffb
--- /dev/null
+++ b/CVE-2026-112902.patch
@@ -0,0 +1,506 @@
+diff -rupN --no-dereference Pillow-12.3.0/src/encode.c Pillow-12.3.0-new/src/encode.c
+--- Pillow-12.3.0/src/encode.c 2026-07-01 11:09:01.000000000 +0200
++++ Pillow-12.3.0-new/src/encode.c 2026-11-27 01:28:47.371478208 +0100
+@@ -675,6 +675,127 @@ PyImaging_ZipEncoderNew(PyObject *self,
+
+ #include <string.h>
+
++/* C type that TIFFSetField reads from its arguments for a single value of
++ the given type: int, uint64_t, double or char * */
++static int
++tiff_scalar_arg_type(TIFFDataType type) {
++ switch (type) {
++ case TIFF_BYTE:
++ case TIFF_SBYTE:
++ case TIFF_UNDEFINED:
++ case TIFF_SHORT:
++ case TIFF_SSHORT:
++ case TIFF_LONG:
++ case TIFF_SLONG:
++ case TIFF_IFD:
++ return 1;
++ case TIFF_LONG8:
++ case TIFF_SLONG8:
++ case TIFF_IFD8:
++ return 2;
++ case TIFF_FLOAT:
++ case TIFF_DOUBLE:
++ case TIFF_RATIONAL:
++ case TIFF_SRATIONAL:
++ return 3;
++ case TIFF_ASCII:
++ return 4;
++ default:
++ return 0;
++ }
++}
++
++/* Size of the values that TIFFSetField copies from an array of the given
++ type. libtiff stores custom RATIONAL arrays as floats. */
++static int
++tiff_array_item_size(TIFFDataType type) {
++ switch (type) {
++ case TIFF_BYTE:
++ case TIFF_SBYTE:
++ case TIFF_UNDEFINED:
++ case TIFF_ASCII:
++ return 1;
++ case TIFF_SHORT:
++ case TIFF_SSHORT:
++ return 2;
++ case TIFF_LONG:
++ case TIFF_SLONG:
++ case TIFF_IFD:
++ case TIFF_FLOAT:
++ case TIFF_RATIONAL:
++ case TIFF_SRATIONAL:
++ return 4;
++ case TIFF_DOUBLE:
++ case TIFF_LONG8:
++ case TIFF_SLONG8:
++ case TIFF_IFD8:
++ return 8;
++ default:
++ return 0;
++ }
++}
++
++/* Check that a value which will be passed to TIFFSetField as a single value
++ of the given type, or as an array of len values, matches the definition
++ of the field that libtiff will use. */
++static int
++tiff_needs_field_definition(int is_core_tag, int key) {
++ return !is_core_tag || key == TIFFTAG_TRANSFERFUNCTION || key == TIFFTAG_COLORMAP ||
++ key == TIFFTAG_YCBCRSUBSAMPLING || key == TIFFTAG_REFERENCEBLACKWHITE;
++}
++
++static int
++tiff_special_field_matches(
++ int key, TIFFDataType type, int is_var_length, Py_ssize_t len, long bits_per_sample
++) {
++ if (key == TIFFTAG_COLORMAP) {
++ // libtiff reads three arrays of 1 << BitsPerSample values
++ return is_var_length && type == TIFF_SHORT && bits_per_sample >= 1 &&
++ bits_per_sample <= 16 && len == 3 * ((Py_ssize_t)1 << bits_per_sample);
++ }
++ if (key == TIFFTAG_YCBCRSUBSAMPLING) {
++ return is_var_length && type == TIFF_SHORT && len == 2;
++ }
++ return 0;
++}
++
++static int
++tiff_field_matches(
++ TIFFDataType field_type,
++ int passcount,
++ int writecount,
++ TIFFDataType type,
++ int is_var_length,
++ Py_ssize_t len
++) {
++ if (field_type == TIFF_ASCII && !passcount) {
++ // TIFFSetField reads a null-terminated string
++ return !is_var_length && type == TIFF_ASCII;
++ }
++ if (!is_var_length) {
++ // TIFFSetField reads a single value
++ return !passcount && writecount == 1 && tiff_scalar_arg_type(type) &&
++ tiff_scalar_arg_type(type) == tiff_scalar_arg_type(field_type);
++ }
++ // TIFFSetField reads a pointer to the values, preceded by the number of
++ // values if passcount is set. Otherwise, the number of values is fixed.
++ if (!tiff_array_item_size(type) ||
++ tiff_array_item_size(type) != tiff_array_item_size(field_type)) {
++ return 0;
++ }
++ return passcount || (writecount > 1 && len == writecount);
++}
++
++static int
++set_tiff_array_field(
++ ImagingCodecState state, int key, int passcount, Py_ssize_t len, void *av
++) {
++ if (passcount) {
++ return ImagingLibTiffSetField(state, (ttag_t)key, len, av);
++ }
++ return ImagingLibTiffSetField(state, (ttag_t)key, av);
++}
++
+ PyObject *
+ PyImaging_LibTiffEncoderNew(PyObject *self, PyObject *args) {
+ ImagingEncoderObject *encoder;
+@@ -689,7 +810,8 @@ PyImaging_LibTiffEncoderNew(PyObject *se
+ PyObject *key, *value;
+ Py_ssize_t pos = 0;
+ int key_int, status, is_core_tag, is_var_length, num_core_tags, i;
+- TIFFDataType type = TIFF_NOTYPE;
++ int is_known_tag, passcount, writecount;
++ TIFFDataType type = TIFF_NOTYPE, field_type;
+ // This list also exists in TiffTags.py
+ const int core_tags[] = {256, 257, 258, 259, 262, 263, 266, 269, 274, 277,
+ 278, 280, 281, 282, 283, 284, 286, 287, 296, 297,
+@@ -778,7 +900,11 @@ PyImaging_LibTiffEncoderNew(PyObject *se
+ status = 0;
+ is_core_tag = 0;
+ is_var_length = 0;
++ is_known_tag = 0;
++ passcount = 1;
++ writecount = 0;
+ type = TIFF_NOTYPE;
++ field_type = TIFF_NOTYPE;
+
+ for (i = 0; i < num_core_tags; i++) {
+ if (core_tags[i] == key_int) {
+@@ -787,6 +913,15 @@ PyImaging_LibTiffEncoderNew(PyObject *se
+ }
+ }
+
++ if (tiff_needs_field_definition(is_core_tag, key_int)) {
++ is_known_tag = ImagingLibTiffFindField(
++ &encoder->state, key_int, &field_type, &passcount, &writecount
++ );
++ if (is_known_tag && type == TIFF_NOTYPE) {
++ type = field_type;
++ }
++ }
++
+ if (!is_core_tag) {
+ PyObject *tag_type;
+ if (PyDict_GetItemRef(types, key, &tag_type) < 0) {
+@@ -822,6 +957,7 @@ PyImaging_LibTiffEncoderNew(PyObject *se
+ is_var_length = 1;
+
+ if (!len) {
++ Py_DECREF(item);
+ continue;
+ }
+
+@@ -836,15 +972,38 @@ PyImaging_LibTiffEncoderNew(PyObject *se
+ }
+ }
+
+- if (!is_core_tag) {
+- // Register field for non core tags.
+- if (type == TIFF_BYTE) {
+- is_var_length = 1;
+- }
+- if (ImagingLibTiffMergeFieldInfo(
+- &encoder->state, type, key_int, is_var_length
+- )) {
+- continue;
++ if (type == TIFF_BYTE || type == TIFF_UNDEFINED) {
++ is_var_length = 1;
++ }
++ if (!is_core_tag && ImagingLibTiffMergeFieldInfo(
++ &encoder->state, type, key_int, is_var_length
++ )) {
++ Py_DECREF(item);
++ continue;
++ }
++
++ if (is_known_tag) {
++ // Check that the value will be passed to TIFFSetField in the
++ // form that libtiff's definition of the tag expects.
++ Py_ssize_t len = 0;
++ if (PyTuple_Check(value)) {
++ len = PyTuple_Size(value);
++ } else if (PyBytes_Check(value)) {
++ len = PyBytes_Size(value);
++ }
++ if (!(tiff_special_field_matches(
++ key_int, type, is_var_length, len, bits_per_sample
++ ) ||
++ tiff_field_matches(
++ field_type, passcount, writecount, type, is_var_length, len
++ ))) {
++ Py_DECREF(encoder);
++ Py_DECREF(item);
++ PyErr_SetString(
++ PyExc_ValueError,
++ "Tag value does not match libtiff field definition"
++ );
++ return NULL;
+ }
+ }
+
+@@ -856,9 +1015,10 @@ PyImaging_LibTiffEncoderNew(PyObject *se
+ PyErr_SetString(PyExc_ValueError, "Incorrect tag value type");
+ return NULL;
+ }
+- status = ImagingLibTiffSetField(
++ status = set_tiff_array_field(
+ &encoder->state,
+- (ttag_t)key_int,
++ key_int,
++ passcount,
+ PyBytes_Size(value),
+ PyBytes_AsString(value)
+ );
+@@ -908,8 +1068,8 @@ PyImaging_LibTiffEncoderNew(PyObject *se
+ for (i = 0; i < len; i++) {
+ av[i] = (UINT16)PyLong_AsLong(PyTuple_GetItem(value, i));
+ }
+- status = ImagingLibTiffSetField(
+- &encoder->state, (ttag_t)key_int, len, av
++ status = set_tiff_array_field(
++ &encoder->state, key_int, passcount, len, av
+ );
+ free(av);
+ }
+@@ -921,8 +1081,8 @@ PyImaging_LibTiffEncoderNew(PyObject *se
+ for (i = 0; i < len; i++) {
+ av[i] = (UINT32)PyLong_AsLong(PyTuple_GetItem(value, i));
+ }
+- status = ImagingLibTiffSetField(
+- &encoder->state, (ttag_t)key_int, len, av
++ status = set_tiff_array_field(
++ &encoder->state, key_int, passcount, len, av
+ );
+ free(av);
+ }
+@@ -934,8 +1094,8 @@ PyImaging_LibTiffEncoderNew(PyObject *se
+ for (i = 0; i < len; i++) {
+ av[i] = (INT8)PyLong_AsLong(PyTuple_GetItem(value, i));
+ }
+- status = ImagingLibTiffSetField(
+- &encoder->state, (ttag_t)key_int, len, av
++ status = set_tiff_array_field(
++ &encoder->state, key_int, passcount, len, av
+ );
+ free(av);
+ }
+@@ -947,8 +1107,8 @@ PyImaging_LibTiffEncoderNew(PyObject *se
+ for (i = 0; i < len; i++) {
+ av[i] = (INT16)PyLong_AsLong(PyTuple_GetItem(value, i));
+ }
+- status = ImagingLibTiffSetField(
+- &encoder->state, (ttag_t)key_int, len, av
++ status = set_tiff_array_field(
++ &encoder->state, key_int, passcount, len, av
+ );
+ free(av);
+ }
+@@ -960,8 +1120,8 @@ PyImaging_LibTiffEncoderNew(PyObject *se
+ for (i = 0; i < len; i++) {
+ av[i] = (INT32)PyLong_AsLong(PyTuple_GetItem(value, i));
+ }
+- status = ImagingLibTiffSetField(
+- &encoder->state, (ttag_t)key_int, len, av
++ status = set_tiff_array_field(
++ &encoder->state, key_int, passcount, len, av
+ );
+ free(av);
+ }
+@@ -973,8 +1133,8 @@ PyImaging_LibTiffEncoderNew(PyObject *se
+ for (i = 0; i < len; i++) {
+ av[i] = (FLOAT32)PyFloat_AsDouble(PyTuple_GetItem(value, i));
+ }
+- status = ImagingLibTiffSetField(
+- &encoder->state, (ttag_t)key_int, len, av
++ status = set_tiff_array_field(
++ &encoder->state, key_int, passcount, len, av
+ );
+ free(av);
+ }
+@@ -986,12 +1146,12 @@ PyImaging_LibTiffEncoderNew(PyObject *se
+ for (i = 0; i < len; i++) {
+ av[i] = PyFloat_AsDouble(PyTuple_GetItem(value, i));
+ }
+- status = ImagingLibTiffSetField(
+- &encoder->state, (ttag_t)key_int, len, av
++ status = set_tiff_array_field(
++ &encoder->state, key_int, passcount, len, av
+ );
+ free(av);
+ }
+- } else if (type == TIFF_RATIONAL) {
++ } else if (type == TIFF_RATIONAL || type == TIFF_SRATIONAL) {
+ FLOAT32 *av;
+ /* malloc check ok, calloc checks for overflow */
+ av = calloc(len, sizeof(FLOAT32));
+@@ -999,8 +1159,9 @@ PyImaging_LibTiffEncoderNew(PyObject *se
+ for (i = 0; i < len; i++) {
+ av[i] = (FLOAT32)PyFloat_AsDouble(PyTuple_GetItem(value, i));
+ }
+- status =
+- ImagingLibTiffSetField(&encoder->state, (ttag_t)key_int, av);
++ status = set_tiff_array_field(
++ &encoder->state, key_int, passcount, len, av
++ );
+ free(av);
+ }
+ }
+diff -rupN --no-dereference Pillow-12.3.0/src/libImaging/TiffDecode.c Pillow-12.3.0-new/src/libImaging/TiffDecode.c
+--- Pillow-12.3.0/src/libImaging/TiffDecode.c 2026-11-27 01:28:47.003828941 +0100
++++ Pillow-12.3.0-new/src/libImaging/TiffDecode.c 2026-11-27 01:28:47.372062113 +0100
+@@ -937,6 +937,29 @@ ImagingLibTiffMergeFieldInfo(
+ }
+
+ int
++ImagingLibTiffFindField(
++ ImagingCodecState state,
++ int key,
++ TIFFDataType *field_type,
++ int *passcount,
++ int *writecount
++) {
++ // Look up libtiff's own definition of a tag. TIFFMergeFieldInfo does not
++ // replace the definition of a tag that libtiff already knows, so this is
++ // what TIFFSetField will use for such tags.
++ TIFFSTATE *clientstate = (TIFFSTATE *)state->context;
++ const TIFFField *fip = TIFFFindField(clientstate->tiff, (ttag_t)key, TIFF_ANY);
++
++ if (!fip) {
++ return 0;
++ }
++ *field_type = TIFFFieldDataType(fip);
++ *passcount = TIFFFieldPassCount(fip);
++ *writecount = TIFFFieldWriteCount(fip);
++ return 1;
++}
++
++int
+ ImagingLibTiffSetField(ImagingCodecState state, ttag_t tag, ...) {
+ // after tif_dir.c->TIFFSetField.
+ TIFFSTATE *clientstate = (TIFFSTATE *)state->context;
+diff -rupN --no-dereference Pillow-12.3.0/src/libImaging/TiffDecode.h Pillow-12.3.0-new/src/libImaging/TiffDecode.h
+--- Pillow-12.3.0/src/libImaging/TiffDecode.h 2026-07-01 11:09:01.000000000 +0200
++++ Pillow-12.3.0-new/src/libImaging/TiffDecode.h 2026-11-27 01:28:47.372278414 +0100
+@@ -46,6 +46,14 @@ ImagingLibTiffMergeFieldInfo(
+ ImagingCodecState state, TIFFDataType field_type, int key, int is_var_length
+ );
+ extern int
++ImagingLibTiffFindField(
++ ImagingCodecState state,
++ int key,
++ TIFFDataType *field_type,
++ int *passcount,
++ int *writecount
++);
++extern int
+ ImagingLibTiffSetField(ImagingCodecState state, ttag_t tag, ...);
+
+ /*
+diff -rupN --no-dereference Pillow-12.3.0/src/PIL/TiffImagePlugin.py Pillow-12.3.0-new/src/PIL/TiffImagePlugin.py
+--- Pillow-12.3.0/src/PIL/TiffImagePlugin.py 2026-07-01 11:09:01.000000000 +0200
++++ Pillow-12.3.0-new/src/PIL/TiffImagePlugin.py 2026-11-27 01:28:47.372531753 +0100
+@@ -1927,13 +1927,10 @@ def _save(im: Image.Image, fp: IO[bytes]
+ # STRIPOFFSETS and STRIPBYTECOUNTS are added by the library
+ # based on the data in the strip.
+ # OSUBFILETYPE is deprecated.
+- # The other tags expect arrays with a certain length (fixed or depending on
+- # BITSPERSAMPLE, etc), passing arrays with a different length will result in
+- # segfaults. Block these tags until we add extra validation.
++ # TRANSFERFUNCTION is not supported by the libtiff encoder.
+ # SUBIFD may also cause a segfault.
+ blocklist += [
+ OSUBFILETYPE,
+- REFERENCEBLACKWHITE,
+ STRIPBYTECOUNTS,
+ STRIPOFFSETS,
+ TRANSFERFUNCTION,
+diff -rupN --no-dereference Pillow-12.3.0/Tests/test_file_libtiff.py Pillow-12.3.0-new/Tests/test_file_libtiff.py
+--- Pillow-12.3.0/Tests/test_file_libtiff.py 2026-11-27 01:28:47.004474421 +0100
++++ Pillow-12.3.0-new/Tests/test_file_libtiff.py 2026-11-27 01:28:47.372905687 +0100
+@@ -392,6 +392,101 @@ class TestFileLibTiff(LibTiffTestCase):
+ with pytest.raises(ValueError, match="Incorrect tag value type"):
+ im.save(out, tiffinfo=ifd)
+
++ @pytest.mark.parametrize(
++ "tag, value",
++ (
++ # DNGPrivateData is a BYTE array with a count to libtiff
++ (50740, 4096),
++ # ActiveArea is a LONG array of four values to libtiff
++ (50829, 64),
++ (50829, (0, 0)),
++ ),
++ )
++ def test_libtiff_field_definition(
++ self, tag: int, value: Any, monkeypatch: pytest.MonkeyPatch, tmp_path: Path
++ ) -> None:
++ monkeypatch.setattr(TiffImagePlugin, "WRITE_LIBTIFF", True)
++
++ ifd = TiffImagePlugin.ImageFileDirectory_v2()
++ ifd[tag] = value
++ ifd.tagtype[tag] = TiffTags.LONG
++
++ out = tmp_path / "temp.tif"
++ im = Image.new("L", (1, 1))
++ with pytest.raises(ValueError, match="libtiff field definition"):
++ im.save(out, tiffinfo=ifd)
++
++ # Values that match the libtiff definition are written
++ ifd = TiffImagePlugin.ImageFileDirectory_v2()
++ ifd[50740] = b"private"
++ ifd.tagtype[50740] = TiffTags.BYTE
++ ifd[50829] = (0, 0, 1, 1)
++ ifd.tagtype[50829] = TiffTags.LONG
++ im.save(out, tiffinfo=ifd)
++
++ with Image.open(out) as reloaded:
++ assert isinstance(reloaded, TiffImagePlugin.TiffImageFile)
++ assert reloaded.tag_v2[50740] == b"private"
++ assert reloaded.tag_v2[50829] == (0, 0, 1, 1)
++
++ def test_transferfunction_not_saved(
++ self, monkeypatch: pytest.MonkeyPatch, tmp_path: Path
++ ) -> None:
++ # TransferFunction is not supported by the libtiff encoder, so it is
++ # dropped rather than raising an error
++ monkeypatch.setattr(TiffImagePlugin, "WRITE_LIBTIFF", True)
++
++ out = tmp_path / "temp.tif"
++ im = Image.new("L", (1, 1))
++ im.save(out, tiffinfo={TiffImagePlugin.TRANSFERFUNCTION: tuple(range(256))})
++
++ with Image.open(out) as reloaded:
++ assert isinstance(reloaded, TiffImagePlugin.TiffImageFile)
++ assert TiffImagePlugin.TRANSFERFUNCTION not in reloaded.tag_v2
++
++ @pytest.mark.parametrize(
++ "tag, mode, value, invalid_value",
++ (
++ (320, "L", tuple((i % 256) * 256 for i in range(768)), (0, 0, 0)),
++ (530, "YCbCr", (1, 1), (1,)),
++ (532, "YCbCr", (0, 255, 128, 255, 128, 255), (0, 255)),
++ ),
++ )
++ def test_libtiff_core_field_definition(
++ self,
++ tag: int,
++ mode: str,
++ value: tuple[int, ...],
++ invalid_value: tuple[int, ...],
++ monkeypatch: pytest.MonkeyPatch,
++ tmp_path: Path,
++ ) -> None:
++ monkeypatch.setattr(TiffImagePlugin, "WRITE_LIBTIFF", True)
++
++ out = tmp_path / "temp.tif"
++ im = Image.new(mode, (1, 1))
++
++ ifd = TiffImagePlugin.ImageFileDirectory_v2()
++ ifd[tag] = invalid_value
++ # The ColorMap length is checked in Python first
++ match = "Requiring 768 items" if tag == 320 else "libtiff field definition"
++ with pytest.raises(ValueError, match=match):
++ im.save(out, tiffinfo=ifd)
++
++ ifd = TiffImagePlugin.ImageFileDirectory_v2()
++ ifd[tag] = value
++
++ im.save(out, tiffinfo=ifd)
++
++ with Image.open(out) as reloaded:
++ assert isinstance(reloaded, TiffImagePlugin.TiffImageFile)
++ if tag == 532:
++ assert tuple(float(v) for v in reloaded.tag_v2[tag]) == pytest.approx(
++ value
++ )
++ else:
++ assert tuple(reloaded.tag_v2[tag]) == value
++
+ def test_inknames_tag(
+ self, monkeypatch: pytest.MonkeyPatch, tmp_path: Path
+ ) -> None:
diff --git a/python-pillow.spec b/python-pillow.spec
index e4ee5fc..84d72e7 100644
--- a/python-pillow.spec
+++ b/python-pillow.spec
@@ -18,7 +18,7 @@
Name: python-%{srcname}
Version: 12.3.0
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: Python image processing library
# License: see http://www.pythonware.com/products/pil/license.htm
@@ -40,6 +40,12 @@ Patch3: CVE-2026-112403.patch
# Backport fix for CVE-2026-112900
# https://github.com/python-pillow/Pillow/commit/a2c363141da31a265dd536c945677db4b64f3ec9
Patch4: CVE-2026-112900.patch
+# Backport fix for CVE-2026-112899
+# https://github.com/python-pillow/Pillow/commit/3e8cc105588d1dfe062fcada0b6058c1b5f14b65
+Patch5: CVE-2026-112899.patch
+# Backport fix for CVE-2026-112902
+# https://github.com/python-pillow/Pillow/commit/570df030c0d30c2bf5336b2ab59f3902d8ab0b6d
+Patch6: CVE-2026-112902.patch
BuildRequires: freetype-devel
@@ -320,6 +326,9 @@ popd
%changelog
+* Fri Nov 27 2026 Sandro Mani <manisandro@gmail.com> - 12.3.0-8
+- Backport fixes for CVE-2026-112899 and CVE-2026-112902
+
* Fri Oct 30 2026 Sandro Mani <manisandro@gmail.com> - 12.3.0-7
- Backport fix for CVE-2026-112900
reply other threads:[~2026-11-27 0:29 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=179573936349.1.14064631510312691606.rpms-python-pillow-34a45d25da97@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