gcc — security advisory
**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.
- Products
- gcc
- Affected versions
- Not specified
- Fixed versions
- 13.2.1_git20231014-r0
- CVEs
- CVE-2023-4039
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 14:59 UTC · Revision 1
Source evidence
**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.
osv:ALPINE-CVE-2023-4039
gcc
Fixed versions: 13.2.1_git20231014-r0
gcc
Fixed versions: 13.2.1_git20231014-r0
gcc
Fixed versions: 13.2.1_git20231014-r0
gcc
Fixed versions: 13.2.1_git20231014-r0
gcc
Fixed versions: 13.2.1_git20231014-r0
gcc
Fixed versions: 13.2.1_git20231014-r0
Complete source record
{
"id": "bb774d70a0ef64411741f3aed1129092d479a7891888090a0540a730195d208e",
"url": "https://osv.dev/vulnerability/ALPINE-CVE-2023-4039",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "ALPINE-CVE-2023-4039",
"summary": "**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.",
"evidence": "osv:ALPINE-CVE-2023-4039",
"products": [
{
"name": {
"value": "gcc",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "13.2.1_git20231014-r0",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "gcc",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "13.2.1_git20231014-r0",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "gcc",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "13.2.1_git20231014-r0",
"evidence": "/affected/2/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "gcc",
"evidence": "/affected/3/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "13.2.1_git20231014-r0",
"evidence": "/affected/3/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "gcc",
"evidence": "/affected/4/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "13.2.1_git20231014-r0",
"evidence": "/affected/4/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "gcc",
"evidence": "/affected/5/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "13.2.1_git20231014-r0",
"evidence": "/affected/5/ranges"
}
],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "ALPINE-CVE-2023-4039",
"aliases": [
"ALPINE-CVE-2023-4039"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "13.2.1_git20231014-r0"
}
]
}
],
"package": {
"name": "gcc",
"purl": "pkg:apk/alpine/gcc?arch=source",
"ecosystem": "Alpine:v3.19"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2023-4039.json"
},
"ecosystem_specific": {}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "13.2.1_git20231014-r0"
}
]
}
],
"package": {
"name": "gcc",
"purl": "pkg:apk/alpine/gcc?arch=source",
"ecosystem": "Alpine:v3.20"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2023-4039.json"
},
"ecosystem_specific": {}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "13.2.1_git20231014-r0"
}
]
}
],
"package": {
"name": "gcc",
"purl": "pkg:apk/alpine/gcc?arch=source",
"ecosystem": "Alpine:v3.21"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2023-4039.json"
},
"ecosystem_specific": {}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "13.2.1_git20231014-r0"
}
]
}
],
"package": {
"name": "gcc",
"purl": "pkg:apk/alpine/gcc?arch=source",
"ecosystem": "Alpine:v3.22"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2023-4039.json"
},
"ecosystem_specific": {}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "13.2.1_git20231014-r0"
}
]
}
],
"package": {
"name": "gcc",
"purl": "pkg:apk/alpine/gcc?arch=source",
"ecosystem": "Alpine:v3.23"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2023-4039.json"
},
"ecosystem_specific": {}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "13.2.1_git20231014-r0"
}
]
}
],
"package": {
"name": "gcc",
"purl": "pkg:apk/alpine/gcc?arch=source",
"ecosystem": "Alpine:v3.24"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2023-4039.json"
},
"ecosystem_specific": {}
}
],
"modified": "2026-10-26T17:17:58.638105453Z",
"provider": "osv",
"upstream": [
"CVE-2023-4039"
],
"references": [
"https://security.alpinelinux.org/vuln/CVE-2023-4039"
]
},
"related_cves": [
{
"value": "CVE-2023-4039",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 454484,
"published_at": "2023-09-13T09:15:15.69+00:00"
}