GCC's-fstack-protector fails to guard dynamically-sized local variables on AArch64
Summary
| CVE | CVE-2023-4039 |
|---|---|
| State | PUBLISHED |
| Assigner | Arm |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2023-09-13 09:15:15 UTC |
| Updated | 2026-06-23 18:17:35 UTC |
| Description | **DISPUTED**A failure in the -fstack-protector feature in GCC-based toolchains that target AArch64 allows an attacker to exploit an existing buffer overflow in dynamically-sized local variables in your application without this being detected. This stack-protector failure only applies to C99-style dynamically-sized local variables or those created using alloca(). The stack-protector operates as intended for statically-sized local variables. The default behavior when the stack-protector detects an overflow is to terminate your application, resulting in controlled loss of availability. An attacker who can exploit a buffer overflow without triggering the stack-protector might be able to change program flow control to cause an uncontrolled loss of availability or to go further and affect confidentiality or integrity. NOTE: The GCC project argues that this is a missed hardening bug and not a vulnerability by itself. |
Risk And Classification
Primary CVSS: v3.1 4.8 MEDIUM from [email protected]
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
EPSS: 0.006660000 probability, percentile 0.471630000 (date 2026-06-28)
Problem Types: CWE-693 | NVD-CWE-Other | CWE-693 CWE-693 Protection Mechanism Failure
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Primary | 4.8 | MEDIUM | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N |
| 3.1 | [email protected] | Secondary | 4.8 | MEDIUM | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N |
| 3.1 | CNA | CVSS | 4.8 | MEDIUM | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
HighPrivileges Required
NoneUser Interaction
NoneScope
UnchangedConfidentiality
LowIntegrity
LowAvailability
NoneCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
NVD Known Affected Configurations (CPE 2.3)
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Arm Ltd | Arm GNU Toolchain | affected All versions where option -fstack-protector is used | Not specified |
| CNA | GNU | GCC | affected All versions of GCC that target AArch64 when option -fstack-protector is used | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| GCC's -fstack-protector fails to guard dynamic stack allocations on ARM64 · Advisory · metaredteam/external-disclosures · GitHub | af854a3a-2127-422b-91ae-364da2661108 | github.com | Exploit, Patch, Third Party Advisory |
| GCC Stack Protector Vulnerability AArch64 | af854a3a-2127-422b-91ae-364da2661108 | developer.arm.com | Exploit, Patch, Third Party Advisory |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: Tom Hebb from Meta Red Team X and Maria Markstedter from Azeria Labs (en)
Additional Advisory Data
Solutions
CNA: Recompile vulnerable code using an updated toolchain.
Legacy QID Mappings
- 505870 Alpine Linux Security Update for gcc
- 673474 EulerOS Security Update for gcc (EulerOS-SA-2024-1103)
- 673525 EulerOS Security Update for gcc (EulerOS-SA-2024-1265)
- 673590 EulerOS Security Update for gcc (EulerOS-SA-2023-3328)
- 673609 EulerOS Security Update for gcc (EulerOS-SA-2023-3296)
- 673672 EulerOS Security Update for gcc (EulerOS-SA-2023-3174)
- 673734 EulerOS Security Update for gcc (EulerOS-SA-2023-3209)
- 673783 EulerOS Security Update for gcc (EulerOS-SA-2024-1118)
- 754856 SUSE Enterprise Linux Security Update for gcc12 (SUSE-SU-2023:3640-1)
- 754865 SUSE Enterprise Linux Security Update for gcc7 (SUSE-SU-2023:3686-1)
- 755132 SUSE Enterprise Linux Security Update for gcc13 (SUSE-SU-2023:4162-1)
- 755209 SUSE Enterprise Linux Security Update for gcc13 (SUSE-SU-2023:4287-1)
- 755216 SUSE Enterprise Linux Security Update for gcc13 (SUSE-SU-2023:4287-2)
- 755271 SUSE Enterprise Linux Security Update for gcc13 (SUSE-SU-2023:4458-1)
- 755285 SUSE Enterprise Linux Security Update for gcc13 (SUSE-SU-2023:4480-1)
- 755854 SUSE Enterprise Linux Security Update for gcc12 (SUSE-SU-2023:3661-1)
- 755898 SUSE Enterprise Linux Security Update for gcc7 (SUSE-SU-2023:3662-1)
- 907319 Common Base Linux Mariner (CBL-Mariner) Security Update for gcc (28769-1)