{"id":"CVE-2023-4039","revision":"d2e0379e3c9d41be8fd7ee0361946988","records":[{"revision":"d2e0379e3c9d41be8fd7ee0361946988","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2023-4039","aliases":[],"title":"GCC's-fstack-protector fails to guard dynamically-sized local variables on AArch64","description":"**DISPUTED**A failure in the -fstack-protector feature in GCC-based toolchains \nthat target AArch64 allows an attacker to exploit an existing buffer \noverflow in dynamically-sized local variables in your application \nwithout this being detected. This stack-protector failure only applies \nto C99-style dynamically-sized local variables or those created using \nalloca(). The stack-protector operates as intended for statically-sized \nlocal variables.\n\nThe default behavior when the stack-protector \ndetects an overflow is to terminate your application, resulting in \ncontrolled loss of availability. An attacker who can exploit a buffer \noverflow without triggering the stack-protector might be able to change \nprogram flow control to cause an uncontrolled loss of availability or to\n 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.","state":0,"publishedAt":"2023-09-13T08:05:10.274+00:00","modifiedAt":"2026-10-14T21:23:13.065+00:00","affected":[{"ecosystem":"Vendor product","name":"Arm GNU Toolchain","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"defaultStatus\": \"affected\",\n                    \"product\": \"Arm GNU Toolchain\",\n                    \"vendor\": \"Arm Ltd\",\n                    \"versions\": [\n                        {\n                            \"status\": \"affected\",\n                            \"version\": \"All versions where option -fstack-protector is used\"\n                        }\n                    ]\n                }"},{"ecosystem":"Vendor product","name":"GCC","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"defaultStatus\": \"unaffected\",\n                    \"product\": \"GCC\",\n                    \"vendor\": \"GNU\",\n                    \"versions\": [\n                        {\n                            \"status\": \"affected\",\n                            \"version\": \"All versions of GCC that target AArch64 when option -fstack-protector is used\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","score":4.8,"severity":"MEDIUM"}],"references":["https://developer.arm.com/Arm%20Security%20Center/GCC%20Stack%20Protector%20Vulnerability%20AArch64","https://github.com/metaredteam/external-disclosures/security/advisories/GHSA-x7ch-h5rf-w2mf"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2023-4039","license":"CVE Program Terms of Use","key":"cve-program:CVE-2023-4039","identifiers":["CVE-2023-4039"]},"retained":false,"historicalAffected":[]}],"coverage":[]}