CVE-2014-5044
Critical · 9.8CVSS
9.8
EPSS
5.6%
Published
Mar 7, 2018
CISA due date
—
Cloudanix analysis
A bug in a common Fortran support library can let attackers crash programs or take them over by sending specially crafted data that breaks memory handling.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Integer overflows during array allocation in libgfortran allow memory corruption that can lead to arbitrary code execution or application crashes.
Why it matters to the business
Fortran-based scientific, engineering, or data-processing applications may crash or be fully compromised, causing service outages, incorrect results, or unauthorized access to sensitive computations.
How an attack unfolds
An attacker supplies a specially crafted Fortran array descriptor or input that triggers an integer overflow in the allocation routines, resulting in undersized or misaligned memory regions that are subsequently written to or executed from.
How to fix it
Upgrade to a patched version of libgfortran that contains bounds checks and corrected integer handling in array allocation routines; rebuild and redeploy all dependent Fortran applications.
How to confirm the fix worked
Rebuild affected applications with the updated library and execute regression tests that exercise large or boundary array allocations; monitor for crashes or memory errors during fuzzing of allocation paths.
Typical attack path
- Identify a Fortran application that uses libgfortran and processes attacker-controlled data or files.
- Craft input containing array dimensions or metadata that cause integer overflow during allocation.
- Trigger the allocation path to corrupt heap metadata or adjacent buffers.
- Leverage the corruption to hijack control flow or cause denial of service.
How to detect it
Review application logs for unexpected Fortran runtime crashes or allocation failures; inspect core dumps or memory sanitizer output for signs of heap corruption near array allocation sites.
What your security team should do
- Inventory all binaries and containers that link against libgfortran and prioritize upgrades.
- Add static analysis or compiler flags that detect integer overflow in Fortran code.
- Restrict untrusted input to Fortran applications until patches are applied.
The record
Multiple integer overflows in libgfortran might allow remote attackers to execute arbitrary code or cause a denial of service (Fortran application crash) via vectors related to array allocation.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Mageia:3 | gcc | 0 | 4.7.2-8.2.mga3 |
| Mageia:4 | gcc | 0 | 4.8.2-3.2.mga4 |
| Ubuntu:14.04:LTS | gcc-4.7 | 0 | No fix |
| Ubuntu:14.04:LTS | gcc-4.8 | 0 | 4.8.4-2ubuntu1~14.04 |
| Ubuntu:14.04:LTS | gcc-4.8-arm64-cross | 0 | 0.11.1 |
| Ubuntu:14.04:LTS | gcc-4.8-armhf-cross | 0 | 0.11.1 |
| Ubuntu:14.04:LTS | gcc-mingw-w64 | 0 | No fix |
| 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-4.8-arm64-cross | 0 | 2 |
| Ubuntu:16.04:LTS | gcc-4.8-armhf-cross | 0 | 2 |
| Ubuntu:16.04:LTS | gcc-4.8-ppc64el-cross | 0 | 2 |
| Ubuntu:16.04:LTS | gcc-arm-linux-androideabi | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-arm-none-eabi | 0 | No fix |
| Ubuntu:20.04:LTS | gcc-arm-none-eabi | 0 | 15:9-2019-q4-0ubuntu1 |
| Ubuntu:22.04:LTS | gcc-arm-none-eabi | 0 | 15:10.3-2021.07-4 |
| Ubuntu:24.04:LTS | gcc-arm-none-eabi | 0 | 15:12.2.rel1-1 |
| 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 |
Related vulnerabilities
- CVE-2023-4039 **DISPUTED**A failure in the -fstack-protector feature in GCC-based toolchains that… Also affects gcc-4.7
- CVE-2002-2439 Integer overflow in the new[] operator in gcc before 4.8.0 allows attackers to have… 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