*** This bug is a security vulnerability ***

Public security bug reported:

This bug was found while fuzzing graphicsmagick with afl-fuzz

Tested on hg changeset 14720:3b1f1e0c1098

Command: gm convert id:000075,sig:06,src:000107,op:flip1,pos:7 /dev/null

=================================================================
==7295==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xb4e03bdc at 
pc 0x891bd19 bp 0xbfb26208 sp 0xbfb26200
WRITE of size 1 at 0xb4e03bdc thread T0
    #0 0x891bd18 in WriteSUNImage 
/home/user/Desktop/graphicsmagick_fuzz_results/graphicsmagick/coders/sun.c:962
    #1 0x824e050 in WriteImage 
/home/user/Desktop/graphicsmagick_fuzz_results/graphicsmagick/magick/constitute.c:2208
    #2 0x824fb98 in WriteImages 
/home/user/Desktop/graphicsmagick_fuzz_results/graphicsmagick/magick/constitute.c:2351
    #3 0x8144026 in ConvertImageCommand 
/home/user/Desktop/graphicsmagick_fuzz_results/graphicsmagick/magick/command.c:6087
    #4 0x8165066 in MagickCommand 
/home/user/Desktop/graphicsmagick_fuzz_results/graphicsmagick/magick/command.c:8862
    #5 0x81ed0dc in GMCommandSingle 
/home/user/Desktop/graphicsmagick_fuzz_results/graphicsmagick/magick/command.c:17338
    #6 0x81ea204 in GMCommand 
/home/user/Desktop/graphicsmagick_fuzz_results/graphicsmagick/magick/command.c:17391
    #7 0x80d4a76 in main 
/home/user/Desktop/graphicsmagick_fuzz_results/graphicsmagick/utilities/gm.c:61
    #8 0xb74dca82 in __libc_start_main 
/build/buildd/eglibc-2.19/csu/libc-start.c:287
    #9 0x80d4904 in _start 
(/home/user/Desktop/graphicsmagick_fuzz_results/graphicsmagick/utilities/gm+0x80d4904)

0xb4e03bdc is located 0 bytes to the right of 284-byte region 
[0xb4e03ac0,0xb4e03bdc)
allocated by thread T0 here:
    #0 0x80bd531 in __interceptor_malloc 
(/home/user/Desktop/graphicsmagick_fuzz_results/graphicsmagick/utilities/gm+0x80bd531)
    #1 0x839bb38 in MagickMalloc 
/home/user/Desktop/graphicsmagick_fuzz_results/graphicsmagick/magick/memory.c:156
    #2 0x824e050 in WriteImage 
/home/user/Desktop/graphicsmagick_fuzz_results/graphicsmagick/magick/constitute.c:2208
    #3 0x824fb98 in WriteImages 
/home/user/Desktop/graphicsmagick_fuzz_results/graphicsmagick/magick/constitute.c:2351

SUMMARY: AddressSanitizer: heap-buffer-overflow 
/home/user/Desktop/graphicsmagick_fuzz_results/graphicsmagick/coders/sun.c:962 
WriteSUNImage
Shadow bytes around the buggy address:
  0x369c0720: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x369c0730: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x369c0740: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x369c0750: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
  0x369c0760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x369c0770: 00 00 00 00 00 00 00 00 00 00 00[04]fa fa fa fa
  0x369c0780: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
  0x369c0790: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x369c07a0: fd fd fd fd fd fd fd fd fd fd fd fd fa fa fa fa
  0x369c07b0: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
  0x369c07c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
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
==7295==ABORTING

** Affects: graphicsmagick (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1537835

Title:
  out-of-bounds write in coders/sun.c:962

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/graphicsmagick/+bug/1537835/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to