Bug 1946314 (CVE-2021-3482)

Summary: CVE-2021-3482 exiv2: Heap-based buffer overflow in Jp2Image::readMetadata()
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: jgrulich, michel, rdieter
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: exiv2 0.27.4RC2 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in Exiv2. Improper input validation of the rawData.size property in the Jp2Image::readMetadata() function in jp2image.cpp can lead to a heap-based buffer overflow via a crafted JPG image containing malicious EXIF data. The highest threat from this vulnerability is to confidentiality and system availability.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 21:54:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1946315, 1947160, 1947161    
Bug Blocks: 1946317, 1946319    

Description Guilherme de Almeida Suckevicz 2021-04-05 19:27:44 UTC
A flaw was found in Exiv2. An improper check of the rawData.size property in Jp2Image::readMetadata() in jp2image.cpp can lead to a heap-based buffer overflow.


Comment 1 Guilherme de Almeida Suckevicz 2021-04-05 19:28:00 UTC
Created exiv2 tracking bugs for this issue:

Affects: fedora-all [bug 1946315]

Comment 2 Guilherme de Almeida Suckevicz 2021-04-06 18:24:50 UTC

Name: yuawn (NSLab NTU Taiwan)

Comment 5 Marco Benatto 2021-04-07 19:59:33 UTC
Upstream commit for this issue:


Comment 6 Marco Benatto 2021-04-07 20:10:24 UTC
There's an issue on Exiv2 while parsing exif information from an image. The vulnerability can be leverage by an attacker by crafting a jpg image containing malicious EXIF data. The bug exists in Exiv2::Jp2Image::readMetadata() due to a lack of proper input validation and may cause out of bounds read for the heap allocated rawData pointer. This can lead to a small leak from heap data by a few bytes, configuring a low impact confidentiality issue or, eventually, for a crash causing availability impact to the program using the library.

Comment 7 errata-xmlrpc 2021-11-09 17:34:05 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:4173 https://access.redhat.com/errata/RHSA-2021:4173

Comment 8 Product Security DevOps Team 2021-11-09 21:54:17 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):