Bug 978814 - (CVE-2016-4488) VUL-1: CVE-2016-4488: gcc: Invalid write due to a use-after-free to array ktypevec
(CVE-2016-4488)
VUL-1: CVE-2016-4488: gcc: Invalid write due to a use-after-free to array kty...
Status: NEW
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P3 - Medium : Normal
: ---
Assigned To: Michael Matz
Security Team bot
https://smash.suse.de/issue/168624/
CVSSv2:SUSE:CVE-2016-4488:5.1:(AV:N/...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-06 10:14 UTC by Alexander Bergmann
Modified: 2020-06-29 06:24 UTC (History)
3 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:39 UTC
rh#1333332 / CVE-2016-4488

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

References:
https://bugzilla.redhat.com/show_bug.cgi?id=1333332
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-4488
http://seclists.org/oss-sec/2016/q2/240
Comment 1 Swamp Workflow Management 2016-05-06 22:00:41 UTC
bugbot adjusting priority
Comment 2 Sebastian Krahmer 2016-05-09 12:12:44 UTC
Bug in symbol name de-mangling -> VUL-1.
Comment 3 Richard Biener 2016-08-17 13:07:12 UTC
The cited bug affects the libstdc++ demangler and thus libstdc++.so and
libsupc++.a.  The bug was fixed on the GCC 5 branch after the last update
to the toolchain module and the fix will be included in the GCC 6 toolchain
module release upcoming (and thus the system libstdc++.so).

Note that the copies in static libraries of older GCC do not get updated with the
system runtime.

Note that bugs in the libstdc++ demangler are not as serious as those in the
libiberty demangler which gets used by various tools such as gdb or nm.

Any update to GCC 5 should wait until after the GCC 6 toochain release to
lessen the burden on QA (it no longer replaces the system runtime).