Openjpeg-2.1.2 Heap Buffer Overflow Vulnerability due to Insufficient check #862

twelveand0 opened this Issue Nov 2, 2016 · 1 comment


None yet
3 participants

twelveand0 commented Nov 2, 2016


I have found a vulnerability in openjpeg-2.1.2 (an open-source JPEG 2000 codec written in C
language) using AFL ( The vulnerability is a heap buffer overflow
vulnerability, which can cause out-of-bound read. The vulnerability exists in code responsible for
decompressing the input image. The vulnerability is caused by insufficient check: the code have
made sure the parameters of RED channel, GREEN channel and BLUE channel are the same,
however, does not do it for ALPHA channel, which causes the length of alpha buffer is less than the
expected access length. The vulnerability can cause Denial-of-Service and Information Disclosure
and I am not sure whether it can cause RCE.

Analysis and PoC

The detail analysis and poc file can be found in the attachment.


name: twelveand0 @ VARAS of IIE
org: IIE (


I have reported this to RedHat Security Team and they suggested me to report it here before assigning cve id.


This comment has been minimized.

Show comment
Hide comment

rouault Jul 29, 2017


Fixed per 2fa0fc6


rouault commented Jul 29, 2017

Fixed per 2fa0fc6

@rouault rouault closed this Jul 29, 2017

@detonin detonin added the bug label Aug 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment