Bug 1958263 (CVE-2021-28678)

Summary: CVE-2021-28678 python-pillow: Excessive looping in BLP image reader
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bdettelb, cheimes, cstratak, kaycoth, manisandro, miminar, orion, paul, python-maint, tomckay, torsava
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-pillow-8.2.0 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in python-pillow. BlpImagePlugin did not properly check that reads after jumping to file offsets returned data. This could lead to a denial-of-service where the decoder could be run a large number of times on empty data.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 18:52:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1958264, 1958265, 1958266, 1958267, 1959683, 1962543, 1962545    
Bug Blocks: 1958269    

Description Guilherme de Almeida Suckevicz 2021-05-07 14:12:44 UTC
BlpImagePlugin did not properly check that reads after jumping to file offsets returned data. This could lead to a denial-of-service where the decoder could be run a large number of times on empty data. This dates to Pillow 5.1.0.

References:
https://pillow.readthedocs.io/en/stable/releasenotes/8.2.0.html#security
https://github.com/python-pillow/Pillow/pull/5377

Comment 1 Guilherme de Almeida Suckevicz 2021-05-07 14:13:26 UTC
Created mingw-python-pillow tracking bugs for this issue:

Affects: fedora-all [bug 1958267]


Created python-pillow tracking bugs for this issue:

Affects: fedora-all [bug 1958264]


Created python2-pillow tracking bugs for this issue:

Affects: fedora-all [bug 1958265]


Created python3-pillow tracking bugs for this issue:

Affects: epel-7 [bug 1958266]

Comment 4 Sam Fowler 2021-05-11 00:27:28 UTC
Mitigation:

To mitigate this feature on Red Hat Quay keep the invoice generation feature disabled, as it is by default.

Comment 9 errata-xmlrpc 2021-11-09 17:24:46 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:4149 https://access.redhat.com/errata/RHSA-2021:4149

Comment 10 Product Security DevOps Team 2021-11-09 18:52:38 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2021-28678