CVE-2023-4039 GCC's-fstack-protector fails to guard dynamically-sized local variables on AArch64
GCC's stack protector fails to detect overflows in dynamically-sized local variables on AArch64, allowing attackers to bypass security checks and potentially execute code.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-4039?
CVE-2023-4039 is a medium-severity vulnerability in Arm GNU Toolchain, published on 13 Sep 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-693
Which versions are affected by CVE-2023-4039?
It affects 1 product.
Linux distribution packages (40)
cross-nvptx-gcc12 SUSE:Enterprise Storage 7 | All versions | 12.3.0+git1204-150000.1.16.1 |
gcc12 SUSE:Enterprise Storage 7 | All versions | 12.3.0+git1204-150000.1.16.1 |
cross-nvptx-gcc13 SUSE:Enterprise Storage 7.1 | All versions | 13.2.1+git7813-150000.1.6.1 |
gcc13 SUSE:Enterprise Storage 7.1 | All versions | 13.2.1+git7813-150000.1.6.1 |
cross-nvptx-gcc12 SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 12.3.0+git1204-150000.1.16.1 |
cross-nvptx-gcc13 SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 13.2.1+git7813-150000.1.6.1 |
gcc12 SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 12.3.0+git1204-150000.1.16.1 |
gcc12-testresults SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 12.3.0+git1204-150000.1.16.1 |
gcc13 SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 13.2.1+git7813-150000.1.6.1 |
cross-nvptx-gcc12 SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 12.3.0+git1204-150000.1.16.1 |
cross-nvptx-gcc13 SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 13.2.1+git7813-150000.1.6.1 |
gcc12 SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 12.3.0+git1204-150000.1.16.1 |
gcc13 SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 13.2.1+git7813-150000.1.6.1 |
cross-nvptx-gcc12 SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 12.3.0+git1204-150000.1.16.1 |
cross-nvptx-gcc13 SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 13.2.1+git7813-150000.1.6.1 |
gcc12 SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 12.3.0+git1204-150000.1.16.1 |
gcc13 SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 13.2.1+git7813-150000.1.6.1 |
cross-nvptx-gcc12 SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 12.3.0+git1204-150000.1.16.1 |
cross-nvptx-gcc13 SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 13.2.1+git7813-150000.1.6.1 |
gcc12 SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 12.3.0+git1204-150000.1.16.1 |
gcc13 SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 13.2.1+git7813-150000.1.6.1 |
gcc12 SUSE:Linux Enterprise Installer Updates 15 SP1 | All versions | 12.3.0+git1204-150000.1.16.1 |
gcc13 SUSE:Linux Enterprise Installer Updates 15 SP1 | All versions | 13.2.1+git7813-150000.1.6.1 |
gcc12 SUSE:Linux Enterprise Installer Updates 15 SP2 | All versions | 12.3.0+git1204-150000.1.16.1 |
gcc13 SUSE:Linux Enterprise Installer Updates 15 SP2 | All versions | 13.2.1+git7813-150000.1.3.3 |
gcc13 SUSE:Linux Enterprise Installer Updates 15 SP2 | All versions | 13.2.1+git7813-150000.1.6.1 |
gcc12 SUSE:Linux Enterprise Installer Updates 15 SP3 | All versions | 12.3.0+git1204-150000.1.16.1 |
gcc13 SUSE:Linux Enterprise Installer Updates 15 SP3 | All versions | 13.2.1+git7813-150000.1.3.3 |
gcc13 SUSE:Linux Enterprise Installer Updates 15 SP3 | All versions | 13.2.1+git7813-150000.1.6.1 |
gcc12 SUSE:Linux Enterprise Installer Updates 15 SP4 | All versions | 12.3.0+git1204-150000.1.16.1 |
gcc13 SUSE:Linux Enterprise Installer Updates 15 SP4 | All versions | 13.2.1+git7813-150000.1.3.3 |
gcc13 SUSE:Linux Enterprise Installer Updates 15 SP4 | All versions | 13.2.1+git7813-150000.1.6.1 |
gcc13 SUSE:Linux Enterprise Installer Updates 15 SP5 | All versions | 13.2.1+git7813-150000.1.3.3 |
gcc13 SUSE:Linux Enterprise Installer Updates 15 SP5 | All versions | 13.2.1+git7813-150000.1.6.1 |
gcc12 SUSE:Linux Enterprise Micro 5.1 | All versions | 12.3.0+git1204-150000.1.16.1 |
gcc13 SUSE:Linux Enterprise Micro 5.1 | All versions | 13.2.1+git7813-150000.1.3.3 |
gcc13 SUSE:Linux Enterprise Micro 5.1 | All versions | 13.2.1+git7813-150000.1.6.1 |
gcc12 SUSE:Linux Enterprise Micro 5.2 | All versions | 12.3.0+git1204-150000.1.16.1 |
gcc13 SUSE:Linux Enterprise Micro 5.2 | All versions | 13.2.1+git7813-150000.1.3.3 |
gcc13 SUSE:Linux Enterprise Micro 5.2 | All versions | 13.2.1+git7813-150000.1.6.1 |
Products include Gnu Gcc.
How do I fix CVE-2023-4039?
Apply the vendor's patch.
Is CVE-2023-4039 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-4039 exists.
Other vulnerabilities in Arm GNU Toolchain
Sources
Also known as ALPINE-CVE-2023-4039, AZL-28769, AZL-34695, DEBIAN-CVE-2023-4039, ECHO-4f67-4add-cfdb, MINI-8q24-vc8f-v8x5 and 14 more.