Bug 978813 (CVE-2016-4487) - VUL-1: CVE-2016-4487: gcc: Invalid write due to a use-after-free to array btypevec
Summary: VUL-1: CVE-2016-4487: gcc: Invalid write due to a use-after-free to array bty...
Status: RESOLVED FIXED
Alias: CVE-2016-4487
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P4 - Low : Minor
Target Milestone: ---
Assignee: Michael Matz
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/168626/
Whiteboard: CVSSv2:SUSE:CVE-2016-4487:2.6:(AV:N/...
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-06 10:14 UTC by Alexander Bergmann
Modified: 2023-02-08 16:51 UTC (History)
2 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Bergmann 2016-05-06 10:14:34 UTC
rh#1333330 / CVE-2016-4487

A vulnerability was found in gcc. There is a variable bsize storing the amount of allocated memory for the array btypevec. bsize being zero (0) indicates that some memory must be allocated upon the first write. When more memory is needed, both bsize 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 bsize remains. Since bsize is not 0, there is no indication that new memory must be allocated when there is another write to the array. This results in NULL being written to the 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

References:
https://bugzilla.redhat.com/show_bug.cgi?id=1333330
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-4487
http://seclists.org/oss-sec/2016/q2/240
Comment 1 Swamp Workflow Management 2016-05-06 22:00:30 UTC
bugbot adjusting priority
Comment 2 Sebastian Krahmer 2016-05-09 12:26:33 UTC
Bug in name demangling -> VUL-1
Comment 3 Michael Matz 2023-02-08 16:51:18 UTC
Fixed since a long time.  (when libiberty, and hence binutils was affected: by version updates to binutils for sle-12 and sle-15 and sle-11 wontfix)