|
Bugzilla – Full Text Bug Listing |
| Summary: | VUL-0: CVE-2005-0762: Imagemagick bugs | ||
|---|---|---|---|
| Product: | [Novell Products] SUSE Security Incidents | Reporter: | Vladimir Nadvornik <nadvornik> |
| Component: | Incidents | Assignee: | Vladimir Nadvornik <nadvornik> |
| Status: | RESOLVED FIXED | QA Contact: | Security Team bot <security-team> |
| Severity: | Normal | ||
| Priority: | P3 - Medium | CC: | heiko.rommel, security-team |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | CVE-2005-0762: CVSS v2 Base Score: 7.5 (AV:N/AC:L/Au:N/C:P/I:P/A:P) CVSSv2:NVD:CVE-2005-0005:7.5:(AV:N/AC:L/Au:N/C:P/I:P/A:P) | ||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
issue1.tiff
issue2.tiff issue3.psd issue4.sgi ImageMagick-5.5.7-tifftag.patch ImageMagick-5.5.7-tiff-overflow.patch ImageMagick-5.5.7-psd-pixel.patch ImageMagick-5.5.7-sgi.patch |
||
|
Description
Vladimir Nadvornik
2005-02-01 00:35:26 UTC
<!-- SBZ_reproduce --> see above Created attachment 28062 [details]
issue1.tiff
Created attachment 28063 [details]
issue2.tiff
Created attachment 28064 [details]
issue3.psd
Created attachment 28065 [details]
issue4.sgi
With up to date ImageMagick on sles9-ppc: meissner@grape:~> convert issue4.sgi foo.bmp Segmentation fault meissner@grape:~> convert issue1.tiff foo.bmp Segmentation fault meissner@grape:~> convert issue2.tiff foo.bmp Segmentation fault meissner@grape:~> convert issue3.psd foo.bmp Segmentation fault meissner@grape:~> convert issue4.sgi foo.bmp Segmentation fault meissner@grape:~> For issue #2, I looked at tiff.c. The line-numbers for tiff.c do not match the gdb output from him. While the linenumbers for the other filenames match (convert). So, there must be a patch missing or a different one being applied? Issue #1 can be fixed with this patch:
@@ -627,8 +627,8 @@
(void) SetImageAttribute(image,"copyright",text);
if (TIFFGetField(tiff,33423,&text) == 1)
(void) SetImageAttribute(image,"kodak-33423",text);
- if (TIFFGetField(tiff,36867,&text) == 1)
- (void) SetImageAttribute(image,"kodak-36867",text);
+// if (TIFFGetField(tiff,36867,&text) == 1)
+// (void) SetImageAttribute(image,"kodak-36867",text);
if (TIFFGetField(tiff,TIFFTAG_PAGENAME,&text) == 1)
(void) SetImageAttribute(image,"label",text);
if (TIFFGetField(tiff,TIFFTAG_IMAGEDESCRIPTION,&text) == 1)
The tag 36867 seems to be unknown to libtiff and it returns an invalid pointer.
In ImageMagick 6.1.8 this code is removed.
It isn't related to tiff patch. It crashed for me even with original 5.5.7-34.
Issue #3 seems to be fixed in ImageMagick 6.1.8, but I haven't found where.
Issue #4 is similar to bug 59081. The fix can be backported from 6.1.8
Created attachment 28260 [details]
ImageMagick-5.5.7-tifftag.patch
fix for issue #1
Created attachment 28261 [details]
ImageMagick-5.5.7-tiff-overflow.patch
fix for issue #2
Created attachment 28262 [details]
ImageMagick-5.5.7-psd-pixel.patch
fix for issue #3
Created attachment 28263 [details]
ImageMagick-5.5.7-sgi.patch
fix for issue #4
The fixes are backported from ImageMagick 6.1.8. The issue 3 consists of two bugs: - conversion from and to quantum, it probably worked only for quantumdepth=8, but ImageMagick was compiled with quantumdepth=16. The attached patch fixes it. - The function ReadBlobByte returns values in range 0-255 or (int)-1 on EOF. The return value -1 is not checked on many places. The patch adds some type conversion, so that it does not crash on issue3.psd. However it could crash elsewhere. Can you please verify the patches and inform the original reporter and ImageMagick authors? I have reported those to vendor-sec now. Sorry for taking so long. please apply to current set of ImageMagick updates. packages submitted for 8.1-9.1 ImageMagick 5.4.7 in 8.1 does not need patch for issue3, the bug was introduced later. also swampid 591 patchinfos submitted On SLES8 QA reports: $ convert issue3.psd /tmp/foo.bmp Segmentation fault $ So it affects SLES8 I think. sorry, I tested it with convert issue3.psd issue3.png and it worked. I will look into it. This seems to be an independent bug, only in 5.4.7. I still havent found exact reason and how to fix it. tracking this as new minor issue in bug#73844 will not wait for fix for this update. updates released. From redhat advisory: A bug was found in the way ImageMagick handles TIFF tags. It is possible that a TIFF image file with an invalid tag could cause ImageMagick to crash. The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CAN-2005-0759 to this issue. A bug was found in ImageMagick's TIFF decoder. It is possible that a specially crafted TIFF image file could cause ImageMagick to crash. The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CAN-2005-0760 to this issue. A bug was found in the way ImageMagick parses PSD files. It is possible that a specially crafted PSD file could cause ImageMagick to crash. The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CAN-2005-0761 to this issue. A heap overflow bug was found in ImageMagick's SGI parser. It is possible that an attacker could execute arbitrary code by tricking a user into opening a specially crafted SGI image file. The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CAN-2005-0762 to this issue. CVE-2005-0762: CVSS v2 Base Score: 7.5 (AV:N/AC:L/Au:N/C:P/I:P/A:P) |