cve.bz

CVE-2023-4039 gnu gcc: Protection Mechanism Failure

4.8 mediumExploit referenceEPSS 1.0%Fix availableDisputed

Medium (4.8) in gnu gcc. Disputed: the vendor or another party disputes that this is a vulnerability. EPSS 1.0% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

4.8 medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
EPSS
1.0% (unchanged from 1.0% a week ago; 1.0% 30 days ago) estimated probability of exploitation activity in the next 30 days; 64th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2025-06-03. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-693 Protection Mechanism Failure
OWASP Top 10
A06:2025 Insecure Design
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2023-4039 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-4039?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-4039?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2023-4039 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2023-4039

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2023-4039](https://cve.bz/cve/badge/CVE-2023-4039.svg)](https://cve.bz/cve/CVE-2023-4039)

HTML:

<a href="https://cve.bz/cve/CVE-2023-4039"><img src="https://cve.bz/cve/badge/CVE-2023-4039.svg" alt="CVE-2023-4039"></a>

Affected

Versions

From the NVD's CPE matches.

ProductAffected
gnu:gccbefore 2023-09-12

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12gcc-11no fix listedDEBIAN-CVE-2023-4039
Debian12gcc-1212.2.0-14+deb12u1DEBIAN-CVE-2023-4039
Debian13, 14gcc-1212.3.0-9DEBIAN-CVE-2023-4039
Debian13, 14gcc-1313.2.0-4DEBIAN-CVE-2023-4039
Ubuntu14.04:LTSgcc-4.7, gcc-4.8, gccgo-4.9 and 1 moreno fix listedUBUNTU-CVE-2023-4039
Ubuntu16.04:LTSgcc-4.7, gcc-4.8, gcc-4.9 and 19 moreno fix listedUBUNTU-CVE-2023-4039
Ubuntu18.04:LTSgcc-5, gcc-6, gcc-7 and 12 moreno fix listedUBUNTU-CVE-2023-4039
Ubuntu20.04:LTSgcc-7, gcc-8, gcc-opt and 6 moreno fix listedUBUNTU-CVE-2023-4039
Ubuntu22.04:LTSgcc-1010.5.0-1ubuntu1~22.04.2UBUNTU-CVE-2023-4039 USN-7700-1
Ubuntu22.04:LTSgcc-1111.4.0-1ubuntu1~22.04.2UBUNTU-CVE-2023-4039 USN-7700-1
Ubuntu22.04:LTSgcc-1212.3.0-1ubuntu1~22.04.2UBUNTU-CVE-2023-4039 USN-7700-1
Ubuntu22.04:LTSgcc-9, gcc-opt, gcc-9-cross and 8 moreno fix listedUBUNTU-CVE-2023-4039
Ubuntu24.04:LTSgcc-1010.5.0-4ubuntu2UBUNTU-CVE-2023-4039
Ubuntu24.04:LTSgcc-10-cross23ubuntu2UBUNTU-CVE-2023-4039
Ubuntu24.04:LTSgcc-1111.4.0-4ubuntu1UBUNTU-CVE-2023-4039
Ubuntu24.04:LTSgcc-11-cross21ubuntu2UBUNTU-CVE-2023-4039
8 more for Ubuntu in the JSON and on Ubuntu's page.
SUSEEnterprise Storage 7, Linux Enterprise High Performance Computing 15 SP2-LTSS, Linux Enterprise High Performance Computing 15 SP3-ESPOS and 8 moregcc12, cross-nvptx-gcc1212.3.0+git1204-150000.1.16.1SUSE-SU-2023:3661-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP1-LTSS, Linux Enterprise High Performance Computing 15 SP2-LTSS and 10 moregcc13, cross-nvptx-gcc1313.2.1+git7813-150000.1.6.1SUSE-SU-2023:4458-1
SUSELinux Enterprise High Performance Computing 15 SP1-LTSS, Linux Enterprise Module for Development Tools 15 SP4gcc12, cross-nvptx-gcc12, gcc12-testresults12.3.0+git1204-150000.1.16.1SUSE-SU-2023:3661-1
SUSELinux Enterprise Installer Updates 15 SP1, Linux Enterprise Installer Updates 15 SP2, Linux Enterprise Installer Updates 15 SP3 and 8 moregcc1313.2.1+git7813-150000.1.6.1SUSE-SU-2023:4458-1
SUSELinux Enterprise Installer Updates 15 SP1, Linux Enterprise Installer Updates 15 SP2, Linux Enterprise Installer Updates 15 SP3 and 12 moregcc1212.3.0+git1204-150000.1.16.1SUSE-SU-2023:3661-1
SUSELinux Enterprise Installer Updates 15 SP2, Linux Enterprise Installer Updates 15 SP3, Linux Enterprise Installer Updates 15 SP4 and 14 moregcc1313.2.1+git7813-150000.1.3.3SUSE-SU-2023:4162-1
SUSELinux Enterprise Micro 5.3, Linux Enterprise Micro 5.4, Linux Enterprise Micro 5.5gcc1313.2.1+git7813-150000.1.6.1SUSE-SU-2024:0045-1
SUSELinux Enterprise Module for Basesystem 15 SP4gcc77.5.0+r278197-150000.4.35.1SUSE-SU-2023:3686-1
SUSELinux Enterprise Module for Development Tools 15 SP4, Linux Enterprise Module for Development Tools 15 SP5cross-nvptx-gcc1313.2.1+git7813-150000.1.3.2SUSE-SU-2023:4162-1
SUSELinux Enterprise Module for Toolchain 12gcc12, cross-nvptx-gcc1212.3.0+git1204-1.13.1SUSE-SU-2023:3640-1
SUSELinux Enterprise Module for Toolchain 12gcc13, cross-nvptx-gcc1313.2.1+git7813-1.10.1SUSE-SU-2023:4480-1
SUSELinux Enterprise Module for Toolchain 12gcc7, cross-nvptx-gcc77.5.0+r278197-13.1SUSE-SU-2023:3662-1
4 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.4gcc12, cross-nvptx-gcc12, gcc12-testresults12.3.0+git1204-150000.1.16.1SUSE-SU-2023:3661-1
openSUSELeap 15.4, Leap 15.5cross-nvptx-gcc1313.2.1+git7813-150000.1.3.2SUSE-SU-2023:4162-1
openSUSELeap 15.4, Leap 15.5gcc13, cross-nvptx-gcc1313.2.1+git7813-150000.1.6.1SUSE-SU-2023:4458-1
openSUSELeap 15.4, Leap 15.5, Leap Micro 5.3 and 1 moregcc1313.2.1+git7813-150000.1.3.3SUSE-SU-2023:4162-1
openSUSELeap Micro 5.3, Leap Micro 5.4gcc1212.3.0+git1204-150000.1.16.1SUSE-SU-2023:3661-1
openSUSELeap Micro 5.3, Leap Micro 5.4gcc1313.2.1+git7813-150000.1.6.1SUSE-SU-2023:4458-1
openSUSETumbleweedgcc1212.3.0+git1204-2.1openSUSE-SU-2024:13233-1
openSUSETumbleweedgcc1313.2.1+git7813-1.1openSUSE-SU-2024:13234-1
openSUSETumbleweedgcc77.5.0+r278197-15.1openSUSE-SU-2024:13235-1
Alpinev3.19, v3.20, v3.21 and 3 moregcc13.2.1_git20231014-r0ALPINE-CVE-2023-4039
Azure Linux2gcc11.2.0-6AZL-28769
Azure Linux3gcc13.2.0-7AZL-34695

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpine.

Red Hat

Red Hat's statement

According to the GCC security policy, both upstream and Red Hat Product Security do not consider this to be a vulnerability. Please refer to the following URLs for more information:

* https://gcc.gnu.org/git/?p=gcc.git;a=blob_plain;f=SECURITY.txt

* https://gcc.gnu.org/pipermail/gcc-patches/2023-October/634066.html

* https://inbox.sourceware.org/gcc-patches/46cfa37b-56eb-344d-0745-e0d35393392d@gotplt.org/

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Cryostat 2gccNot affected
Migration Toolkit for ContainersgccNot affected
Red Hat 3scale API Management Platform 2gccNot affected
Red Hat Advanced Cluster Management for Kubernetes 2gccFix deferred
Red Hat Enterprise Linux 6compat-gcc-295Out of support scope
Red Hat Enterprise Linux 6compat-gcc-296Out of support scope
Red Hat Enterprise Linux 6compat-gcc-32Out of support scope
Red Hat Enterprise Linux 6compat-gcc-34Out of support scope
Red Hat Enterprise Linux 6gccOut of support scope
Red Hat Enterprise Linux 7compat-gcc-32Out of support scope
Red Hat Enterprise Linux 7compat-gcc-34Out of support scope
Red Hat Enterprise Linux 7compat-gcc-44Out of support scope
Red Hat Enterprise Linux 7gccOut of support scope
Red Hat Enterprise Linux 8gccNot affected
Red Hat Enterprise Linux 8gcc-toolset-11-gccNot affected
Red Hat Enterprise Linux 8gcc-toolset-12-gccNot affected
Red Hat Enterprise Linux 8gcc-toolset-13-gccNot affected
Red Hat Enterprise Linux 9gccNot affected
Red Hat Enterprise Linux 9gcc-toolset-12-gccNot affected
Red Hat Enterprise Linux 9gcc-toolset-13-gccNot affected
6 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2023-4039.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-25-226-07Siemens Third-Party Components in SINEC OS2025-08-12Critical Manufacturing, Transportation Systems, Energy, Healthcare and Public Health, Financial Services, Government Services and FacilitiesRUGGEDCOM RST2428P (6GK6242-6PA00), SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family, SCALANCE XCM-/XRM-/XCH-/XRH-300 familynone listed
ICSA-23-348-10Siemens SIMATIC S7-15002023-12-12Critical Manufacturing, Transportation Systems, Energy, Healthcare and Public Health, Financial Services, Government Services and FacilitiesSIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0), SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0), SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) and 2 morenone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-693 (17).

References

Check your stackJSON