# CVE-2023-4039: GCC's-fstack-protector fails to guard dynamically-sized local variables on AArch64

- Priority: **Routine**
- Reason: Not severe (CVSS 4.8, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2023-09-13 · Modified: 2026-10-14
- Aliases: ALPINE-CVE-2023-4039, SUSE-SU-2023:3640-1, SUSE-SU-2023:3661-1, SUSE-SU-2023:3686-1, SUSE-SU-2023:4162-1, SUSE-SU-2023:4458-1, SUSE-SU-2023:4480-1, SUSE-SU-2024:0045-1, UBUNTU-CVE-2023-4039, USN-7700-1, DEBIAN-CVE-2023-4039, CGA-3qhv-mc6x-6wf6, CGA-42r5-f92r-4qj5, CGA-6p8q-6g77-cqc7, CGA-7742-r4v9-gw6q, CGA-95r4-hvvh-x6qr, CGA-96pr-qw99-v8h6, CGA-9fp5-8r38-hf7j, CGA-c3r8-h852-9cm2, CGA-f5x5-jjxj-m2fr, CGA-fjg2-f3rr-432x, CGA-gv97-vgrg-2fg2, CGA-h8h9-7qjr-gm38, CGA-hg9x-wx5h-8pph, CGA-hgqg-c6f8-v5c8, CGA-hh6c-mh9r-5pqq, CGA-hq2f-q5pc-wr4c, CGA-hv87-cf7g-hch7, CGA-hw72-7gm8-pj37, CGA-jqf5-2g6v-m8jv, CGA-p32q-4chq-x28f, CGA-pgvx-qjwq-25qj, CGA-phjv-w5jh-w7fc, CGA-pq39-7ccj-wv5p, CGA-pw86-fhjj-p62x, CGA-qp75-5rvw-vmvm, CGA-qrrw-xcjf-9w79, CGA-rph3-3pmg-449x, CGA-x9mf-4fxg-6g35, CGA-xfqf-q2hm-g3r5, CGA-xmcg-5j8g-m3q7, openSUSE-SU-2024:13233-1, openSUSE-SU-2024:13234-1, openSUSE-SU-2024:13235-1
- Record: https://cvemate.com/vulnerability/CVE-2023-4039 · JSON: https://cvemate.com/vulnerability/CVE-2023-4039/json

## Description

```text
**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.
```

## Signals

- CVSS: 4.8 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
- EPSS: 1.027%, percentile 64.754%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 2 (github, reference)

## Affected (first 20 of 192)

- alpine gcc (Alpine Linux): \< 13.2.1\_git20231014-r0
- chainguard gcc (Chainguard): \< 13.2.0-r3
- chainguard gcc-12 (Chainguard): \< 12.3.0-r4
- chainguard gcc-6 (Chainguard): \< 6.5.0-r5
- chainguard gcc-doc (Chainguard): \< 13.2.0-r3
- chainguard gfortran (Chainguard): \< 13.2.0-r3
- chainguard libatomic (Chainguard): \< 13.2.0-r3
- chainguard libgcc (Chainguard): \< 13.2.0-r3
- chainguard libgccjit (Chainguard): \< 13.2.0-r3
- chainguard libgccjit-dev (Chainguard): \< 13.2.0-r3
- chainguard libgfortran (Chainguard): \< 13.2.0-r3
- chainguard libgomp (Chainguard): \< 13.2.0-r3
- chainguard libquadmath (Chainguard): \< 13.2.0-r3
- chainguard libssp (Chainguard): \< 13.2.0-r3
- chainguard libstdc++ (Chainguard): \< 13.2.0-r3
- chainguard libstdc++-dev (Chainguard): \< 13.2.0-r3
- wolfi gcc (Wolfi): \< 13.2.0-r3
- wolfi gcc-12 (Wolfi): \< 12.3.0-r4
- wolfi gcc-6 (Wolfi): \< 6.5.0-r5
- wolfi gcc-doc (Wolfi): \< 13.2.0-r3

## References (first 20 of 33)

- <https://developer.arm.com/Arm%20Security%20Center/GCC%20Stack%20Protector%20Vulnerability%20AArch64>
- <https://github.com/metaredteam/external-disclosures/security/advisories/GHSA-x7ch-h5rf-w2mf>
- <https://security.alpinelinux.org/vuln/CVE-2023-4039>
- <https://www.suse.com/support/update/announcement/2023/suse-su-20233640-1/>
- <https://bugzilla.suse.com/1214052>
- <https://www.suse.com/security/cve/CVE-2023-4039>
- <https://www.suse.com/support/update/announcement/2023/suse-su-20233661-1/>
- <https://www.suse.com/support/update/announcement/2023/suse-su-20233686-1/>
- <https://bugzilla.suse.com/1195517>
- <https://bugzilla.suse.com/1196861>
- <https://bugzilla.suse.com/1204505>
- <https://bugzilla.suse.com/1205145>
- <https://www.suse.com/support/update/announcement/2023/suse-su-20234162-1/>
- <https://bugzilla.suse.com/1206480>
- <https://bugzilla.suse.com/1206684>
- <https://bugzilla.suse.com/1210557>
- <https://bugzilla.suse.com/1211427>
- <https://bugzilla.suse.com/1212101>
- <https://bugzilla.suse.com/1213915>
- <https://bugzilla.suse.com/1214460>

---

Data as of 2026-12-05T03:11:22.285Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
