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

Memory leak in WriteTIFFImage #1053

Closed
3 tasks done
jgj212 opened this issue Mar 24, 2018 · 4 comments
Closed
3 tasks done

Memory leak in WriteTIFFImage #1053

jgj212 opened this issue Mar 24, 2018 · 4 comments
Labels

Comments

@jgj212
Copy link
Contributor

jgj212 commented Mar 24, 2018

Prerequisites

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

Description

Memory leak in WriteTIFFImage

Steps to Reproduce

    quantum_info=AcquireQuantumInfo(image_info,image);							//line 3506, allocation for quantum_info
    if (quantum_info == (QuantumInfo *) NULL)
      ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
    if ((image->storage_class != PseudoClass) && (image->depth >= 32) &&
        (quantum_info->format == UndefinedQuantumFormat) &&
        (IsHighDynamicRangeImage(image,exception) != MagickFalse))
      {
        status=SetQuantumFormat(image,quantum_info,FloatingPointQuantumFormat);
        if (status == MagickFalse)
          ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");  	//line 3515, memory leak as not free quantum_info
      }

System Configuration

  • ImageMagick version: 7.0.7-28
  • Environment (Operating system, version and so on): Ubuntu14.04 x86_64
  • Additional information:

Credit: ADLab of Venustech

@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 @ https://www.imagemagick.org/download/beta/ by sometime tomorrow.

@dlemstra dlemstra added the bug label Mar 24, 2018
@abergmann
Copy link

CVE-2018-10804 was assigned to this issue.

@bastien-roucaries
Copy link

Do you have the im6 commit ?

@dlemstra
Copy link
Member

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

5 participants