Package: gif2png
Version: 2.5.8-1+b2
Severity: normal

Dear Maintainer,

Running 'gif2png -r' with the attached file raises a NULL pointer
dereference, which may allow a denial-of-service attack of a malicious
attacker.

I expected the program to terminate without segfault, but the program
crashes as follow.

----------------------------
(gdb) r -r poc
Starting program: /usr/bin/gif2png -r poc
gif2png: bad version number, not '87a' or '89a', trying anyway
gif2png: error in reading DataBlock
gif2png: EOF / read error on image data

Program received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/x86_64/strlen.S:106
106 ../sysdeps/x86_64/strlen.S: No such file or directory.
(gdb) x/i $rip
=> 0x7ffff7887646 <strlen+38>:  movdqu (%rax),%xmm4
(gdb) i r rax
rax            0x0  0
-----------------------------

The bug was found with a fuzzer developed by 'SoftSec' group at KAIST.

-- System Information:
Debian Release: 9.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-3-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages gif2png depends on:
ii  libc6        2.24-11+deb9u1
ii  libpng16-16  1.6.28-1

Versions of packages gif2png recommends:
ii  python  2.7.13-2

gif2png suggests no packages.

-- no debconf information

Attachment: poc
Description: Binary data

Reply via email to