Bug 1333330 (CVE-2016-4487) - CVE-2016-4487 gcc: Invalid write due to a use-after-free to array btypevec
Summary: CVE-2016-4487 gcc: Invalid write due to a use-after-free to array btypevec
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2016-4487
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1333388 1333389
Blocks: 1333338
TreeView+ depends on / blocked
 
Reported: 2016-05-05 10:07 UTC by Andrej Nemec
Modified: 2021-02-17 03:55 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-08 10:55:52 UTC
Embargoed:


Attachments (Terms of Use)

Description Andrej Nemec 2016-05-05 10:07:19 UTC
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

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

Affects: fedora-all [bug 1333388]

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

Affects: epel-all [bug 1333389]

Comment 3 Raphael Sanchez Prudencio 2017-08-08 10:56:04 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/.


Note You need to log in before you can comment on or make changes to this bug.