Bug 789443 (CVE-2012-0247, CVE-2012-0248)

Summary: CVE-2012-0247 CVE-2012-0248 ImageMagick: invalid validation of images denial of service
Product: [Other] Security Response Reporter: Vincent Danen <vdanen>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: andreas, kem, nmurray, pahan, rdieter, scorneli
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-19 21:51:42 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: 796843, 796844, 796845, 797121, 804787, 804788    
Bug Blocks: 789444    
Attachments:
Description Flags
upstream patch
none
Better patch from upstream none

Description Vincent Danen 2012-02-10 18:58:54 UTC
Two input validation and denial of service flaws were reported [1],[2] in ImageMagick:

[CVE-2012-0247] When parsing a maliciously crafted image with incorrect offset and count in the ResolutionUnit tag in EXIF IFD0, ImageMagick copies two bytes into an invalid address.
[CVE-2012-0248] When parsing a maliciously crafted image with an IFD whose all IOP tags' value offsets point to the beginning of the IFD itself. As a result, ImageMagick parses the IFD structure indefinitely, causing a denial of service.

The patch (noted in the upstream report) fixes the flaw in magick/property.c, which exists in Fedora's versions of ImageMagick (6.6.5 and 6.7.0) and Red Hat Enterprise Linux 6 (6.5.4), however it does not exist in Red Hat Enterprise Linux 5 and earlier versions of ImageMagick (6.2.8).

[1] http://www.imagemagick.org/discourse-server/viewtopic.php?f=4&t=20286
[2] http://www.cert.fi/haavoittuvuudet/2012/haavoittuvuus-2012-021.html

Comment 1 Vincent Danen 2012-02-10 19:00:55 UTC
Created attachment 560951 [details]
upstream patch

Comment 3 Stefan Cornelius 2012-02-23 18:31:38 UTC
Created ImageMagick tracking bugs for this issue

Affects: fedora-all [bug 796843]

Comment 5 Stefan Cornelius 2012-02-24 10:38:30 UTC
Created GraphicsMagick tracking bugs for this issue

Affects: fedora-all [bug 797121]

Comment 8 Stefan Cornelius 2012-03-01 18:31:54 UTC
Created attachment 566909 [details]
Better patch from upstream

The previous patch was not complete. This is a newer patch from upstream, which should fix the issues completely.

Olivier: This will likely also obsolete your patch, but I didn't
investigate that any further.

Comment 14 errata-xmlrpc 2012-05-07 18:34:57 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2012:0545 https://rhn.redhat.com/errata/RHSA-2012-0545.html

Comment 15 errata-xmlrpc 2012-05-07 18:51:24 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2012:0544 https://rhn.redhat.com/errata/RHSA-2012-0544.html