CVE-2018-12886
stack_protect_prologue in cfgexpand.c and stack_protect_epilogue in function.c in GNU Compiler...
stack_protect_prologue in cfgexpand.c and stack_protect_epilogue in function.c in GNU Compiler Collection (GCC) 4.1 through 8 (under certain circumstances) generate instruction sequences when targeting ARM targets that spill the address of the stack protector guard, which allows an attacker to bypass the protection of -fstack-protector, -fstack-protector-all, -fstack-protector-strong, and -fstack-protector-explicit against stack overflow by controlling what the stack canary is compared against.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
8.1
stack_protect_prologue in cfgexpand.c and stack_protect_epilogue in function.c in GNU Compiler Collection (GCC) 4.1 through 8 (under certain circumstances) generate instruction sequences when targeting ARM targets that spill the address of the stack protector guard, which allows an attacker to bypass the protection of -fstack-protector, -fstack-protector-all, -fstack-protector-strong, and -fstack-protector-explicit against stack overflow by controlling what the stack canary is compared against.
- Record
CVE-2018-12886- CVSS 3.0
- 8.1 High
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 6.8 Medium
AV:N/AC:M/Au:N/C:P/I:P/A:P - Weakness
- CWE-209
- Updated
- 2026-11-02
CVE List No score
stack_protect_prologue in cfgexpand.c and stack_protect_epilogue in function.c in GNU Compiler Collection (GCC) 4.1 through 8 (under certain circumstances) generate instruction sequences when targeting ARM targets that spill the address of the stack protector guard, which allows an attacker to bypass the protection of -fstack-protector, -fstack-protector-all, -fstack-protector-strong, and -fstack-protector-explicit against stack overflow by controlling what the stack canary is compared against.
- Record
CVE-2018-12886- Updated
- 2026-11-02
EUVDEUVD-2018-4839 No score
stack_protect_prologue in cfgexpand.c and stack_protect_epilogue in function.c in GNU Compiler Collection (GCC) 4.1 through 8 (under certain circumstances) generate instruction sequences when targeting ARM targets that spill the address of the stack protector guard, which allows an attacker to bypass the protection of -fstack-protector, -fstack-protector-all, -fstack-protector-strong, and -fstack-protector-explicit against stack overflow by controlling what the stack canary is compared against.
- Record
EUVD-2018-4839- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-5mwp-7q9c-cgg2
8.1
stack_protect_prologue in cfgexpand.c and stack_protect_epilogue in function.c in GNU Compiler...
stack_protect_prologue in cfgexpand.c and stack_protect_epilogue in function.c in GNU Compiler Collection (GCC) 4.1 through 8 (under certain circumstances) generate instruction sequences when targeting ARM targets that spill the address of the stack protector guard, which allows an attacker to bypass the protection of -fstack-protector, -fstack-protector-all, -fstack-protector-strong, and -fstack-protector-explicit against stack overflow by controlling what the stack canary is compared against.
- Record
GHSA-5mwp-7q9c-cgg2- CVSS 3.0
- 8.1 High
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-209
- Updated
- 2026-11-02
OSV
8.1
stack_protect_prologue in cfgexpand.c and stack_protect_epilogue in function.c in GNU Compiler Collection (GCC) 4.1 through 8 (under certain circumstances) generate instruction sequences when targeting ARM targets that spill the address of the stack protector guard, which allows an attacker to bypass the protection of -fstack-protector, -fstack-protector-all, -fstack-protector-strong, and -fstack-protector-explicit against stack overflow by controlling what the stack canary is compared against.
- Record
CVE-2018-12886- CVSS 3.0
- 8.1 High
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2018-12886
8.1
stack_protect_prologue in cfgexpand.c and stack_protect_epilogue in function.c in GNU Compiler Collection (GCC) 4.1 through 8 (under certain circumstances) generate instruction sequences when targeting ARM targets that spill the address of the stack protector guard, which allows an attacker to bypass the protection of -fstack-protector, -fstack-protector-all, -fstack-protector-strong, and -fstack-protector-explicit against stack overflow by controlling what the stack canary is compared against.
- Record
UBUNTU-CVE-2018-12886- CVSS 3.0
- 8.1 High
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
gcc-4.8Ubuntu:14.04:LTS |
All versions, plus listed versions 4.8.1-10ubuntu84.8.2-1ubuntu14.8.2-1ubuntu24.8.2-10ubuntu14.8.2-10ubuntu2 Show 18 moreShow less4.8.2-12ubuntu24.8.2-13ubuntu14.8.2-14ubuntu14.8.2-14ubuntu24.8.2-14ubuntu44.8.2-15ubuntu34.8.2-16ubuntu14.8.2-16ubuntu34.8.2-16ubuntu44.8.2-16ubuntu54.8.2-16ubuntu64.8.2-17ubuntu14.8.2-17ubuntu24.8.2-19ubuntu14.8.4-2ubuntu1~14.044.8.4-2ubuntu1~14.04.14.8.4-2ubuntu1~14.04.34.8.4-2ubuntu1~14.04.4 |
None known |
gcc-4.8Ubuntu:16.04:LTS |
All versions, plus listed versions 4.8.5-1ubuntu14.8.5-2ubuntu14.8.5-3ubuntu14.8.5-3ubuntu24.8.5-3ubuntu34.8.5-4ubuntu14.8.5-4ubuntu2 |
None known |
gcc-4.9Ubuntu:16.04:LTS |
All versions, plus listed versions 4.9.3-5ubuntu14.9.3-6ubuntu24.9.3-8ubuntu14.9.3-8ubuntu24.9.3-9ubuntu1 Show 4 moreShow less4.9.3-11ubuntu14.9.3-11ubuntu24.9.3-12ubuntu14.9.3-13ubuntu2 |
None known |
gcc-arm-none-eabiUbuntu:16.04:LTS |
All versions, plus listed versions 15:4.9.3+svn227297-115:4.9.3+svn227297-1build115:4.9.3+svn231177-1 |
None known |
gcc-snapshotUbuntu:16.04:LTS |
All versions, plus listed versions 20151011-0ubuntu120151030-1ubuntu220151104-0ubuntu120151122-1ubuntu120151209-0ubuntu1 Show 5 moreShow less20151215-0ubuntu120160105-1ubuntu120160125-1ubuntu120160320-1ubuntu120160415-0ubuntu1 |
None known |
gcc-7Ubuntu:18.04:LTS |
All versions, plus listed versions 7.2.0-8ubuntu37.2.0-12ubuntu17.2.0-13ubuntu17.2.0-16ubuntu17.2.0-17ubuntu1 Show 14 moreShow less7.2.0-18ubuntu27.3.0-3ubuntu17.3.0-5ubuntu17.3.0-11ubuntu17.3.0-12ubuntu17.3.0-13ubuntu17.3.0-14ubuntu17.3.0-15ubuntu27.3.0-16ubuntu27.3.0-16ubuntu37.3.0-27ubuntu1~18.047.4.0-1ubuntu1~18.047.4.0-1ubuntu1~18.04.17.5.0-3ubuntu1~18.04 |
None known |
gcc-8Ubuntu:18.04:LTS |
All versions, plus listed versions 8-20180208-0ubuntu18-20180218-1ubuntu18-20180312-2ubuntu18-20180319-1ubuntu28-20180321-1ubuntu1 Show 11 moreShow less8-20180331-1ubuntu18-20180402-1ubuntu18-20180406-0ubuntu18-20180408-0ubuntu18-20180414-1ubuntu18-20180414-1ubuntu28.2.0-1ubuntu2~18.048.3.0-6ubuntu1~18.048.3.0-6ubuntu1~18.04.18.3.0-26ubuntu1~18.048.4.0-1ubuntu1~18.04 |
None known |
gcc-4.8Ubuntu:18.04:LTS |
All versions, plus listed versions 4.8.5-4ubuntu64.8.5-4ubuntu74.8.5-4ubuntu8 |
None known |
gcc-6Ubuntu:18.04:LTS |
All versions, plus listed versions 6.4.0-8ubuntu16.4.0-9ubuntu16.4.0-10ubuntu16.4.0-11ubuntu16.4.0-12ubuntu1 Show 5 moreShow less6.4.0-13ubuntu16.4.0-15ubuntu16.4.0-16ubuntu16.4.0-17ubuntu16.5.0-2ubuntu1~18.04 |
None known |
gcc-arm-none-eabiUbuntu:18.04:LTS |
All versions, plus listed versions 15:5.4.1+svn241155-115:6.3.1+svn253039-115:6.3.1+svn253039-1build1 |
None known |
Show 14 moreShow less
| Package | Affected | Fixed |
|---|---|---|
gcc-snapshotUbuntu:18.04:LTS |
All versions, plus listed versions 20171017-1ubuntu120171109-1ubuntu120180107-1ubuntu120180130-0ubuntu220180216-1ubuntu11:20180322-1ubuntu11:20180425-1ubuntu1 |
None known |
gcc-7Ubuntu:20.04:LTS |
All versions, plus listed versions 7.4.0-14ubuntu27.4.0-15ubuntu17.5.0-1ubuntu17.5.0-2ubuntu17.5.0-3ubuntu17.5.0-4ubuntu17.5.0-4ubuntu47.5.0-6ubuntu2 |
None known |
gcc-8Ubuntu:20.04:LTS |
All versions, plus listed versions 8.3.0-23ubuntu28.3.0-24ubuntu18.3.0-25ubuntu38.3.0-26ubuntu18.3.0-27ubuntu1 Show 6 moreShow less8.3.0-29ubuntu18.3.0-29ubuntu28.4.0-1ubuntu18.4.0-1ubuntu38.4.0-3ubuntu18.4.0-3ubuntu2 |
None known |
gcc-arm-none-eabiUbuntu:20.04:LTS |
All versions, plus listed versions 15:7-2018-q2-615:8-2019-q3-115:9-2019-q4-0ubuntu1 |
None known |
gcc-arm-none-eabiUbuntu:22.04:LTS |
All versions, plus listed versions 15:9-2019-q4-0ubuntu215:10.3-2021.07-115:10.3-2021.07-215:10.3-2021.07-315:10.3-2021.07-4 |
None known |
gcc-snapshotUbuntu:22.04:LTS |
All versions, plus listed versions 1:20210827-1ubuntu11:20220117-1ubuntu1 |
None known |
gcc-arm-none-eabiUbuntu:24.04:LTS |
All versions, plus listed versions 15:12.2.rel1-115:13.2.rel1-115:13.2.rel1-2 |
None known |
gcc-snapshotUbuntu:24.04:LTS |
All versions, plus listed versions 1:20230928-1ubuntu11:20231130-1ubuntu11:20240117-1ubuntu1 |
None known |
gcc-arm-none-eabiUbuntu:25.10 |
All versions, plus listed versions 15:14.2.rel1-1 |
None known |
gcc-snapshotUbuntu:25.10 |
All versions, plus listed versions 1:20250322-1ubuntu11:20250502-1ubuntu11:20250601-1ubuntu11:20250617-1ubuntu11:20250804-1ubuntu11:20250828-1ubuntu11:20250921-1ubuntu1 |
None known |
gcc-arm-none-eabiUbuntu:26.10 |
All versions, plus listed versions 15:14.2.rel1-115:15.3.rel1-1 |
None known |
gcc-snapshotUbuntu:26.10 |
All versions, plus listed versions 1:20260306-1ubuntu11:20260902-1ubuntu11:20260920-0ubuntu1 |
None known |
gcc-arm-none-eabiUbuntu:26.04:LTS |
All versions, plus listed versions 15:14.2.rel1-1 |
None known |
gcc-snapshotUbuntu:26.04:LTS |
All versions, plus listed versions 1:20250921-1ubuntu11:20251023-1ubuntu11:20260121-1ubuntu11:20260203-0ubuntu31:20260216-1ubuntu11:20260306-1ubuntu1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2018-12886 is a high vulnerability (CVSS 8.1) in Gnu Gcc, published May 22, 2019. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.74%, the 86th percentile. No source names a fixed version.
References
gnu.org/software/gcc/gcc-8/changes.html
gcc.gnu.org/viewcvs/gcc/trunk/gcc/config/arm/arm-protos.h?revision=266379&view=markup
cert-portal.siemens.com/productcert/html/ssa-565386.html
cert-portal.siemens.com/productcert/html/ssa-398330.html
nvd.nist.gov/vuln/detail/CVE-2018-12886
github.com/advisories/GHSA-5mwp-7q9c-cgg2
ubuntu.com/security/CVE-2018-12886
gcc.gnu.org/git?p=gcc.git;a=commit;h=89d7557202d25a393666ac4c0f7dbdab31e452a2
cve.org/CVERecord?id=CVE-2018-12886