mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-11 07:44:46 +03:00
BE-141-CVE-2020-10379
Taken from the fixes for https://github.com/python-pillow/Pillow/pull/4507/commits
This commit is contained in:
parent
134fb891ee
commit
52ec868fe1
|
@ -28,6 +28,9 @@ since Pillow 4.3.0.
|
||||||
- Fix for CVE-2021-23437
|
- Fix for CVE-2021-23437
|
||||||
[rickprice]
|
[rickprice]
|
||||||
|
|
||||||
|
- Fix for CVE-2020-10379
|
||||||
|
[rickprice]
|
||||||
|
|
||||||
6.2.2.3 (2023-02-23)
|
6.2.2.3 (2023-02-23)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|
29
Tests/check_tiff_crashes.py
Normal file
29
Tests/check_tiff_crashes.py
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
# Reproductions/tests for crashes/read errors in TiffDecode.c
|
||||||
|
|
||||||
|
# When run in python, all of these images should fail for
|
||||||
|
# one reason or another, either as a buffer overrun,
|
||||||
|
# unrecognized datastream, or truncated image file.
|
||||||
|
# There shouldn't be any segfaults.
|
||||||
|
#
|
||||||
|
# if run like
|
||||||
|
# `valgrind --tool=memcheck python check_tiff_crashes.py 2>&1 | grep TiffDecode.c`
|
||||||
|
# the output should be empty. There may be python issues
|
||||||
|
# in the valgrind especially if run in a debug python
|
||||||
|
# version.
|
||||||
|
|
||||||
|
|
||||||
|
from PIL import Image
|
||||||
|
|
||||||
|
repro_read_strip = (
|
||||||
|
"images/crash_1.tif",
|
||||||
|
"images/crash_2.tif",
|
||||||
|
)
|
||||||
|
|
||||||
|
for path in repro_read_strip:
|
||||||
|
with Image.open(path) as im:
|
||||||
|
try:
|
||||||
|
im.load()
|
||||||
|
except Exception as msg:
|
||||||
|
print(msg)
|
BIN
Tests/images/crash_1.tif
Normal file
BIN
Tests/images/crash_1.tif
Normal file
Binary file not shown.
BIN
Tests/images/crash_2.tif
Normal file
BIN
Tests/images/crash_2.tif
Normal file
Binary file not shown.
|
@ -20,3 +20,5 @@ since Pillow 4.3.0.
|
||||||
:cve: `CVE-2021-25290` : Fix negative size read in TiffDecode.c
|
:cve: `CVE-2021-25290` : Fix negative size read in TiffDecode.c
|
||||||
|
|
||||||
:cve: `CVE-2021-23437` : Raise ValueError if color specifier is too long
|
:cve: `CVE-2021-23437` : Raise ValueError if color specifier is too long
|
||||||
|
|
||||||
|
:cve: `CVE-2020-10379` : In Pillow before 7.1.0, there are two Buffer Overflows in libImaging/TiffDecode.c.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user