Quantum Secular Labs / Blog / Advisories
CVE-2016-3074: Libgd: Buffer overflow
CVE-2016-3074 is rated critical with a CVSS v3.1 base score of 9.8 and affects Libgd, along with 5 other products in NVD’s configuration data. Per its scoring, it can be exploited over the network, without authentication, without any user interaction. The scored impact on confidentiality, integrity and availability is the highest available.
Vulnerability description
Integer signedness error in GD Graphics Library 2.1.1 (aka libgd or libgd2) allows remote attackers to cause a denial of service (crash) or potentially execute arbitrary code via crafted compressed gd2 data, which triggers a heap-based buffer overflow.
Severity breakdown
CVSS v3.1 9.8: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack vector: Network. Exploitable remotely over the network, with no need for local or physical access.
- Attack complexity: Low. No special conditions; the attack can be repeated reliably.
- Privileges required: None. No account or prior access is needed.
- User interaction: None. No action from any user is needed.
- Scope: Unchanged. Impact stays within the vulnerable component.
- Confidentiality impact: High. Total loss of confidentiality; sensitive data can be fully disclosed.
- Integrity impact: High. Total loss of integrity; data or system state can be fully modified.
- Availability impact: High. Total loss of availability; the component can be shut down.
Underlying weakness
CWE-681: Incorrect Conversion between Numeric Types
When converting from one data type to another, such as long to integer, data can be omitted or translated in a way that produces unexpected values. If the resulting values are used in a sensitive context, then dangerous behaviors may occur.
Affected products
- Libgd: 2.1.1
- Debian Linux: 7.0; 8.0
- Fedoraproject: 23; 24
- Canonical Ubuntu Linux: 12.04; 14.04; 15.10; 16.04
- Opensuse: 13.2
- PHP: from 5.5.0 before 5.5.35; from 5.6.0 before 5.6.21; from 7.0.0 before 7.0.6
References
- https://github.com/libgd/libgd/commit/2bb97f407c1145c850416a3bfbcc8cf124e68a19
- 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