CVE-2016-2116
Medium · 5.7CVSS
5.7
EPSS
3.0%
Published
Apr 13, 2016
CISA due date
—
Cloudanix analysis
A bug in an old image library lets attackers send specially made picture files that slowly use up all available memory and can crash the programs that open them.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The flaw triggers an unbounded memory allocation and leak inside jas_iccprof_createfrombuf when a malformed ICC color profile is parsed from a JPEG 2000 image, eventually exhausting available RAM and causing denial of service.
Why it matters to the business
Systems that decode untrusted JPEG 2000 images can be forced offline or slowed to unusability, interrupting image-processing workflows and requiring manual restarts or reboots.
How an attack unfolds
An attacker prepares a JPEG 2000 file containing a crafted ICC profile that triggers the leak, then delivers the file to any service or application that uses the vulnerable JasPer library to open or render the image.
How to fix it
Upgrade JasPer to a version containing the memory-leak fix; if no newer package is available, replace JasPer with an alternative decoder such as OpenJPEG and disable processing of untrusted JPEG 2000 files until migration is complete.
How to confirm the fix worked
Confirm the installed JasPer version is newer than 1.900.1, then attempt to open a known-triggering test image under memory-limit constraints and verify that memory usage remains bounded.
Typical attack path
- Locate targets accepting or rendering JPEG 2000 images processed by JasPer
- Generate or obtain a JPEG 2000 file embedding a malicious ICC profile
- Deliver the file through web upload, email attachment, or network share
- Wait for the victim process to parse the image and leak memory until exhaustion
How to detect it
Review logs from image-processing services for repeated JPEG 2000 handling events that coincide with unexplained memory-growth alerts; inspect system or container memory metrics for processes whose RSS or heap size grows without bound after handling a single image.
What your security team should do
- Inventory all hosts and containers that link against libjasper and schedule immediate upgrades
- Add JPEG 2000 file-type blocking at mail gateways and web upload points until patches are applied
- Monitor process memory usage for image-processing services and alert on sustained growth
The record
Memory leak in the jas_iccprof_createfrombuf function in JasPer 1.900.1 and earlier allows remote attackers to cause a denial of service (memory consumption) via a crafted ICC color profile in a JPEG 2000 image file.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:7 | jasper | 0 | 1.900.1-13+deb7u4 |
| Debian:8 | jasper | 0 | 1.900.1-debian1-2.4+deb8u1 |
| Mageia:5 | jasper | 0 | 1.900.1-20.4.mga5 |
| Red Hat:enterprise_linux:6::client | jasper | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::client | jasper-debuginfo | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::client | jasper-devel | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::client | jasper-libs | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::client | jasper-utils | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::computenode | jasper | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::computenode | jasper-debuginfo | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::computenode | jasper-devel | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::computenode | jasper-libs | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::computenode | jasper-utils | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::server | jasper | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::server | jasper-debuginfo | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::server | jasper-devel | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::server | jasper-libs | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::server | jasper-utils | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::workstation | jasper | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::workstation | jasper-debuginfo | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::workstation | jasper-devel | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::workstation | jasper-libs | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:6::workstation | jasper-utils | 0 | 0:1.900.1-21.el6_9 |
| Red Hat:enterprise_linux:7::client | jasper | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::client | jasper-debuginfo | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::client | jasper-devel | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::client | jasper-libs | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::client | jasper-utils | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::computenode | jasper | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::computenode | jasper-debuginfo | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::computenode | jasper-devel | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::computenode | jasper-libs | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::computenode | jasper-utils | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::server | jasper | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::server | jasper-debuginfo | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::server | jasper-devel | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::server | jasper-libs | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::server | jasper-utils | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::workstation | jasper | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::workstation | jasper-debuginfo | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::workstation | jasper-devel | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::workstation | jasper-libs | 0 | 0:1.900.1-30.el7_3 |
| Red Hat:enterprise_linux:7::workstation | jasper-utils | 0 | 0:1.900.1-30.el7_3 |
| SUSE:Linux Enterprise Desktop 12 SP1 | jasper | 0 | 1.900.14-181.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | jasper | 0 | 1.900.14-181.1 |
| SUSE:Linux Enterprise Server 11 SP4 | jasper | 0 | 1.900.14-134.25.1 |
| SUSE:Linux Enterprise Server 12 SP1 | jasper | 0 | 1.900.14-181.1 |
| SUSE:Linux Enterprise Server 12 SP2 | jasper | 0 | 1.900.14-181.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | jasper | 0 | 1.900.14-181.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | jasper | 0 | 1.900.14-134.25.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | jasper | 0 | 1.900.14-181.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | jasper | 0 | 1.900.14-181.1 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | jasper | 0 | 1.900.14-134.25.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP1 | jasper | 0 | 1.900.14-181.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | jasper | 0 | 1.900.14-181.1 |
| Ubuntu:14.04:LTS | jasper | 0 | 1.900.1-14ubuntu3.3 |
| Ubuntu:16.04:LTS | jasper | 0 | 1.900.1-debian1-2.4ubuntu1 |
| openSUSE:Tumbleweed | jasper | 0 | 1.900.14-3.1 |
Related vulnerabilities
- CVE-2016-10251 Integer overflow in the jpc_pi_nextcprl function in jpc_t2cod.c in JasPer before 1.900.20… Also affects jasper
- CVE-2016-10249 Integer overflow in the jpc_dec_tiledecode function in jpc_dec.c in JasPer before… Also affects jasper
- CVE-2016-9560 Stack-based buffer overflow in the jpc_tsfb_getbands2 function in jpc_tsfb.c in JasPer… Also affects jasper
- CVE-2016-8692 The jpc_dec_process_siz function in libjasper/jpc/jpc_dec.c in JasPer before 1.900.4… Also affects jasper
- CVE-2016-8691 The jpc_dec_process_siz function in libjasper/jpc/jpc_dec.c in JasPer before 1.900.4… Also affects jasper
- CVE-2016-8693 Double free vulnerability in the mem_close function in jas_stream.c in JasPer before… Also affects jasper
- CVE-2016-8883 The jpc_dec_tiledecode function in jpc_dec.c in JasPer before 1.900.8 allows remote… Also affects jasper
- CVE-2016-1577 Double free vulnerability in the jas_iccattrval_destroy function in JasPer 1.900.1 and… Also affects jasper