[Bug 1537423] Re: out-of-bounds read in ./MagickCore/pixel-accessor.h:234

Bug Watch Updater 1537423 at bugs.launchpad.net
Thu May 2 20:10:20 UTC 2019


** Changed in: imagemagick
       Status: Unknown => Fix Released

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

Title:
  out-of-bounds read in ./MagickCore/pixel-accessor.h:234

Status in ImageMagick:
  Fix Released
Status in imagemagick package in Ubuntu:
  Fix Released

Bug description:
  =================================================================
  ==20038==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xb470485c at pc 0x8dd722a bp 0xbf92c668 sp 0xbf92c660
  READ of size 4 at 0xb470485c thread T0
      #0 0x8dd7229 in GetPixelInfoLuma /home/user/Desktop/ImageMagick/./MagickCore/pixel-accessor.h:234
      #1 0x8dd7229 in AssignImageColors /home/user/Desktop/ImageMagick/MagickCore/quantize.c:657
      #2 0x8db65bb in QuantizeImage /home/user/Desktop/ImageMagick/MagickCore/quantize.c:2778
      #3 0x8943662 in SetImageType /home/user/Desktop/ImageMagick/MagickCore/attribute.c:1264
      #4 0x86e4989 in WritePNMImage /home/user/Desktop/ImageMagick/coders/pnm.c:1914
      #5 0x8a9eca8 in WriteImage /home/user/Desktop/ImageMagick/MagickCore/constitute.c:1091
      #6 0x8aa285b in WriteImages /home/user/Desktop/ImageMagick/MagickCore/constitute.c:1309
      #7 0x9371d1f in CLINoImageOperator /home/user/Desktop/ImageMagick/MagickWand/operation.c:4697
      #8 0x9379b31 in CLIOption /home/user/Desktop/ImageMagick/MagickWand/operation.c:5157
      #9 0x9108033 in ProcessCommandOptions /home/user/Desktop/ImageMagick/MagickWand/magick-cli.c:526
      #10 0x910a4b5 in MagickImageCommand /home/user/Desktop/ImageMagick/MagickWand/magick-cli.c:786
      #11 0x910e999 in MagickCommandGenesis /home/user/Desktop/ImageMagick/MagickWand/mogrify.c:172
      #12 0x80de12d in MagickMain /home/user/Desktop/ImageMagick/utilities/magick.c:74
      #13 0x80de12d in main /home/user/Desktop/ImageMagick/utilities/magick.c:85
      #14 0xb74a6a82 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287
      #15 0x80ddf54 in _start (/usr/local/bin/magick+0x80ddf54)

  0xb470485c is located 4 bytes to the right of 56-byte region [0xb4704820,0xb4704858)
  allocated by thread T0 here:
      #0 0x80c6dc1 in realloc (/usr/local/bin/magick+0x80c6dc1)
      #1 0x819832a in ResizeMagickMemory /home/user/Desktop/ImageMagick/MagickCore/memory.c:1161
      #2 0x819832a in ResizeQuantumMemory /home/user/Desktop/ImageMagick/MagickCore/memory.c:1225

  SUMMARY: AddressSanitizer: heap-buffer-overflow /home/user/Desktop/ImageMagick/./MagickCore/pixel-accessor.h:234 GetPixelInfoLuma
  Shadow bytes around the buggy address:
    0x368e08b0: 00 00 00 00 00 00 00 04 fa fa fa fa 00 00 00 00
    0x368e08c0: 00 00 00 04 fa fa fa fa 00 00 00 00 00 00 00 04
    0x368e08d0: fa fa fa fa 00 00 00 00 00 00 00 04 fa fa fa fa
    0x368e08e0: 00 00 00 00 00 00 00 04 fa fa fa fa 00 00 00 00
    0x368e08f0: 00 00 00 04 fa fa fa fa 00 00 00 00 00 00 00 04
  =>0x368e0900: fa fa fa fa 00 00 00 00 00 00 00[fa]fa fa fa fa
    0x368e0910: 00 00 00 00 00 00 00 04 fa fa fa fa 00 00 00 00
    0x368e0920: 00 00 00 04 fa fa fa fa 00 00 00 00 00 00 00 04
    0x368e0930: fa fa fa fa 00 00 00 00 00 00 00 04 fa fa fa fa
    0x368e0940: 00 00 00 00 00 00 00 04 fa fa fa fa 00 00 00 00
    0x368e0950: 00 00 00 04 fa fa fa fa 00 00 00 00 00 00 00 04
  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
  ==20038==ABORTING

To manage notifications about this bug go to:
https://bugs.launchpad.net/imagemagick/+bug/1537423/+subscriptions



More information about the foundations-bugs mailing list