hitoshura25/cvefixes huggingface dataset:
CVE-2016-9556 (C, published 2017-03-23T18:59Z)
Description: value: The IsPixelGray function in MagickCore/pixel-accessor.h in ImageMagick 7.0.3-8 allows remote attackers to cause a denial of service (out-of-bounds heap read) via a crafted image file.
Severity: MEDIUM (CVSS v3 base score: 5.5)
Weakness: CWE-119 \u2014 Improper Restriction of Operations within the Bounds of a Memory Buffer
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/sgi.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/301


Vulnerable code:

Fixed code:
    if ((iris_info.dimension == 0) || (iris_info.dimension > 3)) 
      ThrowReaderException(CorruptImageError,"ImproperImageHeader");
CVE-2016-9559 (C, published 2017-03-01T15:59Z)
Description: value: coders/tiff.c in ImageMagick before 7.0.3.7 allows remote attackers to cause a denial of service (NULL pointer dereference and crash) via a crafted image.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-476 \u2014 NULL Pointer Dereference
The product dereferences a pointer that it expects to be valid but is NULL.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
MagickCore/property.c
coders/tiff.c
coders/txt.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/298


Vulnerable code:
%  SetImageProperty()
       */

  if (TIFFGetField(tiff,TIFFTAG_ARTIST,&text) == 1)
  if (TIFFGetField(tiff,TIFFTAG_COPYRIGHT,&text) == 1)
  if (TIFFGetField(tiff,TIFFTAG_DATETIME,&text) == 1)
  if (TIFFGetField(tiff,TIFFTAG_DOCUMENTNAME,&text) == 1)
  if (TIFFGetField(tiff,TIFFTAG_HOSTCOMPUTER,&text) == 1)
  if (TIFFGetField(tiff,TIFFTAG_IMAGEDESCRIPTION,&text) == 1)
  if (TIFFGetField(tiff,TIFFTAG_MAKE,&text) == 1)
  if (TIFFGetField(tiff,TIFFTAG_MODEL,&text) == 1)
  if (TIFFGetField(tiff,TIFFTAG_OPIIMAGEID,&count,&text) == 1)
  if (TIFFGetField(tiff,TIFFTAG_PAGENAME,&text) == 1)
  if (TIFFGetField(tiff,TIFFTAG_SOFTWARE,&text) == 1)
  if (TIFFGetField(tiff,33423,&count,&text) == 1)
  if (TIFFGetField(tiff,36867,&count,&text) == 1)
  if (TIFFGetField(tiff,37706,&length,&tietz) == 1)
          ConcatenateColorComponent(&pixel,GrayPixelChannel,compliance,
            tuple);

Fixed code:
%  SetImageProperty().
      */
  if ((TIFFGetField(tiff,TIFFTAG_ARTIST,&text) == 1) &&
      (text != (char *) NULL))
  if ((TIFFGetField(tiff,TIFFTAG_COPYRIGHT,&text) == 1) &&
      (text != (char *) NULL))
  if ((TIFFGetField(tiff,TIFFTAG_DATETIME,&text) == 1) &&
      (text != (char *) NULL))
  if ((TIFFGetField(tiff,TIFFTAG_DOCUMENTNAME,&text) == 1) &&
      (text != (char *) NULL))
  if ((TIFFGetField(tiff,TIFFTAG_HOSTCOMPUTER,&text) == 1) &&
      (text != (char *) NULL))
  if ((TIFFGetField(tiff,TIFFTAG_IMAGEDESCRIPTION,&text) == 1) &&
      (text != (char *) NULL))
  if ((TIFFGetField(tiff,TIFFTAG_MAKE,&text) == 1) &&
      (text != (char *) NULL))
  if ((TIFFGetField(tiff,TIFFTAG_MODEL,&text) == 1) &&
      (text != (char *) NULL))
  if ((TIFFGetField(tiff,TIFFTAG_OPIIMAGEID,&count,&text) == 1) &&
      (text != (char *) NULL))
  if ((TIFFGetField(tiff,TIFFTAG_PAGENAME,&text) == 1) &&
      (text != (char *) NULL))
  if ((TIFFGetField(tiff,TIFFTAG_SOFTWARE,&text) == 1) &&
      (text != (char *) NULL))
  if ((TIFFGetField(tiff,33423,&count,&text) == 1) &&
      (text != (char *) NULL))
  if ((TIFFGetField(tiff,36867,&count,&text) == 1) &&
      (text != (char *) NULL))
  if ((TIFFGetField(tiff,37706,&length,&tietz) == 1) &&
      (tietz != (unsigned long *) NULL))
          ConcatenateColorComponent(&pixel,GrayPixelChannel,compliance,tuple);
CVE-2017-11310 (Other, published 2017-07-13T18:29Z)
Description: value: The read_user_chunk_callback function in coders\png.c in ImageMagick 7.0.6-1 Q16 2017-06-21 (beta) has memory leak vulnerabilities via crafted PNG files.
Severity: MEDIUM (CVSS v3 base score: 8.8)
Weakness: CWE-772 \u2014 Missing Release of Resource after Effective Lifetime
The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
ChangeLog
coders/png.c
Commit message: coders/png.c: Stop a memory leak in read_user_chunk_callback() (reference

https://github.com/ImageMagick/ImageMagick/issues/517).


Vulnerable code:

Fixed code:
2017-06-10  7.0.6-0 Glenn Randers-Pehrson <glennrp@image...>
  * Stop a memory leak in read_user_chunk_callback() (reference
    https://github.com/ImageMagick/ImageMagick/issues/517).

              profile=DestroyStringInfo(profile);
      profile=DestroyStringInfo(profile);

      printf("  destroy_read_struct\n");
CVE-2017-11447 (C, published 2017-07-19T07:29Z)
Description: value: The ReadSCREENSHOTImage function in coders/screenshot.c in ImageMagick before 7.0.6-1 has memory leaks, causing denial of service.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-772 \u2014 Missing Release of Resource after Effective Lifetime
The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/screenshot.c
Commit message: Fixed potential memory leak.


Vulnerable code:
      status=SetImageExtent(screen,screen->columns,screen->rows,exception);
      if (status == MagickFalse)
        return(DestroyImageList(image));

Fixed code:
      status=SetImageExtent(screen,screen->columns,screen->rows,exception);
      if (status == MagickFalse)
        return(DestroyImageList(image));
CVE-2017-11448 (C, published 2017-07-19T07:29Z)
Description: value: The ReadJPEGImage function in coders/jpeg.c in ImageMagick before 7.0.6-1 allows remote attackers to obtain sensitive information from uninitialized memory locations via a crafted file.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-200 \u2014 Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/jpeg.c
Commit message: Zero pixel buffer


Vulnerable code:

Fixed code:
  (void) ResetMagickMemory(jpeg_pixels,0,image->columns*
    jpeg_info.output_components*sizeof(*jpeg_pixels));
CVE-2017-11522 (C, published 2017-07-22T21:29Z)
Description: value: The WriteOnePNGImage function in coders/png.c in ImageMagick through 6.9.9-0 and 7.x through 7.0.6-1 allows remote attackers to cause a denial of service (NULL pointer dereference) via a crafted file.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-476 \u2014 NULL Pointer Dereference
The product dereferences a pointer that it expects to be valid but is NULL.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/png.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/58


Vulnerable code:
     ThrowWriterException(ResourceLimitError, "MemoryAllocationFailed");

Fixed code:
  if (image == (Image *) NULL)
    return(MagickFalse);
    ThrowWriterException(ResourceLimitError, "MemoryAllocationFailed");
CVE-2017-11523 (C, published 2017-07-22T21:29Z)
Description: value: The ReadTXTImage function in coders/txt.c in ImageMagick through 6.9.9-0 and 7.x through 7.0.6-1 allows remote attackers to cause a denial of service (infinite loop) via a crafted file, because the end-of-file condition is not considered.
Severity: HIGH (CVSS v3 base score: 6.5)
Weakness: CWE-835 \u2014 Loop with Unreachable Exit Condition ('Infinite Loop')
The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/txt.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/591


Vulnerable code:

Fixed code:
    if (EOFBlob(image) != MagickFalse)
      {
        ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
          image->filename);
        break;
      }
CVE-2017-12427 (Other, published 2017-08-04T09:29Z)
Description: value: The ProcessMSLScript function in coders/msl.c in ImageMagick before 6.9.9-5 and 7.x before 7.0.6-5 allows remote attackers to cause a denial of service (memory leak) via a crafted file, related to the WriteMSLImage function.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-772 \u2014 Missing Release of Resource after Effective Lifetime
The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
ChangeLog
coders/msl.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/636


Vulnerable code:

Fixed code:
2017-07-01  7.0.6-5 Cristy  <quetzlzacatenango@image...>
  * Fixed numerous memory leaks (reference
    https://github.com/ImageMagick/ImageMagick/issues).

  /*
    Free resources.
  */
  *msl_info.image_info=DestroyImageInfo(*msl_info.image_info);
  msl_info.image_info=(ImageInfo **) RelinquishMagickMemory(
    msl_info.image_info);
  *msl_info.draw_info=DestroyDrawInfo(*msl_info.draw_info);
  msl_info.draw_info=(DrawInfo **) RelinquishMagickMemory(msl_info.draw_info);
  msl_info.image=(Image **) RelinquishMagickMemory(msl_info.image);
  *msl_info.attributes=DestroyImage(*msl_info.attributes);
  msl_info.attributes=(Image **) RelinquishMagickMemory(msl_info.attributes);
  msl_info.group_info=(MSLGroupInfo *) RelinquishMagickMemory(
    msl_info.group_info);
CVE-2017-12640 (C, published 2017-08-07T15:29Z)
Description: value: ImageMagick 7.0.6-1 has an out-of-bounds read vulnerability in ReadOneMNGImage in coders/png.c.
Severity: MEDIUM (CVSS v3 base score: 8.8)
Weakness: CWE-125 \u2014 Out-of-bounds Read
The product reads data past the end, or before the beginning, of the intended buffer.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/png.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/542


Vulnerable code:

Fixed code:
                if ((i < 0) || (i >= MNG_MAX_OBJECTS))
                  continue;
CVE-2017-12641 (C, published 2017-08-07T15:29Z)
Description: value: ImageMagick 7.0.6-1 has a memory leak vulnerability in ReadOneJNGImage in coders\png.c.
Severity: MEDIUM (CVSS v3 base score: 8.8)
Weakness: CWE-772 \u2014 Missing Release of Resource after Effective Lifetime
The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/png.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/550


Vulnerable code:
      ThrowReaderException(CorruptImageError,"CorruptImage");

Fixed code:
      {
        if (color_image != (Image *) NULL)
          color_image=DestroyImage(color_image);
        if (color_image_info != (Image *) NULL)
          color_image_info=DestroyImageInfo(color_image_info);
        ThrowReaderException(CorruptImageError,"CorruptImage");
      }
CVE-2017-12643 (C, published 2017-08-07T15:29Z)
Description: value: ImageMagick 7.0.6-1 has a memory exhaustion vulnerability in ReadOneJNGImage in coders\png.c.
Severity: HIGH (CVSS v3 base score: 6.5)
Weakness: CWE-770 \u2014 Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/png.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/549


Vulnerable code:
              ThrowReaderException(ResourceLimitError,
                "MemoryAllocationFailed");

Fixed code:
        if (length > GetBlobSize(image))
          ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile");
            if (length > GetBlobSize(image))
              ThrowReaderException(CorruptImageError,
                "InsufficientImageDataInFile");
              ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
CVE-2017-12644 (C, published 2017-08-07T15:29Z)
Description: value: ImageMagick 7.0.6-1 has a memory leak vulnerability in ReadDCMImage in coders\dcm.c.
Severity: MEDIUM (CVSS v3 base score: 8.8)
Weakness: CWE-772 \u2014 Missing Release of Resource after Effective Lifetime
The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/dcm.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/551


Vulnerable code:
                ThrowReaderException(CorruptImageError,

Fixed code:
                ThrowDCMException(CorruptImageError,
CVE-2017-12662 (C, published 2017-08-07T21:29Z)
Description: value: ImageMagick 7.0.6-2 has a memory leak vulnerability in WritePDFImage in coders/pdf.c.
Severity: MEDIUM (CVSS v3 base score: 8.8)
Weakness: CWE-772 \u2014 Missing Release of Resource after Effective Lifetime
The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/pdf.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/576


Vulnerable code:
              ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
                ThrowWriterException(ResourceLimitError,
                  "MemoryAllocationFailed");

Fixed code:
              {
                xref=(MagickOffsetType *) RelinquishMagickMemory(xref);
                ThrowWriterException(ResourceLimitError,
                  "MemoryAllocationFailed");
              }
                {
                  xref=(MagickOffsetType *) RelinquishMagickMemory(xref);
                  ThrowWriterException(ResourceLimitError,
                    "MemoryAllocationFailed");
                }
CVE-2017-12663 (C, published 2017-08-07T21:29Z)
Description: value: ImageMagick 7.0.6-2 has a memory leak vulnerability in WriteMAPImage in coders/map.c.
Severity: MEDIUM (CVSS v3 base score: 8.8)
Weakness: CWE-772 \u2014 Missing Release of Resource after Effective Lifetime
The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/map.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/573


Vulnerable code:
    ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
  q=colormap;
      *q++=(unsigned char) (ScaleQuantumToShort(image->colormap[i].green) & 0xff);;
      *q++=(unsigned char) (ScaleQuantumToShort(image->colormap[i].blue) & 0xff);

Fixed code:
    {
      if (colormap != (unsigned char *) NULL)
        colormap=(unsigned char *) RelinquishMagickMemory(colormap);
      if (pixels != (unsigned char *) NULL)
        pixels=(unsigned char *) RelinquishMagickMemory(pixels);
      ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
    }
      *q++=(unsigned char) (ScaleQuantumToShort(image->colormap[i].green) &
        0xff);
      *q++=(unsigned char) (ScaleQuantumToShort(image->colormap[i].blue) &
        0xff);
CVE-2017-12665 (C, published 2017-08-07T21:29Z)
Description: value: ImageMagick 7.0.6-2 has a memory leak vulnerability in WritePICTImage in coders/pict.c.
Severity: MEDIUM (CVSS v3 base score: 8.8)
Weakness: CWE-772 \u2014 Missing Release of Resource after Effective Lifetime
The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/pict.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/577


Vulnerable code:
    ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");

Fixed code:
    {
      if (scanline != (unsigned char *) NULL)
        scanline=(unsigned char *) RelinquishMagickMemory(scanline);
      if (packed_scanline != (unsigned char *) NULL)
        packed_scanline=(unsigned char *) RelinquishMagickMemory(
          packed_scanline);
      if (buffer != (unsigned char *) NULL)
        buffer=(unsigned char *) RelinquishMagickMemory(buffer);
      ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
    }
CVE-2017-12666 (C, published 2017-08-07T21:29Z)
Description: value: ImageMagick 7.0.6-2 has a memory leak vulnerability in WriteINLINEImage in coders/inline.c.
Severity: MEDIUM (CVSS v3 base score: 8.8)
Weakness: CWE-772 \u2014 Missing Release of Resource after Effective Lifetime
The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/inline.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/572


Vulnerable code:
    ThrowWriterException(CorruptImageError,"ImageTypeNotSupported");

Fixed code:
    {
      write_info=DestroyImageInfo(write_info);
      ThrowWriterException(CorruptImageError,"ImageTypeNotSupported");
    }
CVE-2017-12667 (C, published 2017-08-07T21:29Z)
Description: value: ImageMagick 7.0.6-1 has a memory leak vulnerability in ReadMATImage in coders\mat.c.
Severity: MEDIUM (CVSS v3 base score: 8.8)
Weakness: CWE-772 \u2014 Missing Release of Resource after Effective Lifetime
The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/mat.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/553


Vulnerable code:
MATLAB_KO: ThrowReaderException(CorruptImageError,"ImproperImageHeader");

Fixed code:
    {
MATLAB_KO:
      clone_info=DestroyImageInfo(clone_info);
      ThrowReaderException(CorruptImageError,"ImproperImageHeader");
    }
CVE-2017-12668 (C, published 2017-08-07T21:29Z)
Description: value: ImageMagick 7.0.6-2 has a memory leak vulnerability in WritePCXImage in coders/pcx.c.
Severity: MEDIUM (CVSS v3 base score: 8.8)
Weakness: CWE-772 \u2014 Missing Release of Resource after Effective Lifetime
The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/pcx.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/575


Vulnerable code:
      ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");

Fixed code:
      {
        pcx_colormap=(unsigned char *) RelinquishMagickMemory(pcx_colormap);
        ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
      }
CVE-2017-12669 (C, published 2017-08-07T21:29Z)
Description: value: ImageMagick 7.0.6-2 has a memory leak vulnerability in WriteCALSImage in coders/cals.c.
Severity: MEDIUM (CVSS v3 base score: 8.8)
Weakness: CWE-772 \u2014 Missing Release of Resource after Effective Lifetime
The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/cals.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/571


Vulnerable code:

Fixed code:
      write_info=DestroyImageInfo(write_info);
      write_info=DestroyImageInfo(write_info);
CVE-2017-12876 (C, published 2017-08-28T19:29Z)
Description: value: Heap-based buffer overflow in enhance.c in ImageMagick before 7.0.6-6 allows remote attackers to cause a denial of service via a crafted file.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-787 \u2014 Out-of-bounds Write
The product writes data past the end, or before the beginning, of the intended buffer.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
MagickCore/enhance.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/663
https://github.com/ImageMagick/ImageMagick/issues/655


Vulnerable code:

Fixed code:
#include "MagickCore/cache-private.h"
  if (SyncImagePixelCache(image,exception) == MagickFalse)
    return(MagickFalse);
  if (SyncImagePixelCache(image,exception) == MagickFalse)
    return(MagickFalse);
CVE-2017-12877 (C, published 2017-08-28T19:29Z)
Description: value: Use-after-free vulnerability in the DestroyImage function in image.c in ImageMagick before 7.0.6-6 allows remote attackers to cause a denial of service via a crafted file.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-416 \u2014 Use After Free
The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/mat.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/662


Vulnerable code:
  if (clone_info)
    clone_info=DestroyImageInfo(clone_info);

Fixed code:
          if (tmp == image2)
            image2=(Image *) NULL;
CVE-2017-13139 (C, published 2017-08-23T06:29Z)
Description: value: In ImageMagick before 6.9.9-0 and 7.x before 7.0.6-1, the ReadOneMNGImage function in coders/png.c has an out-of-bounds read with the MNG CLIP chunk.
Severity: HIGH (CVSS v3 base score: 9.8)
Weakness: CWE-125 \u2014 Out-of-bounds Read
The product reads data past the end, or before the beginning, of the intended buffer.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/png.c
Commit message: Skip MNG CLIP chunk with out-of-range object IDs


Vulnerable code:

Fixed code:
                  if ((i < 0) || (i >= MNG_MAX_OBJECTS))
                    continue;
CVE-2017-13143 (C, published 2017-08-23T06:29Z)
Description: value: In ImageMagick before 6.9.7-6 and 7.x before 7.0.4-6, the ReadMATImage function in coders/mat.c uses uninitialized data, which might allow remote attackers to obtain sensitive information from process memory.
Severity: MEDIUM (CVSS v3 base score: 7.5)
Weakness: CWE-200 \u2014 Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/mat.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/362


Vulnerable code:

Fixed code:
    (void) ResetMagickMemory(BImgBuff,0,ldblk*sizeof(double));
CVE-2017-13145 (C, published 2017-08-23T06:29Z)
Description: value: In ImageMagick before 6.9.8-8 and 7.x before 7.0.5-9, the ReadJP2Image function in coders/jp2.c does not properly validate the channel geometry, leading to a crash.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-20 \u2014 Improper Input Validation
The product receives input or data, but it does
        not validate or incorrectly validates that the input has the
        properties that are required to process the data safely and
        correctly.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/jp2.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/501


Vulnerable code:
        (jp2_image->comps[i].data == NULL))

Fixed code:
        ((image->ping == MagickFalse) && (jp2_image->comps[i].data == NULL)))