segmentation fault with specific image file
Posted: 2017-01-05T00:31:06-07:00
[img][img][img][img]hello
I use IMK library for my image converting server.
I'm using Magick++ library, and version is ImageMagick-7.0.1-9
Recently I found a bug.
I use
Image::read() function. (http://www.imagemagick.org/Magick++/Image.html)
when I try to read a specific image file, the IMK library suddenly terminated with segmentation fault.
read from URL, read from BLOB, read from File cause same result.
I can't attach this problematic image file to this topic.
Instead, I add this image file url. You can download this file (no virus, spyware, malicious code included.)
http://bigfile.mail.naver.com/bigfileup ... 3SaxbXpg==
Here is the core file read with GDB.
#0 0x0000003935a7b395 in memcpy () from /lib64/libc.so.6
#1 0x0000003e5d80c40e in ?? () from /usr/lib64/libtiff.so.3
#2 0x0000003e5d80b018 in TIFFSetField () from /usr/lib64/libtiff.so.3
#3 0x0000003e5d80dfdc in ?? () from /usr/lib64/libtiff.so.3
#4 0x0000003e5d80f545 in TIFFReadDirectory () from /usr/lib64/libtiff.so.3
#5 0x0000003e5d827f79 in TIFFClientOpen () from /usr/lib64/libtiff.so.3
#6 0x00002b1a51052356 in ReadTIFFImage (image_info=0x1efa8ec0, exception=0x1f19a220) at coders/tiff.c:1155
#7 0x00002b1a50df2e0d in ReadImage (image_info=0x1efa5c90, exception=0x1f19a220) at MagickCore/constitute.c:554
#8 0x00002b1a50dc300c in BlobToImage (image_info=0x1f17f370, blob=0x1f1f3840, length=14590816, exception=0x1f19a220) at MagickCore/blob.c:370
#9 0x00002b1a4d47e775 in Magick::Image::read (this=0x2b1a64fe1bb0, blob_=<value optimized out>) at Magick++/lib/Image.cpp:3967
I also try to read this Image By using identify Command. But, It causes same result.
identify a.jpg
=> segmentation fault.
Please reply me how can I fix this problem.
If it throws exception and finish with error, It's OK.
But if it terminate with segmentation fault, It can be a serious problem for running image converting server.
Because the server process must not be down.
Thanks for your help in advance.
I use IMK library for my image converting server.
I'm using Magick++ library, and version is ImageMagick-7.0.1-9
Recently I found a bug.
I use
Image::read() function. (http://www.imagemagick.org/Magick++/Image.html)
when I try to read a specific image file, the IMK library suddenly terminated with segmentation fault.
read from URL, read from BLOB, read from File cause same result.
I can't attach this problematic image file to this topic.
Instead, I add this image file url. You can download this file (no virus, spyware, malicious code included.)
http://bigfile.mail.naver.com/bigfileup ... 3SaxbXpg==
Here is the core file read with GDB.
#0 0x0000003935a7b395 in memcpy () from /lib64/libc.so.6
#1 0x0000003e5d80c40e in ?? () from /usr/lib64/libtiff.so.3
#2 0x0000003e5d80b018 in TIFFSetField () from /usr/lib64/libtiff.so.3
#3 0x0000003e5d80dfdc in ?? () from /usr/lib64/libtiff.so.3
#4 0x0000003e5d80f545 in TIFFReadDirectory () from /usr/lib64/libtiff.so.3
#5 0x0000003e5d827f79 in TIFFClientOpen () from /usr/lib64/libtiff.so.3
#6 0x00002b1a51052356 in ReadTIFFImage (image_info=0x1efa8ec0, exception=0x1f19a220) at coders/tiff.c:1155
#7 0x00002b1a50df2e0d in ReadImage (image_info=0x1efa5c90, exception=0x1f19a220) at MagickCore/constitute.c:554
#8 0x00002b1a50dc300c in BlobToImage (image_info=0x1f17f370, blob=0x1f1f3840, length=14590816, exception=0x1f19a220) at MagickCore/blob.c:370
#9 0x00002b1a4d47e775 in Magick::Image::read (this=0x2b1a64fe1bb0, blob_=<value optimized out>) at Magick++/lib/Image.cpp:3967
I also try to read this Image By using identify Command. But, It causes same result.
identify a.jpg
=> segmentation fault.
Please reply me how can I fix this problem.
If it throws exception and finish with error, It's OK.
But if it terminate with segmentation fault, It can be a serious problem for running image converting server.
Because the server process must not be down.
Thanks for your help in advance.