Page 1 of 1

CVE-2014-1958 buffer overflow flaw when handling PSD

Posted: 2014-03-03T02:12:30-07:00
by Hubbitus

Re: CVE-2014-1958 buffer overflow flaw when handling PSD

Posted: 2014-03-03T04:29:07-07:00
by magick
We have a patch for this bug @ http://trac.imagemagick.org/changeset/14801.

Re: CVE-2014-1958 buffer overflow flaw when handling PSD

Posted: 2014-03-03T06:46:01-07:00
by Hubbitus
Is it present already in any version of released ImageMagick version?

Re: CVE-2014-1958 buffer overflow flaw when handling PSD

Posted: 2014-03-03T08:56:17-07:00
by magick
Yes, the current release, 6.8.8-7. Whenever we get a CVE report, we patch, we test, we release, typically all within a week.

Re: CVE-2014-1958 buffer overflow flaw when handling PSD

Posted: 2014-03-04T00:54:33-07:00
by Hubbitus
Thank you very much

Re: CVE-2014-1958 buffer overflow flaw when handling PSD

Posted: 2014-03-04T01:06:10-07:00
by Hubbitus
Sorry, CVE-2014-1947 CVE-2014-2030 also fixed by this patch and version (also PSD decoder)?

Re: CVE-2014-1958 buffer overflow flaw when handling PSD

Posted: 2014-03-04T05:51:28-07:00
by magick
CVE-2014-1947 is fixed in the current ImageMagick release. Previously the layer_name buffer was fixed at 4 bytes and the format was "L%02ld". Any layer than 99 would overrun the buffer. Now layer_name is sized to MaxTextExtent (4096) and the format is "L%6ld" ensuring no buffer overflow.

However, we're not sure about CVE-2014-2030. They say "new ID of CVE-2014-2030 is now assigned for the vulnerability in newer ImageMagick versions that use the "L%06ld" string. The root cause here is that the code did not recognize the relationship between the 8 (or more) characters in "L%06ld" and the actual buffer size." Since the layer_name buffer is now 4096 characters, whereas the maximum label size is 21 characters (i.e. L-9223372036854775808 @ 64-bit). So we're not sure why 2030 is filed as a vulnerability.

Re: CVE-2014-1958 buffer overflow flaw when handling PSD

Posted: 2014-04-04T07:53:29-07:00
by Hubbitus
http://trac.imagemagick.org/changeset/14801 return error:
Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": /usr/lib/python2.4/site-packages/libsvn/_fs.so: wrong ELF class: ELFCLASS32). Look in the Trac log for more information.
Trac Error
Unsupported version control system "svn": /usr/lib/python2.4/site-packages/libsvn/_fs.so: wrong ELF class: ELFCLASS32
Where I could find patch for that change?

Re: CVE-2014-1958 buffer overflow flaw when handling PSD

Posted: 2014-04-04T12:06:57-07:00
by magick
Try now.

Re: CVE-2014-1958 buffer overflow flaw when handling PSD

Posted: 2014-04-07T06:11:43-07:00
by Hubbitus
Thank you.