Medium severity · published Sep 13, 2023
CVE-2023-4039
GCC's-fstack-protector fails to guard dynamically-sized local variables on AArch64
4.8
CVSS
1%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Attack vector
Network
Complexity
High
Privileges
None
User interaction
None
Confidentiality
Low
Integrity
Low
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)1.0% · higher than 64% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
AG
Arm GNU Toolchain · Arm Ltd
All versions where option -fstack-protector is used · source: vendor
GC
GCC · GNU
All versions of GCC that target AArch64 when option -fstack-protector is used · source: vendor, NVD
RR
RUGGEDCOM RST2428P · Siemens
before V3.2 · source: CISA
SX
SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family · Siemens
before V3.2 · source: CISA
SX
SCALANCE XCM-/XRM-/XCH-/XRH-300 family · Siemens
before V3.2 · source: CISA
SS
SIMATIC S7-1500 CPU 1518-4 PN/DP MFP · Siemens
V3.1.0 before V3.1.5; V3.1.0 before V3.1.5 · source: CISA
SS
SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP · Siemens
V3.1.0 before V3.1.5; V3.1.0 before V3.1.5 · source: CISA
SS
SIPLUS S7-1500 CPU 1518-4 PN/DP MFP · Siemens
V3.1.0 before V3.1.5 · source: CISA
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2023-4039
CVE.org
https://www.cve.org/CVERecord?id=CVE-2023-4039
Exploit
https://developer.arm.com/Arm%20Security%20Center/GCC%20Stack%20Protector%20Vulnerability%20AArch64
Exploit
https://github.com/metaredteam/external-disclosures/security/advisories/GHSA-x7ch-h5rf-w2mf
cert-portal.siemens.com
https://cert-portal.siemens.com/productcert/html/ssa-355557.html
cert-portal.siemens.com
https://cert-portal.siemens.com/productcert/html/ssa-398330.html
