CVE-2002-2439
High · 7.8CVSS
7.8
EPSS
0.5%
Published
Oct 23, 2019
CISA due date
—
Cloudanix analysis
An old flaw in the GCC compiler could let attackers create programs that secretly allow unauthorized code execution or crashes once those programs run.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Medium
What it actually does
Integer overflow in the new[] operator implementation allows allocation of undersized buffers, resulting in subsequent memory corruption when the array is accessed.
Why it matters to the business
Organizations using unpatched GCC versions risk silent introduction of memory-safety flaws into compiled applications, enabling potential remote code execution or denial of service in production software.
How an attack unfolds
An attacker supplies specially crafted C++ source containing a large array allocation via new[] that triggers the integer overflow during compilation; the resulting binary contains an undersized buffer that the attacker later triggers at runtime to corrupt memory and achieve code execution.
How to fix it
Upgrade GCC to version 4.8.0 or later on all build systems; rebuild all affected C++ applications from source with the patched compiler; verify no pre-4.8.0 GCC remains in CI/CD pipelines or developer toolchains.
How to confirm the fix worked
Compile a test program exercising large new[] allocations with both old and new GCC versions and inspect generated assembly or use runtime instrumentation to confirm absence of the integer overflow; scan build environments for GCC versions prior to 4.8.0.
Typical attack path
- Identify target software compiled with vulnerable GCC version
- Craft malicious C++ source that exercises large new[] allocation
- Compile the source with affected GCC to produce vulnerable binary
- Distribute or force execution of the binary on victim systems
- Trigger the undersized buffer at runtime to corrupt memory and execute payload
How to detect it
Review build logs and compiler version strings in artifacts for GCC releases before 4.8.0; search source repositories for large array allocations using new[] that may have been compiled under vulnerable versions.
What your security team should do
- Immediately inventory all GCC installations and enforce minimum version 4.8.0 in build environments
- Rebuild and redeploy any software compiled with older GCC versions
- Add compiler version checks to CI/CD pipelines and developer onboarding
- Monitor for any downstream packages still shipping binaries built with pre-4.8.0 GCC
The record
Integer overflow in the new[] operator in gcc before 4.8.0 allows attackers to have unspecified impacts.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Ubuntu:14.04:LTS | gcc-4.7 | 0 | No fix |
| Ubuntu:14.04:LTS | gcc-4.8 | 0 | 4.8.2-19ubuntu1 |
| Ubuntu:14.04:LTS | gcc-mingw-w64 | 0 | No fix |
| Ubuntu:14.04:LTS | gcc-snapshot | 0 | 20140405-0ubuntu1 |
| Ubuntu:16.04:LTS | gcc-4.7 | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-4.7-armel-cross | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-4.7-armhf-cross | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-arm-linux-androideabi | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-arm-none-eabi | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-h8300-hms | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-i686-linux-android | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-mingw-w64 | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-msp430 | 0 | No fix |
| Ubuntu:18.04:LTS | gcc-arm-none-eabi | 0 | No fix |
| Ubuntu:18.04:LTS | gcc-h8300-hms | 0 | No fix |
| Ubuntu:18.04:LTS | gcc-mingw-w64 | 0 | No fix |
| Ubuntu:18.04:LTS | gcc-msp430 | 0 | No fix |
| Ubuntu:20.04:LTS | gcc-arm-none-eabi | 0 | No fix |
| Ubuntu:20.04:LTS | gcc-h8300-hms | 0 | No fix |
| Ubuntu:20.04:LTS | gcc-mingw-w64 | 0 | No fix |
| Ubuntu:20.04:LTS | gcc-msp430 | 0 | No fix |
| Ubuntu:22.04:LTS | gcc-arm-none-eabi | 0 | No fix |
| Ubuntu:22.04:LTS | gcc-h8300-hms | 0 | No fix |
| Ubuntu:22.04:LTS | gcc-mingw-w64 | 0 | No fix |
| Ubuntu:22.04:LTS | gcc-msp430 | 0 | No fix |
| Ubuntu:24.04:LTS | gcc-arm-none-eabi | 0 | No fix |
| Ubuntu:24.04:LTS | gcc-h8300-hms | 0 | No fix |
| Ubuntu:24.04:LTS | gcc-mingw-w64 | 0 | No fix |
| Ubuntu:24.10 | gcc-arm-none-eabi | 0 | No fix |
| Ubuntu:24.10 | gcc-h8300-hms | 0 | No fix |
| Ubuntu:24.10 | gcc-mingw-w64 | 0 | No fix |
| Ubuntu:25.04 | gcc-arm-none-eabi | 0 | No fix |
| Ubuntu:25.04 | gcc-h8300-hms | 0 | No fix |
| Ubuntu:25.04 | gcc-mingw-w64 | 0 | No fix |
| Ubuntu:25.10 | gcc-arm-none-eabi | 0 | No fix |
| Ubuntu:25.10 | gcc-h8300-hms | 0 | No fix |
| Ubuntu:25.10 | gcc-mingw-w64 | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | gcc-4.7 | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | gcc-mingw-w64 | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-4.7 | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-4.7-armel-cross | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-4.7-armhf-cross | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-arm-linux-androideabi | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-arm-none-eabi | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-h8300-hms | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-i686-linux-android | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-mingw-w64 | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-msp430 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | gcc-arm-none-eabi | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | gcc-h8300-hms | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | gcc-mingw-w64 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | gcc-msp430 | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | gcc-arm-none-eabi | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | gcc-h8300-hms | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | gcc-mingw-w64 | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | gcc-msp430 | 0 | No fix |
Related vulnerabilities
- CVE-2023-4039 **DISPUTED**A failure in the -fstack-protector feature in GCC-based toolchains that… Also affects gcc-4.7
- CVE-2014-5044 Multiple integer overflows in libgfortran might allow remote attackers to execute… Also affects gcc-4.7
- CVE-2017-11671 Under certain circumstances, the ix86_expand_builtin function in i386.c in GNU Compiler… Also affects gcc-4.7
- CVE-2015-5276 The std::random_device class in libstdc++ in the GNU Compiler Collection (aka GCC) before… Also affects gcc-4.7
- CVE-2016-4487 Use-after-free vulnerability in libiberty allows remote attackers to cause a denial of… Also affects gcc-arm-none-eabi
- CVE-2016-4489 Integer overflow in the gnu_special function in libiberty allows remote attackers to… Also affects gcc-arm-none-eabi
- CVE-2016-2226 Integer overflow in the string_appends function in cplus-dem.c in libiberty allows remote… Also affects gcc-arm-none-eabi
- CVE-2016-4491 The d_print_comp function in cp-demangle.c in libiberty allows remote attackers to cause… Also affects gcc-arm-none-eabi