Bug 473463 (CVE-2008-5317)

Summary: CVE-2008-5317 lcms: unsigned -> signed integer cast issue in cmsAllocGamma
Product: [Other] Security Response Reporter: Tomas Hoger <thoger>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: andreas.bierfert, aph, kreilly, mschoene, rbiba, tbzatek
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-29 08:38:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 473469, 473470, 479384, 833921    
Bug Blocks:    
Attachments:
Description Flags
Patch used in SuSE security updates none

Description Tomas Hoger 2008-11-28 16:29:20 UTC
There was a unsigned -> signed integer cast issue in cmsAllocGamma
in src/cmsgamma.c.  The argument to this function - nEntries - may be
read from the file and not validated before cmsAllocGamma is called.
As nEntries in cmsAllocGamma is signed integer, its value may possibly
be negative and can result in an insufficient memory allocation.

This issue was fixed upstream in 1.17.

Upstream CVS commit:
http://lcms.cvs.sourceforge.net/viewvc/lcms/lcms/src/cmsgamma.c?view=diff&r1=1.16&r2=1.17

References:
http://www.openwall.com/lists/oss-security/2008/11/28/3

Comment 1 Tomas Hoger 2008-11-28 16:30:38 UTC
Created attachment 325025 [details]
Patch used in SuSE security updates

This was extracted from SuSE liblcms-1.15-32.src.rpm.  Original name of the
patch was lcms-gamma-overflow.patch.

Comment 2 Tomas Hoger 2008-11-28 16:31:07 UTC
Affected lcms versions are currently in Red Hat Enterprise Linux 5 and Fedora EPEL 4 (both based on upstream 1.15).

Comment 5 Tomas Hoger 2008-12-03 17:16:22 UTC
CVE id CVE-2008-5317 was assigned to this issue:

Integer signedness error in the cmsAllocGamma function in
src/cmsgamma.c in Little cms color engine (aka lcms) before 1.17
allows attackers to have an unknown impact via a file containing a
certain "number of entries" value, which is interpreted improperly,
leading to an allocation of insufficient memory.