CVE-2017-20286
Description
A flaw was found in DevIL. A heap-based buffer overflow exists in its palette handling routine when decoding GIF (Graphics Interchange Format) files. By convincing a user or system to process a specially crafted GIF image, an attacker could trigger out-of-bounds memory writes, potentially leading to arbitrary code execution or causing the application to crash.
Statement
A heap-based buffer overflow flaw, rated important severity, was found in DevIL (Developer's Image Library) in the GIF palette handling routine iGetPalette() in il_gif.cpp. When an application linked against DevIL loads a specially crafted GIF image, such as a two-frame GIF whose second frame uses disposal method 1 with a local colour table, the library can write up to 384 controlled bytes beyond a 768-byte heap-allocated palette buffer. Successful exploitation can cause memory corruption leading to an application crash or possible arbitrary code execution in the context of the user running the application. Exploitation requires a victim or an automated process to open a malicious GIF file, and no privileges are required beyond delivering that file. Red Hat and upstream both rate this flaw CVSS v3.1 7.8 (IMPORTANT); upstream additionally publishes a CVSS v4.0 score of 8.5. In Red Hat's product scope this issue affects the DevIL package in Fedora, where a fix is being pursued through the Fedora community project.
Mitigation
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.
Understanding the Weakness (CWE)
Integrity
Technical Impact: Modify Memory; Execute Unauthorized Code or Commands
Write operations could cause memory corruption. In some cases, an adversary can modify control data such as return addresses in order to execute unexpected code.
Availability
Technical Impact: DoS: Crash, Exit, or Restart
Attempting to access out-of-range, invalid, or unauthorized memory could cause the product to crash.
Other
Technical Impact: Unexpected State
Subsequent write operations can produce undefined or unexpected results.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.