kohler / gifsicle

Create, manipulate, and optimize GIF images and animations
http://www.lcdf.org/gifsicle/
GNU General Public License v2.0
3.79k stars 241 forks source link

Crash during parsing of malformed GIF #179

Open retpoline opened 2 years ago

retpoline commented 2 years ago

Hi folks,

An interesting crash was found while fuzz testing of the gifsicle binary which can be triggered via a malformed GIF file. Although this malformed file only crashes the program as-is, it could potentially be crafted further and create a security issue where these kinds of files would be able compromise the process's memory through taking advantage of affordances given by memory corruption. It's recommend to harden the code to prevent these kinds of bugs as it could greatly mitigate such this issue and even future bugs.

crash.gif (base64 encoded due to file format)

echo -e "R0lGODlhPACEAPX/AJyMe1J7Oe+11q1arc6tlP/OjAAAAKV7Qvd7lPdChBgISq1Cxs6M56W11vecUgBrMWMAQs5CUkopa5xKxnOElGNSAHu1ObXGQv/WQvfv3udCSsYIhJQQrd4IrSEQrVoQ1s4I1mMQzoR7/1JSxox7lClaa2O1Y3O1Y+e9GPcIWq0AQucIhFJC/9Za/ykY97UQ/8YQ/4w5/zlKxkKElEq1Y///AFLnKVrvMaX3lK33GNb/SgAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFMgAAACwAAAAAPACEAAAG/0CAcEgsGo/IpHLJbBYFiEQiRZUiBM6sVoiger/fBHZLNgqm4HR4XCZ31fAvor19x++pOb1px9/1e0l9fndsgU+EiSmHZoqJgIwAjoqRXJOJCZWXlIwCm4+Mn5iHnqKEh4OmcIeqp3ulrXeBaLFwmXu1d7dtqbleu2W0vmCQZMNwxVqwx1+GW8LMKcDG0WF0vcfTWtXEdNxf199e3uJU5OLaTsvczlnQ1efibevV6U3v0clO5eZl9PDB+C0qI9Dekn/R2t0T2EbgwC0ImRlUgi8fQYEKDzoMyJAav4lIsEUDecThw20b65gkU9HiFpMZBa18NhNlQZUO9VGsmcXkSf8+JkkW8akzCVEtLQH2DKpFZLWiR5K63OdTmU+hQ6Qyg2rE50+NVd1dtZkzS0R2YsNSZarOiwoIcOPCVaFiGFcibyDQBUP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SgsribADuf6AuuQp22tuD+1R5iJABQMG7uatUEHIzCpqkfANwrdwXxfV1FiFcrdCgGJkbyymYhdvBDpq5/wZoSZzq8KPV/JIuqdxrMml84bOkVkE6VR5x2k8HYbv6osCk1Ss4rgWll8zqBy2EmidQVVSViAMjjyQpBp85PzTJ12okNbVNZ/OHrcX9+5BzH7ffc5LCAAh+QQFCgADACwBAAEAOgBkAAAF/+AgjmRpnugARCybvnB8tnQdyXg+2Hyt/6aesAUsDo+3Yg6JVMZWzKYzFY1OZ1Um4ErKVrkj75crHl/L1nNZwySLNey2E+qF2+HCafbOj/f0VX12R4CBfVJGb3yIPwSKi0NOa3gRlHlKj1lKAmtemGieiaBmP6OaQKakOi1+qTyflq42orGyNEWCtalKua2uiYK2RKiVd8K3xJDHSaXFznu+PATJftFHg5HEpsqz2qCHf83bxperruSv4qncyObn6D7q44TustbD9cvd+frtOP3l/gFMt2RgjS0FDfqToTAeDkcN8TGMokuMPCG5yuiAiLEXGn42PH5MOATcSJIl2dSdEogkWB02IHkMwgaN2RMmNGvaiRnyXks+PIUBRQnwDtGicHJwNGiUpUJKRxVGHZgjjs9lVeFRxaF1q4yKXmHklPoPbEdQAs32UEsvxreujF7QgEC3bt2eKtu6jRAAQg+6A+iyMKmKSpa7xdgShIEGQuDEWRDuBSU41EQ0lCrLcfpmruaAk2U53hEu6GA2cGt8lshZpgYReVXvM/26ROoWfhfmoLPY9tUIuW2KcpjiN2tJuk0YdwEmTG25m5tzTSO9dQ/J1UNny355O3ftvb+DZ+4kBAA7" | base64 -d > crash.gif

debug log

(requires the electric fence malloc debugger library to instrument the memory manager to find the subtle crash: sudo apt-get install electric-fence)

ccmdline ['gifsicle', 'crash.gif'] exited with invalid memory access (SIGSEGV)

-> LD_PRELOAD=/usr/lib/libefence.so gifsicle crash.gif

Reading symbols from gifsicle...

Starting program: gifsicle crash.gif

  Electric Fence 2.2 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com>
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

  Electric Fence 2.2 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com>
gifsicle:crash.gif:#7: read error: unknown block type 0 at file offset 11721
gifsicle:crash.gif:#6: read error: image corrupted, code out of range (20 times)
gifsicle:crash.gif:#6: read error: (not reporting more errors)
gifsicle:crash.gif:#6: read error: missing 4005 pixels of image data

ElectricFence Exiting: mmap() failed: 
Program received signal SIGSEGV, Segmentation fault.
__strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
65  ../sysdeps/x86_64/multiarch/strlen-avx2.S: No such file or directory.
#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
#1  0x00007ffff7dc462f in EF_Printv () from /usr/lib/libefence.so
#2  0x00007ffff7dc4845 in EF_Exitv () from /usr/lib/libefence.so
#3  0x00007ffff7dc48f9 in EF_Exit () from /usr/lib/libefence.so
#4  0x00007ffff7dc4226 in Page_Create () from /usr/lib/libefence.so
#5  0x00007ffff7dc380c in ?? () from /usr/lib/libefence.so
#6  0x00007ffff7dc3fbe in realloc () from /usr/lib/libefence.so
#7  0x000055555555d652 in Gif_Realloc (p=p@entry=0x0, s=s@entry=1, 
    n=<optimized out>, file=file@entry=0x5555555796f0 "giffunc.c", 
    line=line@entry=811) at fmalloc.c:19
#8  0x000055555555eef2 in Gif_CreateUncompressedImage (
    gfi=gfi@entry=0x7ffff7996f80, data_interlaced=0) at giffunc.c:811
#9  0x000055555555fb2f in uncompress_image (gfc=0x7fffffffe040, 
    gfi=0x7ffff7996f80, grr=0x7fffffffe000) at gifread.c:515
#10 0x0000555555560c8d in Gif_FullUncompressImage (gfs=<optimized out>, 
    gfi=gfi@entry=0x7ffff7996f80, h=h@entry=0x0) at gifread.c:555
#11 0x00005555555618da in mark_used_colors (gfs=<optimized out>, 
    gfi=gfi@entry=0x7ffff7996f80, crop=0x0, 
    compress_immediately=compress_immediately@entry=1) at merge.c:81
#12 0x000055555556f1e7 in merge_frame_interval (fset=<optimized out>, 
    f1=<optimized out>, f2=<optimized out>, 
    output_data=0x5555555858a0 <active_output_data>, compress_immediately=1, 
    huge_stream=<optimized out>) at support.c:1550
#13 0x00005555555746f9 in merge_and_write_frames (outfile=0x0, f1=0, f2=-1)
    at gifsicle.c:1015
#14 0x0000555555575adf in output_frames () at gifsicle.c:1107
#15 0x0000555555558f8b in main (argc=<optimized out>, argv=<optimized out>)
    at gifsicle.c:2182

rax            0x7fffffffde48      140737488346696
rbx            0x0                 0
rcx            0x0                 0
rdx            0x0                 0
rsi            0x73                115
rdi            0x0                 0
rbp            0x7fffffffddb6      0x7fffffffddb6
rsp            0x7fffffffdda8      0x7fffffffdda8
r8             0x7ffff7c2c660      140737350125152
r9             0x0                 0
r10            0x7ffff7dc2a50      140737351789136
r11            0x7ffff7bca660      140737349723744
r12            0x7fffffffddb7      140737488346551
r13            0x7ffff7dc4c60      140737351797856
r14            0x7fffffffde20      140737488346656
r15            0x7ffff7dc4bc0      140737351797696
rip            0x7ffff7bca675      0x7ffff7bca675 <__strlen_avx2+21>
eflags         0x10283             [ CF SF IF RF ]
cs             0x33                51
ss             0x2b                43
ds             0x0                 0
es             0x0                 0
fs             0x0                 0
gs             0x0                 0

=> 0x7ffff7bca675 <__strlen_avx2+21>:   vpcmpeqb (%rdi),%ymm0,%ymm1
   0x7ffff7bca679 <__strlen_avx2+25>:   vpmovmskb %ymm1,%eax
   0x7ffff7bca67d <__strlen_avx2+29>:   test   %eax,%eax
   0x7ffff7bca67f <__strlen_avx2+31>:   
    jne    0x7ffff7bca770 <__strlen_avx2+272>

'exploitable' version 1.32
Linux ubuntu 5.11.0-43-generic #47~20.04.2-Ubuntu SMP Mon Dec 13 11:06:56 UTC 2021 x86_64
Signal si_signo: 11 Signal si_addr: 0
Nearby code:
   0x00007ffff7bca666 <+6>: mov    rdx,rdi
   0x00007ffff7bca669 <+9>: vpxor  xmm0,xmm0,xmm0
   0x00007ffff7bca66d <+13>:    and    ecx,0x3f
   0x00007ffff7bca670 <+16>:    cmp    ecx,0x20
   0x00007ffff7bca673 <+19>:    ja     0x7ffff7bca6a0 <__strlen_avx2+64>
=> 0x00007ffff7bca675 <+21>:    vpcmpeqb ymm1,ymm0,YMMWORD PTR [rdi]
   0x00007ffff7bca679 <+25>:    vpmovmskb eax,ymm1
   0x00007ffff7bca67d <+29>:    test   eax,eax
   0x00007ffff7bca67f <+31>:    jne    0x7ffff7bca770 <__strlen_avx2+272>
   0x00007ffff7bca685 <+37>:    add    rdi,0x20

Stack trace:
#  0 __strlen_avx2 at 0x7ffff7bca675 in /usr/lib/x86_64-linux-gnu/libc-2.31.so (BL)
#  1 EF_Printv at 0x7ffff7dc462f in /usr/lib/libefence.so.0.0
#  2 EF_Exitv at 0x7ffff7dc4845 in /usr/lib/libefence.so.0.0
#  3 EF_Exit at 0x7ffff7dc48f9 in /usr/lib/libefence.so.0.0
#  4 Page_Create at 0x7ffff7dc4226 in /usr/lib/libefence.so.0.0
#  5 None at 0x7ffff7dc380c in /usr/lib/libefence.so.0.0
#  6 realloc at 0x7ffff7dc3fbe in /usr/lib/libefence.so.0.0
#  7 Gif_Realloc at 0x55555555d652 in gifsicle
#  8 Gif_CreateUncompressedImage at 0x55555555eef2 in gifsicle
#  9 uncompress_image at 0x55555555fb2f in gifsicle
# 10 Gif_FullUncompressImage at 0x555555560c8d in gifsicle
# 11 mark_used_colors at 0x5555555618da in gifsicle
# 12 merge_frame_interval at 0x55555556f1e7 in gifsicle
# 13 merge_and_write_frames at 0x5555555746f9 in gifsicle
# 14 output_frames at 0x555555575adf in gifsicle
# 15 main at 0x555555558f8b in gifsicle

Faulting frame: #  1 EF_Printv at 0x7ffff7dc462f in /usr/lib/libefence.so.0.0
Description: Access violation
Short description: AccessViolation (21/22)
Hash: c462e0259d99ca6f6f03acfb38e184b9.d3f79409a37e77a7b365fc4abefed96a
Exploitability Classification: UNKNOWN
Explanation: The target crashed due to an access violation but there is not enough additional information available to determine exploitability.

Thanks!

kohler commented 2 years ago

I don't know that this is actually a problem; anyway I'd like to see more explanation. What's happening is that the realloc call is failing, likely because this bogus GIF claims to be ~40000x50000px, and an allocation attempt of that size fails. But Gifsicle is prepared for the allocation to fail.

When I run this gif with sanitizers, no access problems are reported. There was an UB related to integer overflow, but I've fixed that in a commit (and I doubt it was exploitable).

retpoline commented 2 years ago

Hmm integer overflow somewhere along the way makes sense.

Regardless, thanks for the fix!

kohler commented 2 years ago

To be clear, I believe you will still get a report like the above.

retpoline commented 2 years ago

I see. Perhaps a check or warning for a less-than-sane pixel size?