Heap-based buffer overflow - CVE-2016-3074
Published: April 26, 2016 / Updated: August 4, 2020
Vulnerability details
The vulnerability allows a remote attacker to execute arbitrary code on the target system.
The vulnerability exists due to a boundary error in Integer signedness error in GD Graphics Library 2.1.1 (aka libgd or libgd2). A remote attacker can use crafted compressed gd2 data to trigger heap-based buffer overflow and execute arbitrary code on the target system.
Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.
Affected software
Debian Linux
Ubuntu
Slackware Linux
Fedora
gd (Alpine package)
libgd2-xpm (Ubuntu package)
libgd2-noxpm (Ubuntu package)
libgd2 (Debian package)
libgd3 (Ubuntu package)
gd
How to mitigate CVE-2016-3074
libgd2-xpm (Ubuntu package) - update to 2.0.36~rc1~dfsg-6ubuntu2.1
libgd2-noxpm (Ubuntu package) - update to 2.0.36~rc1~dfsg-6ubuntu2.1
libgd2 (Debian package) - addressed in versions 2.0.36~rc1~dfsg-6.1+deb7u2, 2.1.0-5+deb8u1
libgd3 (Ubuntu package) - addressed in versions 2.1.0-3ubuntu0.1, 2.1.1-4ubuntu0.15.10.1, 2.1.1-4ubuntu0.16.04.1
gd - addressed in versions 2.1.1-3.fc22, 2.1.1-5.fc23, 2.1.1-7.fc24
Links to Public Exploits and PoC-codes
External References
- http://lists.fedoraproject.org/pipermail/package-announce/2016-April/183263.html
- http://lists.fedoraproject.org/pipermail/package-announce/2016-May/183724.html
- http://lists.opensuse.org/opensuse-security-announce/2016-05/msg00031.html
- http://packetstormsecurity.com/files/136757/libgd-2.1.1-Signedness.html
- http://rhn.redhat.com/errata/RHSA-2016-2750.html
- http://seclists.org/fulldisclosure/2016/Apr/72
- http://www.debian.org/security/2016/dsa-3556
- http://www.debian.org/security/2016/dsa-3602
- http://www.securityfocus.com/archive/1/538160/100/0/threaded
- http://www.securityfocus.com/bid/87087
- http://www.securitytracker.com/id/1035659
- http://www.slackware.com/security/viewer.php?l=slackware-security&y=2016&m=slackware-security.383127
- http://www.ubuntu.com/usn/USN-2987-1
- https://github.com/libgd/libgd/commit/2bb97f407c1145c850416a3bfbcc8cf124e68a19
- https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05240731
- https://security.gentoo.org/glsa/201607-04
- https://security.gentoo.org/glsa/201611-22
- https://www.exploit-db.com/exploits/39736/