Bug 1661612 (CVE-2018-5817)

Summary: CVE-2018-5817 LibRaw: DoS in unpacked_load_raw 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 NOTABUG 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: 2020-04-22 10:31:52 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: 1654688, 1661613, 1661614, 1661615, 1663174    
Bug Blocks: 1661524    

Description Laura Pardo 2018-12-21 18:02:32 UTC
LibRaw is vulnerable to a denial of service, caused by an error in the unpacked_load_raw 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 18:02:57 UTC
Created LibRaw tracking bugs for this issue:

Affects: epel-6 [bug 1661615]
Affects: fedora-28 [bug 1661613]


Created mingw-LibRaw tracking bugs for this issue:

Affects: fedora-all [bug 1661614]

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

Comment 4 Riccardo Schirone 2019-01-03 11:17:10 UTC
Function unpacked_load_raw() execute "maximum"-times a simple loop, where "maximum" is variable set during the identify() function. A crafted raw image may set it to a very high value, resulting in a very long time to parse the image.

Comment 5 Riccardo Schirone 2019-01-03 11:17:54 UTC
Statement:

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

Comment 6 Debarshi Ray 2019-02-01 14:07:59 UTC
Fixed in LibRaw-0.19.1

Comment 7 Product Security DevOps Team 2020-04-22 10:31:52 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-2018-5817