Bug 1664872 (CVE-2018-20622) - CVE-2018-20622 jasper: memory leak in jpc_dec_decodepkt()
Summary: CVE-2018-20622 jasper: memory leak in jpc_dec_decodepkt()
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2018-20622
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1664873 1664874 1664875
Blocks: 1664868
TreeView+ depends on / blocked
 
Reported: 2019-01-09 21:32 UTC by Laura Pardo
Modified: 2020-12-11 21:20 UTC (History)
1 user (show)

Fixed In Version: jasper 2.0.17
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-06 08:37:34 UTC
Embargoed:


Attachments (Terms of Use)

Description Laura Pardo 2019-01-09 21:32:43 UTC
A flaw was found in JasPer 2.0.14. A memory leak in base/jas_malloc.c in libjasper.a when "--output-format jp2" is used.


References:
https://github.com/mdadams/jasper/issues/193

Comment 1 Laura Pardo 2019-01-09 21:33:02 UTC
Created jasper tracking bugs for this issue:

Affects: fedora-all [bug 1664873]


Created mingw-jasper tracking bugs for this issue:

Affects: epel-7 [bug 1664875]
Affects: fedora-all [bug 1664874]

Comment 6 Tomas Hoger 2020-05-06 08:37:34 UTC
The main problem demonstrated by the reproducer in the upstream bug report is a duplicate of CVE-2017-13748 (see bug 1488961).  Besides the tile data memory leak, the reproducer also triggers a minor memory leak in jpc_dec_decodepkt(), which calls jpc_bitstream_sopen(), which does memory allocation, but does not do matching jpc_bitstream_close() call to release the memory when error is encountered.  The following comment in the upstream bug provides more details:

https://github.com/mdadams/jasper/issues/193#issuecomment-624510298

Note that the CVE description is wrong - there's no problem in jas_malloc.c, and the problem is not limited to situations when converting to jp2 format, as it happens in the (jpc) decoder rather than jp2 encoder.

Comment 7 Tomas Hoger 2020-11-02 20:19:18 UTC
Upstream commit:

https://github.com/jasper-software/jasper/commit/aa8516b28344aa1263ee538bb7366c4679a0e1a5

The issue was fixed upstream in jasper 2.0.17.


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