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 WriteJNGImage #667

Closed
bestshow opened this issue Aug 10, 2017 · 4 comments
Closed

memory leak in WriteJNGImage #667

bestshow opened this issue Aug 10, 2017 · 4 comments
Labels

Comments

@bestshow
Copy link

Version: ImageMagick 7.0.6-6 Q16 x86_64

A memory leak vulnerability was found in function WriteJNGImage in coders/png.c,which allow attackers to cause a denial of service via a crafted file.

#./convert $FILE out.JNG
=================================================================
==57276==ERROR: detected memory leaks

Direct leak of 13024 byte(s) in 1 object(s) allocated from:
    #0 0x4ec5a6 in __interceptor_malloc /home/test/Downloads/llvm-clang/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:66
    #1 0x52cbb5 in AcquireImageInfo /home/test/Downloads/IM-afl/ImageMagick-master/MagickCore/image.c:347:28
    #2 0xc0ad96 in WriteJNGImage /home/test/Downloads/IM-afl/ImageMagick-master/coders/png.c:13228:10

13024 byte(s) leaked in 1 allocation(s).

testcase:https://github.com/bestshow/p0cs/blob/master/memory_leak_in_WriteJNGImage
Credit:ADLab of Venustech

@glennrp
Copy link
Contributor

glennrp commented Aug 10, 2017 via email

@glennrp
Copy link
Contributor

glennrp commented Aug 10, 2017 via email

@mikayla-grace
Copy link

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.

@fgeek
Copy link

fgeek commented Aug 22, 2017

Please use CVE-2017-13059 for this issue.

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