CVE-2023-4039 — GCC's-fstack-protector fails to guard dynamically-sized local variables on AArch64
**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.
Who exploits it and how urgent it is
A 0–100 score combining confirmed exploitation, ransomware and APT use, public exploits, EPSS and severity.
How the score was calculated
- EPSS 0.8% (30-day exploitation probability)+8
- Technical severity (medium)+3
- CISA SSVC: exploitation "poc"+5
The score orders the patch queue; it does not replace your asset context (internet exposure, criticality, compensating controls).
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the sources call it.
CISA SSVC assessment CISA
Three decision points CISA publishes for the CVEs it assesses (SSVC 2.0.3). A stakeholder decision, not a severity score.
Remediation
Fixes and mitigations documented by the sources — linked to the original advisory.
- Documented patch — developer.arm.com (NIST National Vulnerability Database)
- Documented patch — github.com (NIST National Vulnerability Database)
First 24 hours
Ordered from the record’s own fields — exposure first, because you cannot patch what you have not found. A rule-generated starting point.
- Identify exposed assets running the affected vendor/product/version combinations (Arm Arm GNU Toolchain, Gnu Gcc).
- The attack is network-based and needs no privileges: restrict exposure (ACLs, VPN, WAF) until patched.
- Apply the fixed version or the patch documented under Remediation.
- Search available logs for exploit probes, errors and authentication anomalies.
Affected scope
Vendor, product and versions as the sources word them.
| Vendor | Product | Versions | Status | Source |
|---|---|---|---|---|
| Arm | Arm GNU Toolchain | version All versions where option -fstack-protector is used | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Gnu | Gcc | < 2023-09-12 | Vulnerable | NIST National Vulnerability Database |
| Gnu | Gcc | version All versions of GCC that target AArch64 when option -fstack-protector is used | Vulnerable | CVE Program (cve.org) e CISA ADP |
Attack characteristics
The CVSS vector, decoded. It describes the attack, not your exposure to it.
Every base score collected
Sources score independently and may disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Scored by |
|---|---|---|---|---|---|
| 4.8 | CVSS 3.1 | Medium | 2.2 | 2.5 | arm-security@arm.com via NIST National Vulnerability Database |
| 4.8 | CVSS 3.1 | Medium | 2.2 | 2.5 | nvd@nist.gov via NIST National Vulnerability Database |
| 4.8 | CVSS 3.1 | Medium | — | — | Arm via CVE Program (cve.org) e CISA ADP |
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N (score shown at the top: nvd@nist.gov) Weakness MITRE
Weakness class according to MITRE’s CWE catalog.
Detection
Read off the CVSS vector and the weakness class. Starting points, not tested rules.
- Prioritize edge telemetry for the network-reachable component (proxy, WAF, IDS/IPS).
Timeline
What happened to this CVE, newest first.
- 2026
- Affected products added · arm ltd/arm gnu toolchain, gnu/gcc
- SSVC assessment updated
- Record published
- Fix documented
- Affected products added · gnu/gcc
- CVSS changed · 4.8
- Source status changed · → Modified
- Record created in this database
- 2023
- CVE published
Source activity
Repeated readings are counted rather than listed.
- 1× References added · Oct 14, 2026 – Oct 14, 2026
- 1× Official description updated · Oct 14, 2026 – Oct 14, 2026
References
4 on the record
Elsewhere on this site
Related CVEs (same products)
- Medium CVE-2021-3826 Buffer Errors (Improper Restriction of Operations within Memory Bounds) in Gnu Gcc Sep 1, 2022
- Medium CVE-2022-27943 libiberty/rust-demangle.c in GNU GCC 11.2 allows stack consumption in demangle_const, as... Mar 26, 2022
- Medium CVE-2021-46195 GCC v12.0 was discovered to contain an uncontrolled recursion via the component libiberty/rust... Jan 14, 2022
- High CVE-2019-15847 The POWER9 backend in GNU Compiler Collection (GCC) before version 10 could optimize multiple... Sep 2, 2019
- High CVE-2018-12886 stack_protect_prologue in cfgexpand.c and stack_protect_epilogue in function.c in GNU Compiler... May 22, 2019
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.
Answered from this record
Text assembled only from the fields above — no additional claims.
What should defenders know first?
CVE-2023-4039 is "GCC's-fstack-protector fails to guard dynamically-sized local variables on AArch64", rated Medium. It affects Arm GNU Toolchain (Arm); versions are in the scope table. It is not in CISA KEV, which does not rule out exploitation. CVSS 4.8 describes technical severity. EPSS 0.76% estimates the probability of exploitation in 30 days; neither replaces your asset context. First verify whether exposed or business-critical assets run the affected versions, apply vendor fixes or mitigations, and preserve logs for review.
Comments
Moderated technical discussion. Read the community guidelines.
No comments yet.
Sign in or create an account to comment and suggest corrections.