CVE-2016-8691
Medium · 5.5CVSS
5.5
EPSS
2.2%
Published
Feb 15, 2017
CISA due date
—
Cloudanix analysis
A bug in an image library lets a specially made picture file crash programs that try to read it, stopping those programs from working until they are updated.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The jpc_dec_process_siz function in libjasper performs integer division using an attacker-controlled XRsiz value from a BMP image header without validation, triggering a divide-by-zero that crashes the process.
Why it matters to the business
Applications or services that decode images using the vulnerable library can be forced offline by a single malformed file, causing service disruption and potential loss of availability for image-handling workflows.
How an attack unfolds
An attacker creates a BMP file containing an XRsiz value of zero, then delivers the file to a target system where it is opened by the imginfo utility or any application linked against the vulnerable JasPer library, causing an immediate crash.
How to fix it
Upgrade JasPer to version 1.900.4 or later. For the listed packages apply the following fixes: grafana-mimir (Chainguard) 2.13.0-r2, grafana-mimir (Wolfi) 2.13.0-r2, or jaspersoftware/jasper commit d8c2604cd438c41ec72aff52c16ebd8183068020.
How to confirm the fix worked
Confirm the installed JasPer version is at least 1.900.4, recompile any dependent applications against the patched library, and test that a crafted BMP no longer causes a crash.
Typical attack path
- Craft a BMP image with XRsiz set to zero
- Deliver the file to the victim via email, web upload, or shared storage
- Victim or automated process invokes imginfo or an application that calls jpc_dec_process_siz on the file
- Division by zero occurs and the process terminates
How to detect it
Search application and system logs for segmentation faults or crashes originating from imginfo or processes linked to libjasper when handling BMP files; monitor for repeated crashes on image-processing endpoints.
What your security team should do
- Immediately update all instances of JasPer and dependent packages to the versions listed in remediation guidance
- Scan build pipelines and container images for the vulnerable library version
- Disable or sandbox image-processing utilities that use JasPer until patches are applied
The record
The jpc_dec_process_siz function in libjasper/jpc/jpc_dec.c in JasPer before 1.900.4 allows remote attackers to cause a denial of service (divide-by-zero error and application crash) via a crafted XRsiz value in a BMP image to the imginfo command.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:7 | jasper | 0 | 1.900.1-13+deb7u5 |
| Debian:8 | jasper | 0 | 1.900.1-debian1-2.4+deb8u2 |
| Mageia:5 | jasper | 0 | 1.900.23-1.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.4 |
| Ubuntu:16.04:LTS | jasper | 0 | 1.900.1-debian1-2.4ubuntu1.1 |
| 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-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-2116 Memory leak in the jas_iccprof_createfrombuf function in JasPer 1.900.1 and earlier… Also affects jasper
- CVE-2016-1577 Double free vulnerability in the jas_iccattrval_destroy function in JasPer 1.900.1 and… Also affects jasper