Bug 1333332 (CVE-2016-4488)

Summary: CVE-2016-4488 gcc: Invalid write due to a use-after-free to array ktypevec
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: erik-fedora, gdb-bugs, jakub, jan.kratochvil, ktietz, law, mpolacek, nickc, ohudlick, rjones, rob, sergiodj, swhiteho
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: 2017-08-08 11:22:31 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: 1333388, 1333389    
Bug Blocks: 1333338    

Description Andrej Nemec 2016-05-05 10:10:23 UTC
A vulnerability was found in gcc. There is a variable ksize storing the amount of allocated memory for the array ktypevec. ksize being zero (0) indicates that some memory must be allocated upon the first write. When more memory is needed, both ksize and the memory are doubled during reallocation. At some point the memory for the array is freed (in squangle_mop_up) but the value of ksize remains. Since ksize is not 0, there is no indication that new memory must be allocated when there is another write to the array. This allows a malicious attacker to write arbitrary content to freed memory.

External references:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70481

Upstream fix:

https://gcc.gnu.org/ml/gcc-patches/2016-03/msg01687.html

Comment 1 Andrej Nemec 2016-05-05 12:11:01 UTC
Created msp430-gcc tracking bugs for this issue:

Affects: fedora-all [bug 1333388]

Comment 2 Andrej Nemec 2016-05-05 12:11:07 UTC
Created mingw-gcc tracking bugs for this issue:

Affects: epel-all [bug 1333389]

Comment 3 Raphael Sanchez Prudencio 2017-08-08 10:57:30 UTC
Statement:

Red Hat Product Security has rated this issue as having Low security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.