Skip to content

Commit 8ec0278

Browse files
committed
Add security release notes
1 parent ef5f294 commit 8ec0278

File tree

1 file changed

+52
-2
lines changed

1 file changed

+52
-2
lines changed

docs/releasenotes/8.2.0.rst

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ These changes only affect :py:meth:`~PIL.Image.Image.getexif`, introduced in Pil
4848
Image._MODEINFO
4949
^^^^^^^^^^^^^^^
5050

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
5252
removed. Instead, ``Image.getmodebase()``, ``Image.getmodetype()``,
5353
``Image.getmodebandnames()``, ``Image.getmodebands()`` or ``ImageMode.getmode()``
5454
can be used.
@@ -129,7 +129,56 @@ For example::
129129
Security
130130
========
131131

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.
133182

134183
Other Changes
135184
=============
@@ -178,3 +227,4 @@ ImageMagick_ installed. If both are installed, the tests prefer ImageMagick.
178227

179228
.. _GraphicsMagick: http://www.graphicsmagick.org/
180229
.. _ImageMagick: https://imagemagick.org/
230+
.. _OSS-Fuzz: https://github.com/google/oss-fuzz

0 commit comments

Comments
 (0)