Bug 1852487 (CVE-2020-0093)

Summary: CVE-2020-0093 libexif: out of bounds read due to a missing bounds check in exif_data_save_data_entry function in exif-data.c
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: ajax, caillon+fedoraproject, gnome-sig, john.j5live, rdieter, rhbugs, rhughes, rstrode, sandmann, thomasj, yselkowi
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: libexif 0.6.22 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 22:02:03 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: 1852489, 1853107, 1853108    
Bug Blocks: 1852493    

Description Guilherme de Almeida Suckevicz 2020-06-30 14:22:07 UTC
In exif_data_save_data_entry of exif-data.c, there is a possible out of bounds read due to a missing bounds check. This could lead to local information disclosure with no additional execution privileges needed. User interaction is needed for exploitation.


Comment 1 Guilherme de Almeida Suckevicz 2020-06-30 14:22:38 UTC
Created libexif tracking bugs for this issue:

Affects: fedora-all [bug 1852489]

Comment 2 Todd Cullum 2020-07-01 23:16:32 UTC
Technical Summary:

In exif_data_save_data_entry(), data is copied using memcpy(), from e->data, using a size computation that relies on the standard format size multiplied by the number of components. In the case where the actual entry size (e->size) was smaller than this computed value, there could be a buffer overread that would leak out-of-bounds data into an EXIF entry. The patch ensures that the length passed to memcpy() cannot exceed the actual entry size.

Comment 4 Todd Cullum 2020-07-06 17:32:00 UTC
FYI the upstream patch is identical to the Android fork patch in this case: https://github.com/libexif/libexif/commit/5ae5973bed1947f4d447dc80b76d5cefadd90133 .

Comment 5 errata-xmlrpc 2020-09-29 20:50:50 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 6 Product Security DevOps Team 2020-09-29 22:02:03 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):


Comment 7 errata-xmlrpc 2020-11-04 03:43:24 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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