Bug 1661608 (CVE-2018-5818)

Summary: CVE-2018-5818 LibRaw: DoS in parse_rollei function in internal/dcraw_common.cpp
Product: [Other] Security Response Reporter: Laura Pardo <lpardo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: debarshir
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: LibRaw 0.19.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-27 03:21:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1543597, 1654688, 1661609, 1661610, 1661611, 1663169, 1663170    
Bug Blocks: 1661524    

Description Laura Pardo 2018-12-21 17:58:41 UTC
LibRaw is vulnerable to a denial of service, caused by a flaw in the parse_rollei function in internal/dcraw_common.cpp. By persuading a victim to open a specially-crafted file, a remote attacker could exploit this vulnerability to cause the application to enter into an infinite loop.


References:
https://www.flexera.com/company/secunia-research/advisories/SR-2018-27.html

Comment 1 Laura Pardo 2018-12-21 17:59:03 UTC
Created LibRaw tracking bugs for this issue:

Affects: epel-6 [bug 1661611]
Affects: fedora-28 [bug 1661609]


Created mingw-LibRaw tracking bugs for this issue:

Affects: fedora-all [bug 1661610]

Comment 2 Riccardo Schirone 2019-01-03 10:26:38 UTC
Upstream patch:
https://github.com/LibRaw/LibRaw/commit/e67a9862d10ebaa97712f532eca1eb5e2e410a22

Comment 4 Riccardo Schirone 2019-01-03 11:01:46 UTC
Function parse_rollei() does not check the return value of the fgets() function and it assumes a "DSC-Image" file always have the terminator tag "EOHD". When the file terminates before finding the "EOHD" tag, parse_rollei() keeps trying to read bytes from the file and it fails, but given no check is performed, it keeps looping forever.

Comment 6 Debarshi Ray 2019-02-01 13:59:46 UTC
Fixed in LibRaw-0.19.1