Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backfill release notes with security fix details #7877

Merged
merged 33 commits into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
04f60eb
Clean up for #7864
aclark4life Mar 13, 2024
231e738
Clean up for #7864
aclark4life Mar 13, 2024
95b3138
Clean up for #7864
aclark4life Mar 13, 2024
2b8dfaa
Retro-add release notes for 2.3.1 for #7864
aclark4life Mar 13, 2024
20d451b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 13, 2024
a200d71
Update docs/releasenotes/2.3.1.rst
aclark4life Mar 13, 2024
914db6c
Update docs/releasenotes/2.3.1.rst
aclark4life Mar 13, 2024
a78fbfe
Update docs/releasenotes/6.2.2.rst
aclark4life Mar 13, 2024
deca2dd
Update docs/releasenotes/6.2.0.rst
aclark4life Mar 13, 2024
1f11733
Update docs/releasenotes/10.2.0.rst
aclark4life Mar 13, 2024
f77273d
Update docs/releasenotes/10.0.0.rst
aclark4life Mar 13, 2024
92f0889
Fix template based on 29a361d60ead196695523212dbb08a3ec4ca4b0d
aclark4life Mar 13, 2024
f61e184
Fix based on 29a361d60ead196695523212dbb08a3ec4ca4b0d
aclark4life Mar 13, 2024
c69dcc1
Fix headers and retro-add notes for #7864
aclark4life Mar 14, 2024
3aefe92
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 14, 2024
7b1c39c
Update docs/releasenotes/9.0.0.rst
aclark4life Mar 14, 2024
4d81ec8
Update docs/releasenotes/8.2.0.rst
aclark4life Mar 14, 2024
bae0c98
Update docs/releasenotes/8.1.2.rst
aclark4life Mar 14, 2024
e97722b
Update docs/releasenotes/6.2.0.rst
aclark4life Mar 14, 2024
7b485c7
Update docs/releasenotes/6.2.0.rst
aclark4life Mar 14, 2024
69a4e0d
Update docs/releasenotes/6.2.0.rst
aclark4life Mar 14, 2024
15deb71
80 char wrap + file name tick for #7864
aclark4life Mar 14, 2024
ad134c6
Combine CVEs
aclark4life Mar 14, 2024
ae5f1de
Back fill release notes for #7864
aclark4life Mar 14, 2024
0ea144b
Update 3.1.1, 8.1.1 release notes for #7864
aclark4life Mar 14, 2024
f316fd9
Restore and update 3.1.1 release notes for #7864
aclark4life Mar 14, 2024
180f37b
Update release notes to match template for #7864
aclark4life Mar 15, 2024
b5f7779
Update release notes to match template for #7864
aclark4life Mar 15, 2024
45975e4
Update release notes to match template for #7864
aclark4life Mar 15, 2024
4438305
Update docs/releasenotes/7.1.0.rst
aclark4life Mar 15, 2024
5b3dabb
Add release notes for 2.6.0 for #7864
aclark4life Mar 15, 2024
115179e
Update release notes for #7864
aclark4life Mar 15, 2024
e7d8774
Wording
aclark4life Mar 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
52 changes: 27 additions & 25 deletions docs/releasenotes/10.0.0.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
10.0.0
------

Security
========

Limit size even if one dimension is zero
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

When performing decompression bomb checks, Pillow did not reject images with
excessive width and zero height, or zero width and excessive height. That has
now been fixed.

This effectively dates to the PIL fork, since problem images would still have
been processed before Pillow started checking for decompression bombs.

.. _Added ImageFont.MAX_STRING_LENGTH:

:cve:`2023-44271`: Added ImageFont.MAX_STRING_LENGTH
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To protect against potential DOS attacks when using arbitrary strings as text
input, Pillow will now raise a :py:exc:`ValueError` if the number of characters
passed into ImageFont methods is over a certain limit,
:py:data:`PIL.ImageFont.MAX_STRING_LENGTH`.

This threshold can be changed by setting
:py:data:`PIL.ImageFont.MAX_STRING_LENGTH`. It can be disabled by setting
``ImageFont.MAX_STRING_LENGTH = None``.

Backwards Incompatible Changes
==============================

Expand Down Expand Up @@ -157,31 +184,6 @@ Added ``alpha_only`` argument to ``getbbox()``
and the image has an alpha channel, trim transparent pixels. Otherwise, trim
pixels when all channels are zero.

Security
========

Limit size even if one dimension is zero
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

When performing decompression bomb checks, Pillow did not reject images with
excessive width and zero height, or zero width and excessive height. That has
now been fixed.

This effectively dates to the PIL fork, since problem images would still have
been processed before Pillow started checking for decompression bombs.

Added ImageFont.MAX_STRING_LENGTH
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

:cve:`2023-44271`: To protect against potential DOS attacks when using arbitrary strings as text
input, Pillow will now raise a :py:exc:`ValueError` if the number of characters
passed into ImageFont methods is over a certain limit,
:py:data:`PIL.ImageFont.MAX_STRING_LENGTH`.

This threshold can be changed by setting
:py:data:`PIL.ImageFont.MAX_STRING_LENGTH`. It can be disabled by setting
``ImageFont.MAX_STRING_LENGTH = None``.

Other Changes
=============

Expand Down
14 changes: 10 additions & 4 deletions docs/releasenotes/10.0.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@
Security
========

This release addresses :cve:`2023-4863`, by providing an updated install script and
updated wheels to include libwebp 1.3.2, preventing a potential heap buffer overflow
in WebP.
:cve:`2023-4863`: Updated install script and updated wheels
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This release provides an updated install script and updated wheels to
include libwebp 1.3.2, preventing a potential heap buffer overflow in
WebP.

Other Changes
=============

Updated tests to pass with latest zlib version
==============================================
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The release of zlib 1.3 caused one of the tests in the Pillow test suite to fail.
64 changes: 32 additions & 32 deletions docs/releasenotes/10.2.0.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,38 @@
10.2.0
------

Security
========

ImageFont.getmask: Applied ImageFont.MAX_STRING_LENGTH
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To protect against potential DOS attacks when using arbitrary strings as text input,
Pillow will now raise a :py:exc:`ValueError` if the number of characters passed into
:py:meth:`PIL.ImageFont.ImageFont.getmask` is over a certain limit,
:py:data:`PIL.ImageFont.MAX_STRING_LENGTH`.

This threshold can be changed by setting :py:data:`PIL.ImageFont.MAX_STRING_LENGTH`. It
can be disabled by setting ``ImageFont.MAX_STRING_LENGTH = None``.

A decompression bomb check has also been added to
:py:meth:`PIL.ImageFont.ImageFont.getmask`.

ImageFont.getmask: Trim glyph size
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To protect against potential DOS attacks when using PIL fonts,
:py:class:`PIL.ImageFont.ImageFont` now trims the size of individual glyphs so that
they do not extend beyond the bitmap image.

:cve:`2023-50447`: ImageMath.eval: Restricted environment keys
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If an attacker has control over the keys passed to the
``environment`` argument of :py:meth:`PIL.ImageMath.eval`, they may be able to execute
arbitrary code. To prevent this, keys matching the names of builtins and keys
containing double underscores will now raise a :py:exc:`ValueError`.

Deprecations
============

Expand Down Expand Up @@ -63,38 +95,6 @@ JPEG tables-only streamtype
When saving JPEG files, ``streamtype`` can now be set to 1, for tables-only. This will
output only the quantization and Huffman tables for the image.

Security
========

ImageFont.getmask: Applied ImageFont.MAX_STRING_LENGTH
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To protect against potential DOS attacks when using arbitrary strings as text input,
Pillow will now raise a :py:exc:`ValueError` if the number of characters passed into
:py:meth:`PIL.ImageFont.ImageFont.getmask` is over a certain limit,
:py:data:`PIL.ImageFont.MAX_STRING_LENGTH`.

This threshold can be changed by setting :py:data:`PIL.ImageFont.MAX_STRING_LENGTH`. It
can be disabled by setting ``ImageFont.MAX_STRING_LENGTH = None``.

A decompression bomb check has also been added to
:py:meth:`PIL.ImageFont.ImageFont.getmask`.

ImageFont.getmask: Trim glyph size
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To protect against potential DOS attacks when using PIL fonts,
:py:class:`PIL.ImageFont.ImageFont` now trims the size of individual glyphs so that
they do not extend beyond the bitmap image.

ImageMath.eval: Restricted environment keys
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

:cve:`2023-50447`: If an attacker has control over the keys passed to the
``environment`` argument of :py:meth:`PIL.ImageMath.eval`, they may be able to execute
arbitrary code. To prevent this, keys matching the names of builtins and keys
containing double underscores will now raise a :py:exc:`ValueError`.

Other Changes
=============

Expand Down
37 changes: 29 additions & 8 deletions docs/releasenotes/10.3.0.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
10.3.0
------

Security
========

TODO
^^^^

TODO

:cve:`YYYY-XXXXX`: TODO
^^^^^^^^^^^^^^^^^^^^^^^

TODO

Backwards Incompatible Changes
==============================

Expand Down Expand Up @@ -63,14 +76,6 @@ Added PerspectiveTransform
that all of the :py:data:`~PIL.Image.Transform` values now have a corresponding
subclass of :py:class:`~PIL.ImageTransform.Transform`.

Security
========

TODO
^^^^

TODO

Other Changes
=============

Expand All @@ -85,3 +90,19 @@ Release GIL when fetching WebP frames

Python's Global Interpreter Lock is now released when fetching WebP frames from
the libwebp decoder.

Added release notes for past releases
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Added release notes for past releases: ``2.6.0``, ``2.5.2``,
``2.3.2``, ``2.3.1``. With these additions we are able to
provide a comprehensive list of all Pillow CVE records from
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are only 23 CVEs listed here.

But there are 48 listed at #7864, do we not need those extra ones?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I'm not sure, but I do want to track all CVEs from 1995 (dawn of CVEs) to now.

1995 to 2024 across three noteworthy periods:

- 1995-2009: No known CVEs
- 2010-2018: :cve:`2014-1932`, :cve:`2014-3589`, :cve:`2016-0740`, :cve:`2016-3076`
- 2019-2024: :cve:`2019-16865`, :cve:`2019-19911`, :cve:`2020-10177`, :cve:`2020-15999`,
Comment on lines +102 to +104
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These date ranges seem arbitrary and unexplained.

Why start in 1995? CVEs began in 1999:

The CVE List was officially launched for the public in September 1999.

https://www.cve.org/About/History

Why start the second range in 2010? The first listed CVE is 2014.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1995-2009: PIL
2010-2018: Pillow
2019-2024: Pillow w/Tidelift support

:cve:`2020-35653`, :cve:`2021-25289`, :cve:`2020-35654`, :cve:`2020-35654`,
:cve:`2021-27921`, :cve:`2021-27922`, :cve:`2021-27923`, :cve:`2021-25287`,
:cve:`2021-25288`, :cve:`2021-34552`, :cve:`2021-23437`, :cve:`2022-22817`,
:cve:`2022-24303`, :cve:`2022-30595`, :cve:`2023-44271`, :cve:`2023-4863`
26 changes: 26 additions & 0 deletions docs/releasenotes/2.3.1.rst
hugovk marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
2.3.1
-----

Security
========

These issues reported in
`Debian bug #737059 <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=737059>`_.

:cve:`2014-1932`: Fix insecure use of :py:func:`tempfile.mktemp`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The (1) load_djpeg function in ``JpegImagePlugin.py``, (2) Ghostscript function
in EpsImagePlugin.py, (3) load function in ``IptcImagePlugin.py``, and (4)
``_copy`` function in Image.py in Python Image Library (PIL) 1.1.7 and earlier
and Pillow before 2.3.1 do not properly create temporary files, which allow
local users to overwrite arbitrary files and obtain sensitive information via a
symlink attack on the temporary file.

:cve:`2014-1933`: Fix insecure use of :py:func:`tempfile.mktemp`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The (1) ``JpegImagePlugin.py`` and (2) ``EpsImagePlugin.py`` scripts in Python
Image Library (PIL) 1.1.7 and earlier and Pillow before 2.3.1 uses the names of
temporary files on the command line, which makes it easier for local users to
conduct symlink attacks by listing the processes.
14 changes: 14 additions & 0 deletions docs/releasenotes/2.3.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
2.3.2
-----

Security
========

:cve:`2014-3589`: Fix DOS attack
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

``PIL/IcnsImagePlugin.py`` in Python Imaging Library (PIL) and Pillow before 2.3.2 and
2.5.x before 2.5.2 allows remote attackers to cause a denial of service via a crafted
block size.

Found and reported by Andrew Drake of dropbox.com
14 changes: 14 additions & 0 deletions docs/releasenotes/2.5.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
2.5.2
-----

Security
========

:cve:`2014-3589`: Fix DOS attack
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

``PIL/IcnsImagePlugin.py`` in Python Imaging Library (PIL) and Pillow before 2.3.2 and
2.5.x before 2.5.2 allows remote attackers to cause a denial of service via a crafted
block size.

Found and reported by Andrew Drake of dropbox.com
22 changes: 22 additions & 0 deletions docs/releasenotes/2.6.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
2.6.0
-----

Security
========

:cve:`2014-3589`: Fix DOS attack
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

``PIL/IcnsImagePlugin.py`` in Python Imaging Library (PIL) and Pillow before 2.3.2 and
2.5.x before 2.5.2 allows remote attackers to cause a denial of service via a crafted
block size.

Found and reported by Andrew Drake of dropbox.com
aclark4life marked this conversation as resolved.
Show resolved Hide resolved

Other Changes
=============

Relaxed precision of some tests
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Relaxed imagedraw tests to allow slight errors for x86 vs x64.
Comment on lines +16 to +22
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this was indeed something added to 2.6.0, but it seems insignificant on its own. We rarely mention changes to tests in release notes.

Plus there's also all the 2.6.0-rc1 changes not included, and we've not added the non-CVE fixes to the other new files, and the other non-CVE releases are skipped, so I think we could skip this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine to remove, yeah