Bug 1193439

Summary: flac: NULL pointer dereference and integer underflow in EncoderSession_init_encoder()
Product: [Other] Security Response Reporter: Vasyl Kaigorodov <vkaigoro>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: mlichvar
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: 2015-02-26 09:43:14 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: 1193445    
Bug Blocks: 1193444    

Description Vasyl Kaigorodov 2015-02-17 10:51:27 UTC
It was reported [1] that flac crashes on processing a crafted [2] file.

Related code:
  src/flac/encoder.c line:1878
    Function EncoderSession_init_encoder()

[1]: http://sourceforge.net/p/flac/bugs/425/
[2]: http://sourceforge.net/projects/pocfiles/files/t2.flac/download

Comment 1 Vasyl Kaigorodov 2015-02-17 10:57:01 UTC
Created flac tracking bugs for this issue:

Affects: fedora-all [bug 1193445]

Comment 3 Tomas Hoger 2015-02-26 14:45:38 UTC
This is a NULL pointer dereference (cs->tracks is NULL) combined with integer underflow issue (cs->num_tracks is 0, so cs->num_tracks - 1 underflows) that leads to out of bounds read.  The flaw is in the flac command line tool rather than libFLAC library.

Fixed upstream in:
https://git.xiph.org/?p=flac.git;a=commitdiff;h=c06a44969c1145242a22f75fc8fb2e8b54c55303

Affects the currently latest upstream version 1.3.1.