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

Closed
twelveand0 opened this Issue Nov 2, 2016 · 1 comment

Comments

Projects
None yet
3 participants
@twelveand0

twelveand0 commented Nov 2, 2016

overview

I have found a vulnerability in openjpeg-2.1.2 (an open-source JPEG 2000 codec written in C
language) using AFL (http://lcamtuf.coredump.cx/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.
report1_+_poc.zip

Author

name: twelveand0 @ VARAS of IIE
email: l.bingchang.bc@gmail.com
org: IIE (http://iie.ac.cn)

Notes

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

@rouault

This comment has been minimized.

Show comment
Hide comment
@rouault

rouault Jul 29, 2017

Collaborator

Fixed per 2fa0fc6

Collaborator

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