CVE-2023-29405
golang: cmd/cgo: Arbitrary code execution triggered by linker flags
Severity by source
Trivy's own label is CRITICAL. Rated critical by NVD, AlmaLinux, Azure Linux, Bitnami, CBL-Mariner, Oracle, Photon OS, Rocky Linux. Rated lower by Red Hat (high), Amazon (high), Ubuntu (low).
Description
The go command may execute arbitrary code at build time when using cgo. This may occur when running "go get" on a malicious module, or when running any other command which builds untrusted code. This is can by triggered by linker flags, specified via a "#cgo LDFLAGS" directive. Flags containing embedded spaces are mishandled, allowing disallowed flags to be smuggled through the LDFLAGS sanitization by including them in the argument of another flag. This only affects usage of the gccgo compiler.
Affected packages and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| alma 8 | go-toolset:rhel8::delve, go-toolset:rhel8::go-toolset, go-toolset:rhel8::golang and 6 more | 1.9.1-1.module_el8.8.0+3471+a62632a0 and 1 more |
| alma 9 | go-toolset, golang, golang-bin and 5 more | 1.19.10-1.el9_2 |
| Azure Linux 3.0 | golang | 0:1.20.7-1.azl3 |
| bitnami::Bitnami Vulnerability Database | golang | 1.19.10, 1.20.5 |
| CBL-Mariner 2.0 | golang, msft-golang | 0:1.21.6-1.cm2 and 1 more |
| Oracle Linux 8 | delve, go-toolset, golang and 6 more | 1.9.1-1.0.1.module+el8.8.0+20964+30a27755 and 2 more |
| Oracle Linux 9 | go-toolset, golang, golang-bin and 5 more | 1.19.10-1.0.1.el9_2 |
| Photon OS 3.0 | calico, go | 3.20.2-10.ph3 and 1 more |
| Photon OS 4.0 | calico, calico-cni, calico-felix and 4 more | 3.20.2-14.ph4 and 2 more |
| Photon OS 5.0 | calico, calico-cni, calico-felix and 5 more | 3.25.0-5.ph5 and 3 more |
| rocky 9 | go-toolset, golang, golang-bin and 5 more | 1.19.10-1.el9_2 |
| alpine 3.18 | go | 1.20.5-r0 |
Show all 136 entries from 42 sources
| Source | Package | Fixed in |
|---|---|---|
| alma 8 | go-toolset:rhel8::delve | 1.9.1-1.module_el8.8.0+3471+a62632a0 |
| alma 8 | go-toolset:rhel8::go-toolset | 1.19.10-1.module_el8.8.0+3571+89db2ae0 |
| alma 8 | go-toolset:rhel8::golang | 1.19.10-1.module_el8.8.0+3571+89db2ae0 |
| alma 8 | go-toolset:rhel8::golang-bin | 1.19.10-1.module_el8.8.0+3571+89db2ae0 |
| alma 8 | go-toolset:rhel8::golang-docs | 1.19.10-1.module_el8.8.0+3571+89db2ae0 |
| alma 8 | go-toolset:rhel8::golang-misc | 1.19.10-1.module_el8.8.0+3571+89db2ae0 |
| alma 8 | go-toolset:rhel8::golang-race | 1.19.10-1.module_el8.8.0+3571+89db2ae0 |
| alma 8 | go-toolset:rhel8::golang-src | 1.19.10-1.module_el8.8.0+3571+89db2ae0 |
| alma 8 | go-toolset:rhel8::golang-tests | 1.19.10-1.module_el8.8.0+3571+89db2ae0 |
| alma 9 | go-toolset | 1.19.10-1.el9_2 |
| alma 9 | golang | 1.19.10-1.el9_2 |
| alma 9 | golang-bin | 1.19.10-1.el9_2 |
| alma 9 | golang-docs | 1.19.10-1.el9_2 |
| alma 9 | golang-misc | 1.19.10-1.el9_2 |
| alma 9 | golang-race | 1.19.10-1.el9_2 |
| alma 9 | golang-src | 1.19.10-1.el9_2 |
| alma 9 | golang-tests | 1.19.10-1.el9_2 |
| Azure Linux 3.0 | golang | 0:1.20.7-1.azl3 |
| bitnami::Bitnami Vulnerability Database | golang | 1.19.10, 1.20.5 |
| CBL-Mariner 2.0 | golang | 0:1.21.6-1.cm2 |
| CBL-Mariner 2.0 | msft-golang | 0:1.20.7-1.cm2 |
| Oracle Linux 8 | delve | 1.9.1-1.0.1.module+el8.8.0+20964+30a27755 |
| Oracle Linux 8 | go-toolset | 1.19.10-1.module+el8.8.0+21109+b7104c00 |
| Oracle Linux 8 | golang | 1.19.10-1.0.1.module+el8.8.0+21109+b7104c00 |
| Oracle Linux 8 | golang-bin | 1.19.10-1.0.1.module+el8.8.0+21109+b7104c00 |
| Oracle Linux 8 | golang-docs | 1.19.10-1.0.1.module+el8.8.0+21109+b7104c00 |
| Oracle Linux 8 | golang-misc | 1.19.10-1.0.1.module+el8.8.0+21109+b7104c00 |
| Oracle Linux 8 | golang-race | 1.19.10-1.0.1.module+el8.8.0+21109+b7104c00 |
| Oracle Linux 8 | golang-src | 1.19.10-1.0.1.module+el8.8.0+21109+b7104c00 |
| Oracle Linux 8 | golang-tests | 1.19.10-1.0.1.module+el8.8.0+21109+b7104c00 |
| Oracle Linux 9 | go-toolset | 1.19.10-1.0.1.el9_2 |
| Oracle Linux 9 | golang | 1.19.10-1.0.1.el9_2 |
| Oracle Linux 9 | golang-bin | 1.19.10-1.0.1.el9_2 |
| Oracle Linux 9 | golang-docs | 1.19.10-1.0.1.el9_2 |
| Oracle Linux 9 | golang-misc | 1.19.10-1.0.1.el9_2 |
| Oracle Linux 9 | golang-race | 1.19.10-1.0.1.el9_2 |
| Oracle Linux 9 | golang-src | 1.19.10-1.0.1.el9_2 |
| Oracle Linux 9 | golang-tests | 1.19.10-1.0.1.el9_2 |
| Photon OS 3.0 | calico | 3.20.2-10.ph3 |
| Photon OS 3.0 | go | 1.20.5-1.ph3 |
| Photon OS 4.0 | calico | 3.20.2-14.ph4 |
| Photon OS 4.0 | calico-cni | 3.20.2-14.ph4 |
| Photon OS 4.0 | calico-felix | 3.20.2-14.ph4 |
| Photon OS 4.0 | calico-k8s-policy | 3.20.2-14.ph4 |
| Photon OS 4.0 | confd | 3.20.2-14.ph4 |
| Photon OS 4.0 | kubernetes-dashboard | 2.7.0-1.ph4 |
| Photon OS 4.0 | pmd-ng | 0.1-2.ph4 |
| Photon OS 5.0 | calico | 3.25.0-5.ph5 |
| Photon OS 5.0 | calico-cni | 3.25.0-5.ph5 |
| Photon OS 5.0 | calico-felix | 3.25.0-5.ph5 |
| Photon OS 5.0 | calico-k8s-policy | 3.25.0-5.ph5 |
| Photon OS 5.0 | confd | 3.25.0-5.ph5 |
| Photon OS 5.0 | go | 1.20.5-1.ph5 |
| Photon OS 5.0 | kubernetes-dashboard | 2.7.0-6.ph5 |
| Photon OS 5.0 | pmd-ng | 0.1-3.ph5 |
| rocky 9 | go-toolset | 1.19.10-1.el9_2 |
| rocky 9 | golang | 1.19.10-1.el9_2 |
| rocky 9 | golang-bin | 1.19.10-1.el9_2 |
| rocky 9 | golang-docs | 1.19.10-1.el9_2 |
| rocky 9 | golang-misc | 1.19.10-1.el9_2 |
| rocky 9 | golang-race | 1.19.10-1.el9_2 |
| rocky 9 | golang-src | 1.19.10-1.el9_2 |
| rocky 9 | golang-tests | 1.19.10-1.el9_2 |
| alpine 3.18 | go | 1.20.5-r0 |
| alpine 3.19 | go | 1.20.5-r0 |
| alpine 3.20 | go | 1.20.5-r0 |
| alpine 3.21 | go | 1.20.5-r0 |
| alpine 3.22 | go | 1.20.5-r0 |
| alpine 3.23 | go | 1.20.5-r0 |
| alpine 3.24 | go | 1.20.5-r0 |
| alpine edge | go | 1.20.5-r0 |
| amazon linux 1 | golang | 1.20.8-1.47.amzn1 |
| amazon linux 1 | golang-bin | 1.20.8-1.47.amzn1 |
| amazon linux 1 | golang-docs | 1.20.8-1.47.amzn1 |
| amazon linux 1 | golang-misc | 1.20.8-1.47.amzn1 |
| amazon linux 1 | golang-shared | 1.20.8-1.47.amzn1 |
| amazon linux 1 | golang-src | 1.20.8-1.47.amzn1 |
| amazon linux 1 | golang-tests | 1.20.8-1.47.amzn1 |
| amazon linux 2 | golang | 1.20.5-1.amzn2.0.2 |
| amazon linux 2 | golang-bin | 1.20.5-1.amzn2.0.2 |
| amazon linux 2 | golang-docs | 1.20.5-1.amzn2.0.2 |
| amazon linux 2 | golang-misc | 1.20.5-1.amzn2.0.2 |
| amazon linux 2 | golang-shared | 1.20.5-1.amzn2.0.2 |
| amazon linux 2 | golang-src | 1.20.5-1.amzn2.0.2 |
| amazon linux 2 | golang-tests | 1.20.5-1.amzn2.0.2 |
| amazon linux 2023 | golang | 1.20.5-1.amzn2023.0.2 |
| amazon linux 2023 | golang-bin | 1.20.5-1.amzn2023.0.2 |
| amazon linux 2023 | golang-docs | 1.20.5-1.amzn2023.0.2 |
| amazon linux 2023 | golang-misc | 1.20.5-1.amzn2023.0.2 |
| amazon linux 2023 | golang-shared | 1.20.5-1.amzn2023.0.2 |
| amazon linux 2023 | golang-src | 1.20.5-1.amzn2023.0.2 |
| amazon linux 2023 | golang-tests | 1.20.5-1.amzn2023.0.2 |
| chainguard | kind | 0.21.0-r0 |
| chainguard | kubeflow-katib | 0.19.0-r40 |
| chainguard | policy-controller | 0.7.0-r4 |
| debian 10 | golang-1.11 | no fix listed |
| debian 11 | golang-1.15 | no fix listed |
| debian 12 | golang-1.19 | no fix listed |
| echo | golang-1.19 | no fix listed |
| rapidfort amazon linux 2023 | golang | 1.20.5-1.amzn2023.0.2 |
| rapidfort amazon linux 2023 | golang-bin | 1.20.5-1.amzn2023.0.2 |
| rapidfort amazon linux 2023 | golang-docs | 1.20.5-1.amzn2023.0.2 |
| rapidfort amazon linux 2023 | golang-misc | 1.20.5-1.amzn2023.0.2 |
| rapidfort amazon linux 2023 | golang-shared | 1.20.5-1.amzn2023.0.2 |
| rapidfort amazon linux 2023 | golang-src | 1.20.5-1.amzn2023.0.2 |
| rapidfort amazon linux 2023 | golang-tests | 1.20.5-1.amzn2023.0.2 |
| rapidfort debian 12 | golang-1.19 | no fix listed |
| rapidfort debian 13 | golang-1.19 | no fix listed |
| rapidfort Oracle Linux 9 | go-toolset | 0:1.19.10-1.0.1.el9_2 |
| rapidfort Oracle Linux 9 | golang | 0:1.19.10-1.0.1.el9_2 |
| rapidfort Oracle Linux 9 | golang-bin | 0:1.19.10-1.0.1.el9_2 |
| rapidfort Oracle Linux 9 | golang-docs | 0:1.19.10-1.0.1.el9_2 |
| rapidfort Oracle Linux 9 | golang-misc | 0:1.19.10-1.0.1.el9_2 |
| rapidfort Oracle Linux 9 | golang-race | 0:1.19.10-1.0.1.el9_2 |
| rapidfort Oracle Linux 9 | golang-src | 0:1.19.10-1.0.1.el9_2 |
| rapidfort Oracle Linux 9 | golang-tests | 0:1.19.10-1.0.1.el9_2 |
| rapidfort ubuntu 20.04 | golang-1.17 | 0:1.17.13-3ubuntu1.2 |
| rapidfort ubuntu 22.04 | golang-1.17 | 0:1.17.13-3ubuntu1.2 |
| rapidfort ubuntu 24.04 | golang-1.17 | 0:1.17.13-3ubuntu1.2 |
| Red Hat | go-toolset-7-golang | no fix listed |
| Red Hat | golang | no fix listed |
| Red Hat | golang-bin | no fix listed |
| Red Hat | golang-docs | no fix listed |
| Red Hat | golang-misc | no fix listed |
| Red Hat | golang-src | no fix listed |
| Red Hat | golang-tests | no fix listed |
| root.io debian 12 | rootio-golang-1.19 | no fix listed |
| ubuntu 16.04-ESM | golang-1.18 | 1.18.1-1ubuntu1~16.04.6+esm1 |
| ubuntu 18.04-ESM | golang-1.18 | 1.18.1-1ubuntu1~18.04.4+esm1 |
| ubuntu 20.04 | golang-1.18 | 1.18.1-1ubuntu1~20.04.3 |
| ubuntu 20.04-ESM | golang-1.18 | 1.18.1-1ubuntu1~20.04.3 |
| ubuntu 22.04 | golang-1.17 | 1.17.13-3ubuntu1.2 |
| ubuntu 22.04 | golang-1.18 | 1.18.1-1ubuntu1.2 |
| wolfi | kind | 0.21.0-r0 |
| wolfi | kubeflow-katib | 0.19.0-r40 |
| wolfi | policy-controller | 0.7.0-r4 |
References
- https://access.redhat.com/errata/RHSA-2023:3923
- https://access.redhat.com/security/cve/CVE-2023-29405
- https://bugzilla.redhat.com/2216965
- https://bugzilla.redhat.com/2217562
- https://bugzilla.redhat.com/2217565
- https://bugzilla.redhat.com/2217569
- https://bugzilla.redhat.com/show_bug.cgi?id=2216965
- https://bugzilla.redhat.com/show_bug.cgi?id=2217562
All 37 references
- https://bugzilla.redhat.com/show_bug.cgi?id=2217565
- https://bugzilla.redhat.com/show_bug.cgi?id=2217569
- https://creativecommons.org/licenses/by/4.0/
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-29402
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-29403
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-29404
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-29405
- https://errata.almalinux.org/9/ALSA-2023-3923.html
- https://errata.rockylinux.org/RLSA-2023:3923
- https://github.com/golang/go/commit/1008486a9ff979dbd21c7466eeb6abf378f9c637%20%28go1.20.5%29
- https://github.com/golang/go/commit/3ba9c890b86dc8c3a54c98d32497b7a8012704f9%20%28go1.19.10%29
- https://github.com/golang/go/commit/44e0fb13e783a44463e95926a674fd580daa3a55%20%28go1.19.10%29
- https://github.com/golang/go/commit/fa60c381ed06c12f9c27a7b50ca44c5f84f7f0f4%20%28go1.20.5%29
- https://github.com/golang/go/issues/60306
- https://go.dev/cl/501224
- https://go.dev/issue/60306
- https://groups.google.com/g/golang-announce/c/q5135a9d924
- https://groups.google.com/g/golang-announce/c/q5135a9d924/m/j0ZoAJOHAwAJ
- https://linux.oracle.com/cve/CVE-2023-29405.html
- https://linux.oracle.com/errata/ELSA-2023-3923.html
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NZ2O6YCO2IZMZJELQGZYR2WAUNEDLYV6/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XBS3IIK6ADV24C5ULQU55QLT2UE762ZX/
- https://nvd.nist.gov/vuln/detail/CVE-2023-29405
- https://pkg.go.dev/vuln/GO-2023-1842
- https://security.gentoo.org/glsa/202311-09
- https://security.netapp.com/advisory/ntap-20241206-0003/
- https://ubuntu.com/security/notices/USN-7061-1
- https://ubuntu.com/security/notices/USN-7109-1
- https://www.cve.org/CVERecord?id=CVE-2023-29405