|
Bugzilla – Full Text Bug Listing |
| Summary: | VUL-0: CVE-2005-0005: ImageMagick heap overflow | ||
|---|---|---|---|
| Product: | [Novell Products] SUSE Security Incidents | Reporter: | Ludwig Nussel <lnussel> |
| Component: | Incidents | Assignee: | Security Team bot <security-team> |
| Status: | RESOLVED FIXED | QA Contact: | Security Team bot <security-team> |
| Severity: | Major | ||
| Priority: | P3 - Medium | CC: | nadvornik, security-team |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | CVSSv2:NVD:CVE-2005-0005:7.5:(AV:N/AC:L/Au:N/C:P/I:P/A:P) | ||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | mainstream patch | ||
|
Description
Ludwig Nussel
2005-01-14 17:47:13 UTC
* This comment was added by mail. Date: Fri, 14 Jan 2005 11:39:15 +0100 From: Martin Schulze <joey@infodrom.org> To: Free Software Distribution Vendors <vendor-sec@lst.de> Subject: [vendor-sec] Re: iDEFENSE Security Advisory [IDEF0745] Multiple Unix/Linux Vendor ImageMagick .psd Image File Decode Heap Overflow Vulnerability vendor-disclosure wrote: | [...] There are two more similar loops that don't check the boundary of the channel_info array. The following patch should fix this as this seems to be the only place where the PSD file is read. --- psd.c~ 2002-03-26 03:26:03.000000000 +0100 +++ psd.c 2005-01-14 11:36:06.000000000 +0100 ThrowReaderException(CorruptImageWarning,"Not a PSD image file",image); (void) ReadBlob(image,6,(char *) psd_info.reserved); psd_info.channels=ReadBlobMSBShort(image); + if (psd_info.channels > 24) psd_info.channels = 24; psd_info.rows=ReadBlobMSBLong(image); psd_info.columns=ReadBlobMSBLong(image); psd_info.depth=ReadBlobMSBShort(image); Mark, if this vulnerability will indeed be disclosed tomorrow, could you assign a cve id for it? Regards, Joey new CRD 17.01.2005 The patch is incomplete. There are two variables: psd_info.channels and
layer_info[i].channels.
It should look like this:
--- coders/psd.c
+++ coders/psd.c
@@ -664,6 +664,7 @@
}
(void) ReadBlob(image,6,psd_info.reserved);
psd_info.channels=ReadBlobMSBShort(image);
+ if (psd_info.channels > 24) psd_info.channels = 24;
psd_info.rows=ReadBlobMSBLong(image);
psd_info.columns=ReadBlobMSBLong(image);
psd_info.depth=ReadBlobMSBShort(image);
@@ -846,6 +847,7 @@
layer_info[i].page.height=(ReadBlobMSBLong(image)-layer_info[i].page.y);
layer_info[i].page.width=(ReadBlobMSBLong(image)-layer_info[i].page.x);
layer_info[i].channels=ReadBlobMSBShort(image);
+ if (layer_info[i].channels > 24) layer_info[i].channels = 24;
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),"
offset(%ld,%ld), size(%ld,%ld), channels=%d",
layer_info[i].page.x, layer_info[i].page.y,
is public now. Created attachment 27707 [details]
mainstream patch
Packages are submitted. Can you please submit patchinfos? CAN-2005-0005 updates released |