Bug 1659627 (CVE-2018-19661)

Summary: CVE-2018-19661 libsndfile: buffer over-read in the function i2ulaw_array in ulaw.c
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: mhlavink
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-27 03:19:10 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: 1659628, 1673083, 1673084    
Bug Blocks: 1659634    

Description Laura Pardo 2018-12-14 20:37:15 UTC
An issue was discovered in libsndfile 1.0.28. There is a buffer over-read in the function i2ulaw_array in ulaw.c that will lead to a denial of service. 

References:
https://github.com/erikd/libsndfile/issues/429

Comment 1 Laura Pardo 2018-12-14 20:37:35 UTC
Created libsndfile tracking bugs for this issue:

Affects: fedora-all [bug 1659628]

Comment 3 Riccardo Schirone 2019-02-06 16:04:10 UTC
Functions i2ulaw_array() in ulaw.c and i2alaw_array() in alaw.c use an attacker-controlled value to index a global array, however when the value is negative they get the opposite, which is undefined behaviour in case the original value is INT_MIN. Thus those functions could access some elements outside the limits of the ulaw_encode/alaw_encode buffers.