Bugzilla – Bug 1057153
VUL-1: CVE-2017-14137: ImageMagick: excessive memory allocation in ReadWEBPImage in coders/webp.c
Last modified: 2019-02-24 07:39:41 UTC
CVE-2017-14137 ReadWEBPImage in coders/webp.c in ImageMagick 7.0.6-5 has a issue where memory allocation is excessive because it depends only on a length field in a header. Upstream bug: https://github.com/ImageMagick/ImageMagick/issues/641 Upstream fix: https://github.com/ImageMagick/ImageMagick/commit/cb63560ba25e4a6c51ab282538c24877fff7d471 References: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-14137 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-14137 http://www.cvedetails.com/cve/CVE-2017-14137/
large memory OOM DoS
(In reply to Alexander Bergmann from comment #0) > Upstream bug: > https://github.com/ImageMagick/ImageMagick/issues/641 > > Upstream fix: > https://github.com/ImageMagick/ImageMagick/commit/ > cb63560ba25e4a6c51ab282538c24877fff7d471 From the bug discussion of the bug: "The fix breaks reading all WebP images. Line 266 in the new code sets webp_image to null and then we immediately try to dereference it on line 269."
https://github.com/ImageMagick/ImageMagick/commit/1c487cd945996a77ba611b83dc6a2ceedb89be3d#diff-58d51cd2483fb87f22e38cf72560f84e
No testcase.
I think + if (length > GetBlobSize(image)) + ThrowWEBPException(CorruptImageError,"InsufficientImageDataInFile"); is relevant part. Others fixes memory leaks.
Where memory leaks are subject of the bug 1057157.
11/GraphicsMagick and 11/ImageMagick does not have webp.c.
(In reply to Petr Gajdos from comment #5) > I think > > + if (length > GetBlobSize(image)) > + ThrowWEBPException(CorruptImageError,"InsufficientImageDataInFile"); 12/ImageMagick neither GraphicsMagick are affected by this. length=(size_t) GetBlobSize(image); instead of length=(size_t) (ReadWebPLSBWord(header+4)+8); Factory/ImageMagick is already fixed.