{"api_version":"1","generated_at":"2026-04-22T23:09:34+00:00","cve":"CVE-2023-4039","urls":{"html":"https://cve.report/CVE-2023-4039","api":"https://cve.report/api/cve/CVE-2023-4039.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2023-4039","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2023-4039"},"summary":{"title":"CVE-2023-4039","description":"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.","state":"PUBLIC","assigner":"arm-security@arm.com","published_at":"2023-09-13 09:15:00","updated_at":"2023-09-14 20:01:00"},"problem_types":["NVD-CWE-Other"],"metrics":[],"references":[{"url":"https://github.com/metaredteam/external-disclosures/security/advisories/GHSA-x7ch-h5rf-w2mf","name":"https://github.com/metaredteam/external-disclosures/security/advisories/GHSA-x7ch-h5rf-w2mf","refsource":"MISC","tags":[],"title":"GCC's -fstack-protector fails to guard dynamic stack allocations on ARM64 · Advisory · metaredteam/external-disclosures · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://developer.arm.com/Arm%20Security%20Center/GCC%20Stack%20Protector%20Vulnerability%20AArch64","name":"https://developer.arm.com/Arm%20Security%20Center/GCC%20Stack%20Protector%20Vulnerability%20AArch64","refsource":"MISC","tags":[],"title":"GCC Stack Protector Vulnerability AArch64","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-4039","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-4039","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2023","cve_id":"4039","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"gnu","cpe5":"gcc","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"arm64","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2023-4039","qid":"505870","title":"Alpine Linux Security Update for gcc"},{"cve":"CVE-2023-4039","qid":"673474","title":"EulerOS Security Update for gcc (EulerOS-SA-2024-1103)"},{"cve":"CVE-2023-4039","qid":"673525","title":"EulerOS Security Update for gcc (EulerOS-SA-2024-1265)"},{"cve":"CVE-2023-4039","qid":"673590","title":"EulerOS Security Update for gcc (EulerOS-SA-2023-3328)"},{"cve":"CVE-2023-4039","qid":"673609","title":"EulerOS Security Update for gcc (EulerOS-SA-2023-3296)"},{"cve":"CVE-2023-4039","qid":"673672","title":"EulerOS Security Update for gcc (EulerOS-SA-2023-3174)"},{"cve":"CVE-2023-4039","qid":"673734","title":"EulerOS Security Update for gcc (EulerOS-SA-2023-3209)"},{"cve":"CVE-2023-4039","qid":"673783","title":"EulerOS Security Update for gcc (EulerOS-SA-2024-1118)"},{"cve":"CVE-2023-4039","qid":"754856","title":"SUSE Enterprise Linux Security Update for gcc12 (SUSE-SU-2023:3640-1)"},{"cve":"CVE-2023-4039","qid":"754865","title":"SUSE Enterprise Linux Security Update for gcc7 (SUSE-SU-2023:3686-1)"},{"cve":"CVE-2023-4039","qid":"755132","title":"SUSE Enterprise Linux Security Update for gcc13 (SUSE-SU-2023:4162-1)"},{"cve":"CVE-2023-4039","qid":"755209","title":"SUSE Enterprise Linux Security Update for gcc13 (SUSE-SU-2023:4287-1)"},{"cve":"CVE-2023-4039","qid":"755216","title":"SUSE Enterprise Linux Security Update for gcc13 (SUSE-SU-2023:4287-2)"},{"cve":"CVE-2023-4039","qid":"755271","title":"SUSE Enterprise Linux Security Update for gcc13 (SUSE-SU-2023:4458-1)"},{"cve":"CVE-2023-4039","qid":"755285","title":"SUSE Enterprise Linux Security Update for gcc13 (SUSE-SU-2023:4480-1)"},{"cve":"CVE-2023-4039","qid":"755854","title":"SUSE Enterprise Linux Security Update for gcc12 (SUSE-SU-2023:3661-1)"},{"cve":"CVE-2023-4039","qid":"755898","title":"SUSE Enterprise Linux Security Update for gcc7 (SUSE-SU-2023:3662-1)"},{"cve":"CVE-2023-4039","qid":"907319","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for gcc (28769-1)"}]},"source_records":{"cve_program":{"data_version":"4.0","data_type":"CVE","data_format":"MITRE","CVE_data_meta":{"ID":"CVE-2023-4039","ASSIGNER":"arm-security@arm.com","STATE":"PUBLIC"},"description":{"description_data":[{"lang":"eng","value":"\n\nA 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.\n\n\n\n\n\n"}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-693 Protection Mechanism Failure","cweId":"CWE-693"}]}]},"affects":{"vendor":{"vendor_data":[{"vendor_name":"Arm Ltd","product":{"product_data":[{"product_name":"Arm GNU Toolchain","version":{"version_data":[{"version_value":"not down converted","x_cve_json_5_version_data":{"versions":[{"status":"affected","version":"All versions where option -fstack-protector is used"}],"defaultStatus":"affected"}}]}}]}},{"vendor_name":"GNU","product":{"product_data":[{"product_name":"GCC","version":{"version_data":[{"version_affected":"=","version_value":"All versions of GCC that target AArch64 when option -fstack-protector is used"}]}}]}}]}},"references":{"reference_data":[{"url":"https://developer.arm.com/Arm%20Security%20Center/GCC%20Stack%20Protector%20Vulnerability%20AArch64","refsource":"MISC","name":"https://developer.arm.com/Arm%20Security%20Center/GCC%20Stack%20Protector%20Vulnerability%20AArch64"},{"url":"https://github.com/metaredteam/external-disclosures/security/advisories/GHSA-x7ch-h5rf-w2mf","refsource":"MISC","name":"https://github.com/metaredteam/external-disclosures/security/advisories/GHSA-x7ch-h5rf-w2mf"}]},"generator":{"engine":"Vulnogram 0.1.0-dev"},"source":{"discovery":"EXTERNAL"},"configuration":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"\nThe specific conditions where the stack-protector fails to give the desired level of protection are when:\n\n\n<ul>\n    <li>using GCC (all unpatched versions) targeting AArch64</li>\n    <li>and when the -fstack-protector option is used</li>\n    <li>and when the program uses C99-style dynamically-sized local variables or alloca()</li>\n</ul>\n<p>And to be exploitable there must also be a prior vulnerability in the\n program such that an attacker can cause a buffer overflow in these \nlocal variables that overwrites saved register values in the stack.</p>\n\n<br>"}],"value":"The specific conditions where the stack-protector fails to give the desired level of protection are when:\n\n\n\n      *  using GCC (all unpatched versions) targeting AArch64\n\n      *  and when the -fstack-protector option is used\n\n      *  and when the program uses C99-style dynamically-sized local variables or alloca()\n\n\n\n\nAnd to be exploitable there must also be a prior vulnerability in the\n program such that an attacker can cause a buffer overflow in these \nlocal variables that overwrites saved register values in the stack.\n\n\n\n\n"}],"solution":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"\nRecompile vulnerable code using an updated toolchain.\n\n<br>"}],"value":"Recompile vulnerable code using an updated toolchain.\n\n\n"}],"credits":[{"lang":"en","value":"Tom Hebb from Meta Red Team X and Maria Markstedter from Azeria Labs"}],"impact":{"cvss":[{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":4.8,"baseSeverity":"MEDIUM","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","version":"3.1"}]}},"nvd":{"publishedDate":"2023-09-13 09:15:00","lastModifiedDate":"2023-09-14 20:01:00","problem_types":["NVD-CWE-Other"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"LOW","integrityImpact":"LOW","availabilityImpact":"NONE","baseScore":4.8,"baseSeverity":"MEDIUM"},"exploitabilityScore":2.2,"impactScore":2.5}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:gnu:gcc:*:*:*:*:*:*:arm64:*","versionEndExcluding":"2023-09-12","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}