Bug 1661604 (CVE-2018-5819)

Summary: CVE-2018-5819 LibRaw: DoS in parse_sinar_ia 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:23 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, 1661605, 1661606, 1661607, 1663163, 1663164    
Bug Blocks: 1661524    

Description Laura Pardo 2018-12-21 17:55:20 UTC
LibRaw is vulnerable to a denial of service, caused by a flaw in the parse_sinar_ia 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 a denial of service condition.


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

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

Affects: epel-6 [bug 1661607]
Affects: fedora-28 [bug 1661605]


Created mingw-LibRaw tracking bugs for this issue:

Affects: fedora-all [bug 1661606]

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

Comment 3 Riccardo Schirone 2019-01-03 10:31:32 UTC
Function parse_sinar_ia() execute a loop for X times, where X is read from the file and is not properly checked. By providing a very large number (or a negative one) it is possible to execute the loop many time and waste resources.

Comment 7 Debarshi Ray 2019-02-01 13:54:15 UTC
Fixed in LibRaw-0.19.1

Comment 8 Riccardo Schirone 2020-04-21 11:11:19 UTC
CVE-2018-5819 has been resolved in Red Hat Enterprise Linux 7 as part of advisory https://access.redhat.com/errata/RHBA-2019:2044 .