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 avs #429

Closed
bestshow opened this issue Apr 17, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@bestshow
Copy link

commented Apr 17, 2017

on ImageMagick latest version

#identify $FILE

Direct leak of 4160 byte(s) in 1 object(s) allocated from:
#0 0x7fc8c67a2590 in __interceptor_posix_memalign ../../../../libsanitizer/asan/asan_malloc_linux.cc:128
#1 0x43ec4c in AcquireAlignedMemory MagickCore/memory.c:261
#2 0x43ed71 in AcquireVirtualMemory MagickCore/memory.c:578
#3 0x50e3c7 in ReadAVSImage coders/avs.c:167
#4 0x7f23d8 in ReadImage MagickCore/constitute.c:497
#5 0x9e4e89 in ReadStream MagickCore/stream.c:1045
#6 0x7f1486 in PingImage MagickCore/constitute.c:226
#7 0x7f1a39 in PingImages MagickCore/constitute.c:327
#8 0xbba496 in IdentifyImageCommand MagickWand/identify.c:319
#9 0xc10fea in MagickCommandGenesis MagickWand/mogrify.c:183
#10 0x40f839 in MagickMain utilities/magick.c:149
#11 0x40fa06 in main utilities/magick.c:180
#12 0x7fc8c1ab0b34 in __libc_start_main (/lib64/libc.so.6+0x21b34)

Indirect leak of 64 byte(s) in 1 object(s) allocated from:
#0 0x7fc8c67a2590 in __interceptor_posix_memalign ../../../../libsanitizer/asan/asan_malloc_linux.cc:128
#1 0x43ec4c in AcquireAlignedMemory MagickCore/memory.c:261
#2 0x43ef59 in AcquireVirtualMemory MagickCore/memory.c:608
#3 0x50e3c7 in ReadAVSImage coders/avs.c:167
#4 0x7f23d8 in ReadImage MagickCore/constitute.c:497
#5 0x9e4e89 in ReadStream MagickCore/stream.c:1045
#6 0x7f1486 in PingImage MagickCore/constitute.c:226
#7 0x7f1a39 in PingImages MagickCore/constitute.c:327
#8 0xbba496 in IdentifyImageCommand MagickWand/identify.c:319
#9 0xc10fea in MagickCommandGenesis MagickWand/mogrify.c:183
#10 0x40f839 in MagickMain utilities/magick.c:149
#11 0x40fa06 in main utilities/magick.c:180
#12 0x7fc8c1ab0b34 in __libc_start_main (/lib64/libc.so.6+0x21b34)

testcase:
https://github.com/bestshow/p0cs/blob/master/memory-leak-in-avs.avs

Author: ADLab of Venustech

dlemstra added a commit that referenced this issue Apr 17, 2017

dlemstra added a commit that referenced this issue Apr 17, 2017

@dlemstra

This comment has been minimized.

Copy link
Member

commented Apr 17, 2017

Can you give it another try with the code from our git repository (or wait for the next beta). Feel free to close the issue if you think this is resolved.

@bestshow

This comment has been minimized.

Copy link
Author

commented Apr 22, 2017

The issue is resolved.

@bestshow bestshow closed this Apr 22, 2017

@Whissi

This comment has been minimized.

Copy link

commented May 22, 2017

This is CVE-2017-7942.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.