out-of-bounds write in MagickCore/memory.c:723:10
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
imagemagick (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This bug was found while fuzzing ImageMagick with afl-fuzz
Tested on ImageMagick git commit 712467450377a5c
Command: magick id:000206,
=======
==7820==ERROR: AddressSanitizer: heap-buffer-
WRITE of size 65700 at 0xb531ca5f thread T0
#0 0x818c062 in CopyMagickMemory /home/user/
#1 0x87597e6 in RemoveICCProfil
#2 0x87597e6 in WritePSDImage /home/user/
#3 0x8a8bd28 in WriteImage /home/user/
#4 0x8a8f70c in WriteImages /home/user/
#5 0x937560f in CLINoImageOperator /home/user/
#6 0x937d421 in CLIOption /home/user/
#7 0x9108443 in ProcessCommandO
#8 0x910a8c5 in MagickImageCommand /home/user/
#9 0x910eda9 in MagickCommandGe
#10 0x80ddeed in MagickMain /home/user/
#11 0x80ddeed in main /home/user/
#12 0xb7495a82 in __libc_start_main /build/
#13 0x80ddd14 in _start (/usr/local/
AddressSanitizer can not describe address in more detail (wild memory access suspected).
SUMMARY: AddressSanitizer: heap-buffer-
Shadow bytes around the buggy address:
0x36a638f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x36a63900: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x36a63910: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x36a63920: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x36a63930: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x36a63940: fa fa fa fa fa fa fa fa fa fa fa[fa]fa fa fa fa
0x36a63950: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x36a63960: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x36a63970: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x36a63980: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x36a63990: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
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
ASan internal: fe
==7820==ABORTING
input file to trigger crash