Bug 1847133 (CVE-2020-0198) - CVE-2020-0198 libexif: integer overflow in exif_data_load_data_content function in exif-data.c
Summary: CVE-2020-0198 libexif: integer overflow in exif_data_load_data_content functi...
Status: NEW
Alias: CVE-2020-0198
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1847134 1847761 1847760
Blocks: 1847135
TreeView+ depends on / blocked
Reported: 2020-06-15 18:19 UTC by Guilherme de Almeida Suckevicz
Modified: 2020-06-18 18:07 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:

Attachments (Terms of Use)

Description Guilherme de Almeida Suckevicz 2020-06-15 18:19:34 UTC
In exif_data_load_data_content of exif-data.c, there is a possible UBSAN abort due to an integer overflow. This could lead to remote denial of service with no additional execution privileges needed. User interaction is needed for exploitation.


Comment 1 Guilherme de Almeida Suckevicz 2020-06-15 18:19:52 UTC
Created libexif tracking bugs for this issue:

Affects: fedora-all [bug 1847134]

Comment 2 Todd Cullum 2020-06-16 23:53:33 UTC
Upstream commit (different from commit linked by gsuckevi which is for the Android fork): https://github.com/libexif/libexif/commit/ce03ad7ef4e8aeefce79192bf5b6f69fae396f0c

Comment 3 Todd Cullum 2020-06-17 00:02:22 UTC
Technical summary:

exif_data_load_data_content() in libexif/exif-data.c is a recursive function which is used to read tag data. It attempted to check for integer overflow using code which could itself fail due to integer overflow. This was patched in the Android fork by using UINT_MAX in the check before adding +2 to the offset variable, and in upstream by using the CHECKOVERFLOW macro which is also used elsewhere in the library. Exploitation of this vulnerability would require a crafted input file and could lead to denial-of-service due to out-of-bounds read of the data buffer.

Comment 4 Todd Cullum 2020-06-17 00:04:07 UTC
It should also be noted that in order for this vulnerability to be exploited remotely, libexif would need to be used in a service that accepts untrusted input data from the Internet or another domain.

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