CVE-2016-8690
Medium · 5.5CVSS
5.5
EPSS
2.5%
Published
Feb 15, 2017
CISA due date
—
Cloudanix analysis
A specially made picture file can crash programs that open images, temporarily stopping any work that relies on those programs.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The bmp_getdata function in libjasper/bmp/bmp_dec.c performs a NULL pointer dereference when parsing a specially crafted BMP image, resulting in an immediate crash of the calling process.
Why it matters to the business
Applications that decode BMP images can be forced offline, interrupting image-processing workflows and any services that depend on them until the process is restarted.
How an attack unfolds
An attacker creates a malformed BMP file that triggers the NULL dereference inside bmp_getdata, then supplies the file to any process invoking the imginfo utility or another JasPer-based decoder; the resulting crash produces denial of service. Public exploits have been available for years, increasing the likelihood of automated or scripted attacks.
How to fix it
Upgrade JasPer to version 1.900.5 or later. For prometheus-mongodb-exporter-fips update to 0.39.0-r1. For jasper-software/jasper apply commit 8f62b4761711d036fd8964df256b938c809b7fca or a later equivalent. Where immediate patching is impossible, restrict processing of untrusted BMP files.
How to confirm the fix worked
Confirm the installed JasPer version is at or above the fixed releases listed above. Re-run the imginfo command or the affected application against a known-good BMP and a test malformed BMP to verify the crash no longer occurs.
Typical attack path
- Generate a BMP image containing the trigger for the NULL dereference
- Deliver the image to a target system via file upload, email attachment, or web request
- Cause the target application or the imginfo command to open and parse the image
- Trigger the crash and resulting denial of service
How to detect it
Search application and system logs for segmentation faults or abrupt terminations that occur immediately after BMP files are opened by JasPer-linked processes. Correlate timestamps of crashes with file-access events involving .bmp files.
What your security team should do
- Apply the listed JasPer updates within the next maintenance window
- Add BMP file-type restrictions or sandboxing for any untrusted image ingestion paths
- Monitor for application crashes correlated with BMP processing and investigate promptly
- Review downstream dependents and prioritize updates for high-exposure services first
The record
The bmp_getdata function in libjasper/bmp/bmp_dec.c in JasPer before 1.900.5 allows remote attackers to cause a denial of service (NULL pointer dereference) via a crafted BMP image in an imginfo command.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:8 | jasper | 0 | 1.900.1-debian1-2.4+deb8u4 |
| 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-2015-5203 Double free vulnerability in the jasper_image_stop_load function in JasPer 1.900.17… Also affects jasper
- CVE-2015-5221 Use-after-free vulnerability in the mif_process_cmpt function in libjasper/mif/mif_cod.c… Also affects jasper
- 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