Bug 1747229 (CVE-2019-14368) - CVE-2019-14368 exiv2: Heap-based buffer over-read in Exiv2::RafImage::readMetadata() in rafimage.cpp
Summary: CVE-2019-14368 exiv2: Heap-based buffer over-read in Exiv2::RafImage::readMet...
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2019-14368
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: 1747230
Blocks: 1747233
TreeView+ depends on / blocked
 
Reported: 2019-08-30 00:30 UTC by Pedro Sampaio
Modified: 2019-09-27 12:45 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-27 12:45:36 UTC
Embargoed:


Attachments (Terms of Use)

Description Pedro Sampaio 2019-08-30 00:30:16 UTC
Exiv2 0.27.99.0 has a heap-based buffer over-read in Exiv2::RafImage::readMetadata() in rafimage.cpp.

Upstream bug:

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

Comment 1 Pedro Sampaio 2019-08-30 00:30:26 UTC
Created exiv2 tracking bugs for this issue:

Affects: fedora-all [bug 1747230]

Comment 2 Riccardo Schirone 2019-09-27 09:35:27 UTC
Upstream fix:
https://github.com/Exiv2/exiv2/commit/bd0afe0390439b2c424d881c8c6eb0c5624e31d9

same fix as CVE-2019-13504

Comment 3 Riccardo Schirone 2019-09-27 09:35:42 UTC
This bug has the same root cause as CVE-2019-13504. From bug 1729034 comment 4:
> When seeking in MemIo (code in MemIo::Impl::seek) the new position is not 
> properly checked, thus it is possible to move the current position beyond 
> the limits of the memory buffer. If a read is done later (code in MemIo::Impl::read) 
> the maximum number of bytes to read is computed by subtracting the current position 
> value from the buffer's size value. When these two values are implemented as
> unsigned values (e.g. size_t), the computation may wraparound and more data than
> what really available would be reported, making it possible to read beyond the 
> buffer's limits.

Comment 4 Riccardo Schirone 2019-09-27 09:36:59 UTC
The flaw seems to be introduced in commit https://github.com/Exiv2/exiv2/commit/c72d16f4c402a8acc2dfe06fe3d58bf6cf99069e, where MemIo::Impl fields were changed from long to size_t.

Comment 5 Product Security DevOps Team 2019-09-27 12:45:36 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-14368


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