Bug 1594338 (CVE-2018-12599)

Summary: CVE-2018-12599 ImageMagick: out of bounds write in ReadBMPImage and WriteBMPImage in coders/bmp.c
Product: [Other] Security Response Reporter: Laura Pardo <lpardo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: jhorak, mike, pahan, rschiron
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-31 22:32:34 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: 1594420, 1594422, 1611559    
Bug Blocks: 1594340    

Description Laura Pardo 2018-06-22 16:38:49 UTC
A flaw was found in ImageMagick 7.0.8-3 Q16, ReadBMPImage and WriteBMPImage in coders/bmp.c allow attackers to cause an out of bounds write via a crafted file.


References:
https://github.com/ImageMagick/ImageMagick/issues/1177

Patch:
https://github.com/ImageMagick/ImageMagick6/commit/081f518eb9cb38e683b8b9ccb9e4ab5c52f82c2f
https://github.com/ImageMagick/ImageMagick/commit/ae04fa4be910255e5d363edebd77adeee99a525d

Comment 1 Laura Pardo 2018-06-22 21:34:41 UTC
Created ImageMagick tracking bugs for this issue:

Affects: fedora-all [bug 1594420]

Comment 3 Riccardo Schirone 2018-08-02 08:16:35 UTC
When writing a BMP file, ImageMagick incorrectly allocates the pixel_info array on the heap, using the wrong size. When converting a crafted image file to the BMP format, this flaw could be used to write beyond the limits, overwriting other data on the heap and causing a Denial of Service or other unspecified effects.

Comment 4 errata-xmlrpc 2020-03-31 19:31:43 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2020:1180 https://access.redhat.com/errata/RHSA-2020:1180

Comment 5 Product Security DevOps Team 2020-03-31 22:32:34 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-2018-12599