Bug 1382006 (CVE-2016-9190)

Summary: CVE-2016-9190 python-pillow: Missing check for negative image dimensions in ImagingNew (Storage.c)
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: cstratak, manisandro, miminar, torsava, tsmetana
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-pillow 3.3.2 Doc Type: If docs needed, set a value
Doc Text:
A vulnerability was found in python-pillow. A crafted image file with negative dimensions could cause a buffer to be under-allocated, leading to arbitrary writes on the heap which could cause a crash or, potentially, code execution.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-12 01:48:23 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: 1380811    
Bug Blocks: 1382009    

Description Adam Mariš 2016-10-05 13:51:43 UTC
It was found that in storage.c, the image size is not checked for negative values. This can lead to a null pointer dereference in 3.3.x, or a dereference of junk memory prior to that.

Upstream patch:

https://github.com/python-pillow/Pillow/commit/5d8a0be45aad78c5a22c8d099118ee26ef8144af

Comment 1 Adam Mariš 2016-10-05 13:51:52 UTC
Acknowledgments:

Name: the Pillow project

Comment 3 Doran Moppert 2016-12-12 02:06:03 UTC
Statement:

Red Hat Product Security has rated this issue as having Moderate security
impact. This issue is not currently planned to be addressed in future
updates. For additional information, refer to the Issue Severity
Classification: https://access.redhat.com/security/updates/classification/.