LiveActive security incident?Get immediate response
CVE Record

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.

MediumCVSS 4.8Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2023-4039 concerns a disputed weakness in stack-protection hardening for AArch64 builds. In certain programs using dynamically sized local variables, GCC-style stack protection may not detect an existing buffer overflow. By itself, this does not create a bug, but it can reduce protection if vulnerable code already exists.

Executive priority

Treat as a defense-in-depth gap, not an emergency standalone compromise. Prioritize teams shipping AArch64 native software, embedded firmware, appliances, or cloud workloads where C/C++ memory safety issues would be business-critical.

Technical view

The issue affects AArch64-targeting GCC-based toolchains when -fstack-protector is used with C99 variable-length arrays or alloca() locals. Statically sized locals are described as protected as intended. The GCC project disputes treating this as a standalone vulnerability, calling it a missed hardening issue. CVSS is 4.8, medium.

Likely exposure

Exposure is most relevant to organizations building AArch64 software with Arm GNU Toolchain or GCC-based toolchains using -fstack-protector, where code contains dynamically sized local variables. Risk depends on whether exploitable buffer overflows exist in the compiled application.

Exploitation context

No active exploitation is identified in the provided sources, and the CVE is not in KEV. Exploitation would require an underlying buffer overflow in affected application code. The weakness may prevent stack protector termination, potentially allowing more serious impact than a controlled crash.

Researcher notes

The record is disputed. The key research question is whether application code has an exploitable overflow involving dynamically sized stack objects. Sources do not name a universal patch. Avoid overstating impact without confirming AArch64, stack-protector use, dynamic stack locals, and a real memory-safety bug.

Mitigation direction

  • Check Arm and toolchain vendor guidance for updates or recommended actions.
  • Inventory AArch64 builds that use -fstack-protector.
  • Audit security-sensitive code for variable-length arrays and alloca() usage.
  • Fix underlying buffer overflows; do not rely solely on stack protector.
  • Consider reducing dynamic stack allocation where practical.

Validation and detection

  • Confirm whether affected binaries target AArch64.
  • Verify whether builds use -fstack-protector.
  • Review source for C99 variable-length arrays and alloca().
  • Prioritize review of code handling untrusted input.
  • Track vendor advisories for clarified affected versions and fixes.
Prepared
Confidence
medium
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-693: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2023-4039 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
4.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
3Timeline events
2ADP providers
3Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: noTechnical Impact: partial

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
4.8CVSS 3.1MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N2.22.5Arm

Vulnerability scoring details

Base CVSS 3.1 score

4.8Medium
CVSS 3.1 vector shape for CVE-2023-4039Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CVECVE Program Container
CISA-ADPCISA ADP Vulnrichment
other:ssvc
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
Arm LtdArm GNU ToolchainAll versions where option -fstack-protector is usedaffected
GNUGCCAll versions of GCC that target AArch64 when option -fstack-protector is usedunaffected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-693 · source CWE mapping

Protection Mechanism Failure

Protection Mechanism Failure represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.