Bug 310101 (CVE-2007-4987) - CVE-2007-4987 ImageMagick writes terminating NUL one byte beyond char array end
Summary: CVE-2007-4987 ImageMagick writes terminating NUL one byte beyond char array end
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2007-4987
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL: http://nvd.nist.gov/nvd.cfm?cvename=C...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-27 22:57 UTC by Lubomir Kundrak
Modified: 2021-11-12 19:44 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-12-05 15:09:41 UTC
Embargoed:


Attachments (Terms of Use)
backported patch from Jonathan Smith (475 bytes, patch)
2007-10-29 11:28 UTC, Mark J. Cox
no flags Details | Diff

Description Lubomir Kundrak 2007-09-27 22:57:29 UTC
Common Vulnerabilities and Exposures assigned an identifier CVE-2007-4987 to the following vulnerability:

Off-by-one error in the ReadBlobString function in blob.c in ImageMagick before 6.3.5-9 allows context-dependent attackers to execute arbitrary code via a crafted image file, which triggers the writing of a '\0' character to an out-of-bounds address.

References:

http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=595
http://studio.imagemagick.org/pipermail/magick-announce/2007-September/000037.html
http://www.imagemagick.org/script/changelog.php
http://www.securityfocus.com/bid/25766
http://www.frsirt.com/english/advisories/2007/3245
http://www.securitytracker.com/id?1018729
http://secunia.com/advisories/26926
http://xforce.iss.net/xforce/xfdb/36739

Comment 1 Lubomir Kundrak 2007-09-27 23:04:24 UTC
        Doesn't Affect: RHEL2.1
        Doesn't Affect: RHEL3
        Affects: RHEL4
        Affects: RHEL5

Really:
RHEL-3:  for (i=0; i < (MaxTextExtent-1); i++)
RHEL-4:  for (i=0; i < (long) MaxTextExtent; i++)

Comment 2 Lubomir Kundrak 2007-09-27 23:05:13 UTC
Needless to say, "allows context-dependent attackers to execute arbitrary code"
this is not true. This issue is not exploitable.

Comment 3 Mark J. Cox 2007-10-29 11:28:59 UTC
Created attachment 241661 [details]
backported patch from Jonathan Smith

Comment 4 Lubomir Kundrak 2007-12-05 15:09:41 UTC
The CVE description for this bug is incorrect. As the address of the overwritten
byte is not under attacker's control, the worst impact his bug could have is an
application crash. It can not be exploited to execute arbitrary code.


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