Bug 1661520 (CVE-2018-5809) - CVE-2018-5809 LibRaw: stack-based buffer overflow in LibRaw::parse_exif() and subsequently execute arbitrary code
Summary: CVE-2018-5809 LibRaw: stack-based buffer overflow in LibRaw::parse_exif() and...
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2018-5809
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1661521
Blocks: 1661524
TreeView+ depends on / blocked
 
Reported: 2018-12-21 13:01 UTC by Laura Pardo
Modified: 2021-02-16 22:36 UTC (History)
1 user (show)

Fixed In Version: LibRaw 0.18.9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-03 09:38:14 UTC
Embargoed:


Attachments (Terms of Use)

Description Laura Pardo 2018-12-21 13:01:10 UTC
A flaw was found in LibRaw versions prior to 0.18.9. An error within the "LibRaw::parse_exif()" function (internal/dcraw_common.cpp) can be exploited to cause a stack-based buffer overflow and subsequently execute arbitrary code. 


References:
https://github.com/LibRaw/LibRaw/blob/master/Changelog.txt 
https://secuniaresearch.flexerasoftware.com/advisories/81800/ 
https://secuniaresearch.flexerasoftware.com/secunia_research/2018-9/

Upstream Patch:
https://github.com/LibRaw/LibRaw/commit/fd6330292501983ac75fe4162275794b18445bd9

Comment 1 Laura Pardo 2018-12-21 13:01:29 UTC
Created LibRaw tracking bugs for this issue:

Affects: epel-6 [bug 1661521]

Comment 2 Riccardo Schirone 2019-01-03 09:17:58 UTC
Increase Impact of the flaw to Important and set C:H/I:H/A:H because arbitrary code execution may be possible on affected versions.

Comment 3 Riccardo Schirone 2019-01-03 09:34:25 UTC
Function parse_exif() in internal/dcraw_common.cpp does not check the "len" variable when tag is equal to 37500 and it may reads more than 512 bytes in the mn_text array, causing a stack-based buffer overflow and subsequently execute arbitrary code.

Comment 4 Riccardo Schirone 2019-01-03 09:37:32 UTC
Statement:

This issue did not affect the versions of LibRaw as shipped with Red Hat Enterprise Linux 7 as the vulnerable code is not present.


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