Control-flow hijack via unguarded dynamic stack allocations
Published Sep 13, 2023 · Updated Jun 23, 2026
Protection failure in GNU Compiler Collection and Arm GNU Toolchain allows attackers to bypass AArch64 stack canaries. The AArch64 backend places dynamically allocated locals below saved registers while the canary remains above them, so a contiguous overflow can overwrite frame and link registers without touching the guard. Exploitation requires a separate overflow in a C99 variable-length array, alloca() object, or variable-sized by-value argument; bypassing the guard permits a crash or compromise of confidentiality and integrity.
Summary
What happened
Protection failure in GNU Compiler Collection and Arm GNU Toolchain allows attackers to bypass AArch64 stack canaries. The AArch64 backend places dynamically allocated locals below saved registers while the canary remains above them, so a contiguous overflow can overwrite frame and link registers without touching the guard. Exploitation requires a separate overflow in a C99 variable-length array, alloca() object, or variable-sized by-value argument; bypassing the guard permits a crash or compromise of confidentiality and integrity.
The record
- CVE
- CVE-2023-4039
- Published
- Sep 13, 2023
- Updated
- Jun 23, 2026
- Vendor
- GNU Project
- Product
- GNU Compiler Collection
- Classifications
- CWE-693
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Sep 13, 2023CVE publishedPublication date reported by the CVE source.
- Jun 23, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=All versions of GCC that target AArch64 when option -fstack-protector is used
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- AArch64 dynamic-allocation stack-protector proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo