Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of uninitialized value in function ReadCUTImage #1599

Closed
YangY-Xiao opened this issue Jun 18, 2019 · 2 comments
Closed

Use of uninitialized value in function ReadCUTImage #1599

YangY-Xiao opened this issue Jun 18, 2019 · 2 comments
Labels
Milestone

Comments

@YangY-Xiao
Copy link

Prerequisites

  • [ y ] I have written a descriptive issue title
  • [ y ] I have verified that I am using the latest version of ImageMagick
  • [ y ] I have searched open and closed issues to ensure it has not already been reported

Description

  /* ----- Load RLE compressed raster ----- */
  BImgBuff=(unsigned char *) AcquireQuantumMemory((size_t) ldblk,
    sizeof(*BImgBuff));  /*Ldblk was set in the check phase*/
  if(BImgBuff==NULL) goto NoMemory;

  offset=SeekBlob(image,6 /*sizeof(Header)*/,SEEK_SET);

(https://github.com/ImageMagick/ImageMagick/blob/master/coders/cut.c#L552)

We should initialize the BImgBuff, otherwise an use-of-uninitialized vulnerability occurs, which is similar to https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6780 (fixed in a85ab26 and 81bfff2 ) and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5710 (fixed in ce433f8 and 81bfff2).

@urban-warrior
Copy link
Member

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.

urban-warrior pushed a commit to ImageMagick/ImageMagick6 that referenced this issue Jun 18, 2019
@dlemstra dlemstra added the bug label Jun 18, 2019
@dlemstra dlemstra added this to the 7.0.8-50 milestone Jun 18, 2019
@nohmask
Copy link

nohmask commented Jul 3, 2019

This was assigned CVE-2019-13135.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants