Bug 1852490 (CVE-2020-0182) - CVE-2020-0182 libexif: out of bounds read due to a missing bounds check in exif_entry_get_value function in exif-entry.c
Summary: CVE-2020-0182 libexif: out of bounds read due to a missing bounds check in ex...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2020-0182
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: 1852491 1853460 1853461
Blocks: 1852493
TreeView+ depends on / blocked
 
Reported: 2020-06-30 14:27 UTC by Guilherme de Almeida Suckevicz
Modified: 2021-02-16 19:44 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 22:02:05 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:4040 0 None None None 2020-09-29 20:50:57 UTC
Red Hat Product Errata RHSA-2020:4766 0 None None None 2020-11-04 03:43:26 UTC

Description Guilherme de Almeida Suckevicz 2020-06-30 14:27:45 UTC
In exif_entry_get_value of exif-entry.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 not needed for exploitation.

References:
https://source.android.com/security/bulletin/pixel/2020-06-01
https://android.googlesource.com/platform/external/libexif/+/4b7b14770c4290eaeaebadf0e99ffdfdbd8f725c

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

Affects: fedora-all [bug 1852491]

Comment 2 Todd Cullum 2020-07-02 18:04:52 UTC
There is a possible small out-of-bounds read in exif_entry_get_value() in cases where entry->data is not NULL-terminated or smaller than 7 bytes in length. This is because the standard does not require the entry->data to be NULL terminated or a specific length. Since the code checked for example, strncmp ((char *)entry->data, "Minolta", 7)), there was a possibility of a limited out-of-bounds read here. The patch ensures that before strncmp() is called, the entry size is large enough to not read out-of-bounds data. Information disclosure is very limited here though for each entry because there is already a hardcoded relatively small value passed to strncmp() in the lenth parameter. This could likely also cause functional issues in cases where the strncmp() fails due to an unexpected entry->data string.

Comment 4 Todd Cullum 2020-07-02 18:10:52 UTC
Mitigation:

This flaw could be mitigated by not passing untrusted input to libexif.

Comment 7 errata-xmlrpc 2020-09-29 20:51:01 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 8 Product Security DevOps Team 2020-09-29 22:02:05 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-2020-0182

Comment 9 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


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