==3551==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xb5510eb2 at pc 0x084d6980 bp 0xbfe4d068 sp 0xbfe4d05c
READ of size 1 at 0xb5510eb2 thread T0
#0 0x84d697f in ReadSUNImage /home/user/Desktop/ImageMagick/coders/sun.c:536:64
#1 0x8610dc8 in ReadImage /home/user/Desktop/ImageMagick/MagickCore/constitute.c:497:13
#2 0x861487e in ReadImages /home/user/Desktop/ImageMagick/MagickCore/constitute.c:857:9
#3 0x8c5b7ae in CLINoImageOperator /home/user/Desktop/ImageMagick/MagickWand/operation.c:4743:22
#4 0x8c5f20f in CLIOption /home/user/Desktop/ImageMagick/MagickWand/operation.c:5238:7
#5 0x8b18295 in ProcessCommandOptions /home/user/Desktop/ImageMagick/MagickWand/magick-cli.c:421:13
#6 0x8b19c9e in MagickImageCommand /home/user/Desktop/ImageMagick/MagickWand/magick-cli.c:791:5
#7 0x8b1b7b4 in MagickCommandGenesis /home/user/Desktop/ImageMagick/MagickWand/mogrify.c:183:14
#8 0x815dfda in MagickMain /home/user/Desktop/ImageMagick/utilities/magick.c:149:10
#9 0x815dfda in main /home/user/Desktop/ImageMagick/utilities/magick.c:180
#10 0xb750b275 in __libc_start_main /build/glibc-7cnzrD/glibc-2.24/csu/../csu/libc-start.c:291
#11 0x8076db7 in _start (/home/user/Desktop/ImageMagick/utilities/magick+0x8076db7)
0xb5510eb2 is located 1 bytes to the right of 17-byte region [0xb5510ea0,0xb5510eb1)
allocated by thread T0 here:
#0 0x81286e4 in malloc (/home/user/Desktop/ImageMagick/utilities/magick+0x81286e4)
#1 0x81aac6e in AcquireMagickMemory /home/user/Desktop/ImageMagick/MagickCore/memory.c:460:10
#2 0x81aac6e in AcquireQuantumMemory /home/user/Desktop/ImageMagick/MagickCore/memory.c:533
#3 0x8610dc8 in ReadImage /home/user/Desktop/ImageMagick/MagickCore/constitute.c:497:13
#4 0x861487e in ReadImages /home/user/Desktop/ImageMagick/MagickCore/constitute.c:857:9
#5 0x8c5b7ae in CLINoImageOperator /home/user/Desktop/ImageMagick/MagickWand/operation.c:4743:22
#6 0x8c5f20f in CLIOption /home/user/Desktop/ImageMagick/MagickWand/operation.c:5238:7
#7 0x8b18295 in ProcessCommandOptions /home/user/Desktop/ImageMagick/MagickWand/magick-cli.c:421:13
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/user/Desktop/ImageMagick/coders/sun.c:536:64 in ReadSUNImage
Shadow bytes around the buggy address:
0x36aa2180: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x36aa2190: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x36aa21a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x36aa21b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x36aa21c0: fa fa fa fa fa fa fa fa fd fd fd fd fa fa fd fd
=>0x36aa21d0: fd fd fa fa 00 00[01]fa fa fa fd fd fd fd fa fa
0x36aa21e0: fd fd fd fd fa fa fd fd fd fd fa fa fd fd fd fd
0x36aa21f0: fa fa fd fd fd fd fa fa fd fd fd fd fa fa fd fd
0x36aa2200: fd fd fa fa fd fd fd fd fa fa fd fd fd fd fa fa
0x36aa2210: fd fd fd fd fa fa fd fd fd fd fa fa fd fd fd fd
0x36aa2220: fa fa fd fd fd fd fa fa fd fd fd fd fa fa fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==3551==ABORTING
Aborted
The text was updated successfully, but these errors were encountered:
This bug was found while fuzzing ImageMagick with afl-fuzz
Tested on ImageMagick git commit 5f8642c
Command: magick bug2 /dev/null
bug2.zip
The text was updated successfully, but these errors were encountered: