Bug 1800472 (CVE-2019-20421) - CVE-2019-20421 exiv2: infinite loop and hang in Jp2Image::readMetadata() in jp2image.cpp could lead to DoS
Summary: CVE-2019-20421 exiv2: infinite loop and hang in Jp2Image::readMetadata() in j...
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2019-20421
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1800473 1807380
Blocks: 1800474
TreeView+ depends on / blocked
 
Reported: 2020-02-07 07:59 UTC by Marian Rehak
Modified: 2021-02-16 20:38 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
A denial of service vulnerability was found in exiv2 in the way JPEG 2000 (JP2) metadata was read when processing an image file. A remote attacker could abuse this flaw to create a specially crafted image, causing exiv2 to enter into an infinite loop when processing an incoming malicious image.
Clone Of:
Environment:
Last Closed: 2020-02-25 21:49:32 UTC


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:1577 0 None None None 2020-04-28 15:27:43 UTC

Description Marian Rehak 2020-02-07 07:59:43 UTC
In Jp2Image::readMetadata() in jp2image.cpp in Exiv2 0.27.2, an input file can result in an infinite loop and hang, with high CPU consumption. Remote attackers could leverage this vulnerability to cause a denial of service via a crafted file.

Upstream Issue:

https://github.com/Exiv2/exiv2/issues/1011

Upstream Fix:

https://github.com/Exiv2/exiv2/commit/a82098f4f90cd86297131b5663c3dec6a34470e8

Comment 1 Marian Rehak 2020-02-07 07:59:58 UTC
Created exiv2 tracking bugs for this issue:

Affects: fedora-all [bug 1800473]

Comment 3 Mauro Matteo Cascella 2020-02-25 19:21:36 UTC
The flaw seems to be introduced in exiv2 upstream version v0.27.2 after commit https://github.com/Exiv2/exiv2/commit/edb4bf78ca5820f2c7a852c8f2df11e6aba45704.

This commit added a new check in function MemIo::seek() in basicio.cpp which made it possible to return without setting variable p_->idx_, thus causing the infinite loop in the calling function Jp2Image::readMetadata() in jp2image.cpp.

Comment 4 Mauro Matteo Cascella 2020-02-25 19:35:53 UTC
Statement:

This flaw did not affect the versions of exiv2 as shipped with Red Hat Enterprise Linux 6, 7, and 8 as they did not include the vulnerable code, which was introduced in a later version of the library.

Comment 5 Product Security DevOps Team 2020-02-25 21:49:32 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2019-20421

Comment 7 errata-xmlrpc 2020-04-28 15:27:42 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2020:1577 https://access.redhat.com/errata/RHSA-2020:1577


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