Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1537758 - (CVE-2018-5785) CVE-2018-5785 openjpeg: integer overflow in opj_j2k_setup_encoder function in openjp2/j2k.c
CVE-2018-5785 openjpeg: integer overflow in opj_j2k_setup_encoder function in...
Status: NEW
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
impact=low,public=20180119,reported=2...
: Security
Depends On: 1537759 1537762 1538556 1537760 1537761
Blocks: 1537764
  Show dependency treegraph
 
Reported: 2018-01-23 14:56 EST by Laura Pardo
Modified: 2018-01-25 04:59 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Laura Pardo 2018-01-23 14:56:35 EST
A flaw was found in OpenJPEG 2.3.0, there is an integer overflow caused by an out-of-bounds left shift in the opj_j2k_setup_encoder function (openjp2/j2k.c). Remote attackers could leverage this vulnerability to cause a denial of service via a crafted bmp file.

Reference:
https://github.com/uclouvain/openjpeg/issues/1057
Comment 1 Laura Pardo 2018-01-23 14:57:03 EST
Created mingw-openjpeg2 tracking bugs for this issue:

Affects: fedora-all [bug 1537761]


Created openjpeg tracking bugs for this issue:

Affects: epel-all [bug 1537762]
Affects: fedora-all [bug 1537759]


Created openjpeg2 tracking bugs for this issue:

Affects: fedora-all [bug 1537760]
Comment 2 Huzaifa S. Sidhpurwala 2018-01-25 04:56:47 EST
Analysis:

Running openjpeg compiled with UBSAN, i observe the following:

[huzaifas@babylon bin]$ ./opj_compress -n 1 -i /tmp/openjpeg_2-3_opj_compress_integer-overflow_opj_j2k_setup_encoder.bmp -o /tmp/null.j2k

/NotBackedUp/oss/openjpeg/src/lib/openjp2/j2k.c:7304:48: runtime error: shift exponent 4294967295 is too large for 32-bit type 'int'
[INFO] tile number 1 / 1
/NotBackedUp/oss/openjpeg/src/lib/openjp2/tcd.c:2382:32: runtime error: signed integer overflow: 0 - -2147483648 cannot be represented in type 'int [33]'
/NotBackedUp/oss/openjpeg/src/lib/openjp2/mct.c:109:31: runtime error: signed integer overflow: -2147483648 * 2 cannot be represented in type 'int'
/NotBackedUp/oss/openjpeg/src/lib/openjp2/mct.c:109:36: runtime error: signed integer overflow: -2147483648 + -2147483648 cannot be represented in type 'int'
[INFO] Generated outfile /tmp/null.j2k
encode time: 1 ms 


Which represents multiple integer overflow when converting from BMP to J2K format. However it seems that in the end the operation ends gracefully. There are no related buffer overflows etc.

The maximum security impact seems to be limited to invalid conversion to J2K format.

Note You need to log in before you can comment on or make changes to this bug.