Bug 804588 - (CVE-2012-1185) CVE-2012-1185: ImageMagick: Incorrect fix for CVE-2012-0247
CVE-2012-1185: ImageMagick: Incorrect fix for CVE-2012-0247
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
: Security
Depends On: 796844 796845
Blocks: 798337
  Show dependency treegraph
Reported: 2012-03-19 06:50 EDT by Stefan Cornelius
Modified: 2015-11-24 09:50 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-04-24 17:37:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Stefan Cornelius 2012-03-19 06:50:33 EDT
The original fix for CVE-2012-0247 was found to be insufficient.

The original fix for CVE-2012-0247 failed to check for the possibility of an integer overflow when computing the sum of "number_bytes" and "offset". This resulted in a wrap around into a value smaller than "length", making original CVE-2012-0247 introduced "length" check still to be possible to bypass, leading to memory corruption.

Relevant upstream patches:
[1] http://trac.imagemagick.org/changeset/6998/ImageMagick/branches/ImageMagick-6.7.5/magick/profile.c
[2] http://trac.imagemagick.org/changeset/6998/ImageMagick/branches/ImageMagick-6.7.5/magick/property.c
Comment 1 Stefan Cornelius 2012-03-19 09:22:21 EDT
A CVE identifier of CVE-2012-1185 has been assigned to this issue.
Comment 2 Pavel Alexeev 2012-03-19 15:59:40 EDT
Is upstream author informed?
Comment 3 Stefan Cornelius 2012-03-19 16:16:54 EDT
(In reply to comment #2)
> Is upstream author informed?

Yes, they've been informed about the issues and published fixes (e.g. see the patches linked in the description above - comment #0).
Comment 4 Pavel Alexeev 2012-03-20 12:25:59 EDT
I speak informed about fix is not sufficient.
Comment 5 Stefan Cornelius 2012-03-20 14:04:22 EDT

Yes, we've informed ImageMagick upstream about the incorrect fix, so ImageMagick upstream knows about the incorrect fix. Upstream ImageMagick has completely fixed this in the ImageMagick subversion repository (3 weeks ago).

If you want to know a detailed list of the upstream ImageMagick releases including the complete fix, you should contact ImageMagick upstream.
Comment 6 Pavel Alexeev 2012-03-21 13:28:29 EDT
Do you known ImageMagick version which is not affected? I think it have worth build at least for rawhide and may be Fedora 17 too.
Comment 7 Pavel Alexeev 2012-04-11 09:29:29 EDT
Rawhide build which should fix it http://koji.fedoraproject.org/koji/taskinfo?taskID=3977291.
Comment 8 Stefan Cornelius 2012-04-24 17:37:50 EDT

Not vulnerable. This issue did not affect the versions of ImageMagick as shipped with Red Hat Enterprise Linux 5 and 6 as they did not backport the insufficient patch for CVE-2012-0247.

Note You need to log in before you can comment on or make changes to this bug.