Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heap-buffer-overflow in WritePixels #1

Closed
RamadhanAmizudin opened this issue May 1, 2018 · 1 comment
Closed

heap-buffer-overflow in WritePixels #1

RamadhanAmizudin opened this issue May 1, 2018 · 1 comment
Assignees
Labels

Comments

@RamadhanAmizudin
Copy link

ASAN Report:

==51261==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7f31f6562c0c at pc 0x00000040b1ca bp 0x7ffd61861490 sp 0x7ffd61861480
WRITE of size 4 at 0x7f31f6562c0c thread T0
    #0 0x40b1c9 in WritePixels /src/ngiflib/ngiflib.c:213
    #1 0x40b1c9 in DecodeGifImg /src/ngiflib/ngiflib.c:530
    #2 0x410534 in LoadGif /src/ngiflib/ngiflib.c:766
    #3 0x4019e7 in main /src/ngiflib/gif2tga.c:95
    #4 0x7f31f507182f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #5 0x403338 in _start (/src/ngiflib/afl-gif2tga+0x403338)

0x7f31f6562c0c is located 0 bytes to the right of 144396-byte region [0x7f31f653f800,0x7f31f6562c0c)
allocated by thread T0 here:
    #0 0x7f31f54b3602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x410cfc in LoadGif /src/ngiflib/ngiflib.c:586

SUMMARY: AddressSanitizer: heap-buffer-overflow /src/ngiflib/ngiflib.c:213 WritePixels
Shadow bytes around the buggy address:
  0x0fe6beca4530: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0fe6beca4540: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0fe6beca4550: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0fe6beca4560: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0fe6beca4570: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0fe6beca4580: 00[04]fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0fe6beca4590: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0fe6beca45a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0fe6beca45b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0fe6beca45c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0fe6beca45d0: 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
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
==51261==ABORTING

Command:

./gif2tga test-input.gif

Test File:
test-input.zip

Thanks

@miniupnp miniupnp self-assigned this May 2, 2018
@miniupnp miniupnp added the bug label May 2, 2018
@miniupnp
Copy link
Owner

miniupnp commented May 2, 2018

@RamadhanAmizudin thank you for the bug report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants