@@ -48,7 +48,7 @@ These changes only affect :py:meth:`~PIL.Image.Image.getexif`, introduced in Pil
48
48
Image._MODEINFO
49
49
^^^^^^^^^^^^^^^
50
50
51
- This internal dictionary has been deprecated by a comment since PIL, and is now
51
+ This internal dictionary had been deprecated by a comment since PIL, and is now
52
52
removed. Instead, ``Image.getmodebase() ``, ``Image.getmodetype() ``,
53
53
``Image.getmodebandnames() ``, ``Image.getmodebands() `` or ``ImageMode.getmode() ``
54
54
can be used.
@@ -129,7 +129,56 @@ For example::
129
129
Security
130
130
========
131
131
132
- TODO
132
+ These were all found with `OSS-Fuzz `_.
133
+
134
+ :cve: `CVE-2021-25287 `, :cve: `CVE-2021-25288 `: Fix OOB read in Jpeg2KDecode
135
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136
+
137
+ * For J2k images with multiple bands, it's legal to have different widths for each band,
138
+ e.g. 1 byte for ``L ``, 4 bytes for ``A ``.
139
+ * This dates to Pillow 2.4.0.
140
+
141
+ :cve: `CVE-2021-28675 `: Fix DOS in PsdImagePlugin
142
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
143
+
144
+ * :py:class: `.PsdImagePlugin.PsdImageFile ` did not sanity check the number of input
145
+ layers with regard to the size of the data block, this could lead to a
146
+ denial-of-service on :py:meth: `~PIL.Image.open ` prior to
147
+ :py:meth: `~PIL.Image.Image.load `.
148
+ * This dates to the PIL fork.
149
+
150
+ :cve: `CVE-2021-28676 `: Fix FLI DOS
151
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
152
+
153
+ * ``FliDecode.c `` did not properly check that the block advance was non-zero,
154
+ potentially leading to an infinite loop on load.
155
+ * This dates to the PIL fork.
156
+
157
+ :cve: `CVE-2021-28677 `: Fix EPS DOS on _open
158
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
159
+
160
+ * The readline used in EPS has to deal with any combination of ``\r `` and ``\n `` as line
161
+ endings. It accidentally used a quadratic method of accumulating lines while looking
162
+ for a line ending.
163
+ * A malicious EPS file could use this to perform a denial-of-service of Pillow in the
164
+ open phase, before an image was accepted for opening.
165
+ * This dates to the PIL fork.
166
+
167
+ :cve: `CVE-2021-28678 `: Fix BLP DOS
168
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
169
+
170
+ * ``BlpImagePlugin `` did not properly check that reads after jumping to file offsets
171
+ returned data. This could lead to a denial-of-service where the decoder could be run a
172
+ large number of times on empty data.
173
+ * This dates to Pillow 5.1.0.
174
+
175
+ Fix memory DOS in ImageFont
176
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
177
+
178
+ * A corrupt or specially crafted TTF font could have font metrics that lead to
179
+ unreasonably large sizes when rendering text in font. ``ImageFont.py `` did not check
180
+ the image size before allocating memory for it.
181
+ * This dates to the PIL fork.
133
182
134
183
Other Changes
135
184
=============
@@ -178,3 +227,4 @@ ImageMagick_ installed. If both are installed, the tests prefer ImageMagick.
178
227
179
228
.. _GraphicsMagick : http://www.graphicsmagick.org/
180
229
.. _ImageMagick : https://imagemagick.org/
230
+ .. _OSS-Fuzz : https://github.com/google/oss-fuzz
0 commit comments