Cloudanix VulnDB

CVE-2002-2439

High · 7.8

CVSS

7.8

EPSS

0.5%

Published

Oct 23, 2019

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

An old flaw in the GCC compiler could let attackers create programs that secretly allow unauthorized code execution or crashes once those programs run.

Exploit Available
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

  1. Identify target software compiled with vulnerable GCC version
  2. Craft malicious C++ source that exercises large new[] allocation
  3. Compile the source with affected GCC to produce vulnerable binary
  4. Distribute or force execution of the binary on victim systems
  5. 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