Vulnerability · Published Sep 6, 2024 · Assigned by Go

CVE-2024-34158Stack exhaustion in Parse in go/build/constraint

High 7.5

In plain English

A high-severity security flaw in go/build/constraint from Go standard library. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.0% (higher than 64% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)1.0%top 35.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

Calling Parse on a "// +build" build tag line with deeply nested expressions can cause a panic due to stack exhaustion.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8aardvark-dns2:1.10.1-2.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8buildah2:1.33.8-4.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:8buildah2:1.33.8-4.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:9buildah2:1.37.5-1.el9_5ALSA-2024:9459
AlmaLinux:9buildah2:1.33.9-1.el9_4ALSA-2024:8112
AlmaLinux:8buildah-tests2:1.33.8-4.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8buildah-tests2:1.33.8-4.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:9buildah-tests2:1.37.5-1.el9_5ALSA-2024:9459
AlmaLinux:9buildah-tests2:1.33.9-1.el9_4ALSA-2024:8112
AlmaLinux:8cockpit-podman84.1-1.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:8conmon3:2.1.10-1.module_el8.10.0+3845+87b84552ALSA-2024:8038
AlmaLinux:8conmon3:2.1.10-1.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:8conmon3:2.1.10-1.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8conmon3:2.1.10-1.module_el8.10.0+3858+6ad51f9fALSA-2024:8038
AlmaLinux:8container-selinux2:2.229.0-2.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8containernetworking-plugins1:1.4.0-5.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:8containernetworking-plugins1:1.4.0-5.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8containers-common2:1-82.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8containers-common2:1-82.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:8crit3.18-5.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8crit3.18-5.module_el8.10.0+3858+6ad51f9fALSA-2024:8038
AlmaLinux:8crit3.18-5.module_el8.10.0+3845+87b84552ALSA-2024:8038
AlmaLinux:8criu3.18-5.module_el8.10.0+3845+87b84552ALSA-2024:8038
AlmaLinux:8criu3.18-5.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:8criu-devel3.18-5.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:8criu-devel3.18-5.module_el8.10.0+3858+6ad51f9fALSA-2024:8038
AlmaLinux:8criu-libs3.18-5.module_el8.10.0+3845+87b84552ALSA-2024:8038
AlmaLinux:8criu-libs3.18-5.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8crun1.14.3-2.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:8crun1.14.3-2.module_el8.10.0+3845+87b84552ALSA-2024:8038
AlmaLinux:8crun1.14.3-2.module_el8.10.0+3858+6ad51f9fALSA-2024:8038
AlmaLinux:8delve1.21.2-4.module_el8.10.0+3895+92d465e0ALSA-2024:6908
AlmaLinux:8fuse-overlayfs1.13-1.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8fuse-overlayfs1.13-1.module_el8.10.0+3792+03eaed9cALSA-2024:8038
AlmaLinux:8go-toolset1.21.13-1.module_el8.10.0+3895+92d465e0ALSA-2024:6908
AlmaLinux:9go-toolset1.21.13-3.el9_4ALSA-2024:6913
AlmaLinux:8golang1.21.13-2.module_el8.10.0+3895+92d465e0ALSA-2024:6908
AlmaLinux:9golang1.21.13-3.el9_4ALSA-2024:6913
AlmaLinux:8golang-bin1.21.13-2.module_el8.10.0+3895+92d465e0ALSA-2024:6908
AlmaLinux:9golang-bin1.21.13-3.el9_4ALSA-2024:6913
AlmaLinux:8golang-docs1.21.13-2.module_el8.10.0+3895+92d465e0ALSA-2024:6908
AlmaLinux:9golang-docs1.21.13-3.el9_4ALSA-2024:6913
AlmaLinux:8golang-misc1.21.13-2.module_el8.10.0+3895+92d465e0ALSA-2024:6908
AlmaLinux:9golang-misc1.21.13-3.el9_4ALSA-2024:6913
AlmaLinux:8golang-src1.21.13-2.module_el8.10.0+3895+92d465e0ALSA-2024:6908
AlmaLinux:9golang-src1.21.13-3.el9_4ALSA-2024:6913
AlmaLinux:8golang-tests1.21.13-2.module_el8.10.0+3895+92d465e0ALSA-2024:6908
AlmaLinux:9golang-tests1.21.13-3.el9_4ALSA-2024:6913
AlmaLinux:8libslirp4.4.0-2.module_el8.10.0+3858+6ad51f9fALSA-2024:8038
AlmaLinux:8libslirp4.4.0-2.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:8libslirp4.4.0-2.module_el8.10.0+3845+87b84552ALSA-2024:8038
AlmaLinux:8libslirp-devel4.4.0-2.module_el8.10.0+3858+6ad51f9fALSA-2024:8038
AlmaLinux:8libslirp-devel4.4.0-2.module_el8.10.0+3845+87b84552ALSA-2024:8038
AlmaLinux:8libslirp-devel4.4.0-2.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:8libslirp-devel4.4.0-2.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8netavark2:1.10.3-1.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8netavark2:1.10.3-1.module_el8.10.0+3845+87b84552ALSA-2024:8038
AlmaLinux:8netavark2:1.10.3-1.module_el8.10.0+3858+6ad51f9fALSA-2024:8038
AlmaLinux:8oci-seccomp-bpf-hook1.2.10-1.module_el8.10.0+3792+03eaed9cALSA-2024:8038
AlmaLinux:8oci-seccomp-bpf-hook1.2.10-1.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:9osbuild141-1.el9.alma.1ALSA-2025:7118
AlmaLinux:9osbuild-composer132-1.el9.alma.1ALSA-2025:7118
AlmaLinux:9osbuild-composer-core132-1.el9.alma.1ALSA-2025:7118
AlmaLinux:9osbuild-composer-worker132-1.el9.alma.1ALSA-2025:7118
AlmaLinux:9osbuild-depsolve-dnf141-1.el9.alma.1ALSA-2025:7118
AlmaLinux:9osbuild-luks2141-1.el9.alma.1ALSA-2025:7118
AlmaLinux:9osbuild-lvm2141-1.el9.alma.1ALSA-2025:7118
AlmaLinux:9osbuild-ostree141-1.el9.alma.1ALSA-2025:7118
AlmaLinux:9osbuild-selinux141-1.el9.alma.1ALSA-2025:7118
AlmaLinux:8podman4:4.9.4-13.module_el8.10.0+3898+7a25cb1aALSA-2024:8038
AlmaLinux:8podman4:4.9.4-13.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:9podman4:5.2.2-9.el9_5ALSA-2024:9454
AlmaLinux:9podman4:4.9.4-13.el9_4ALSA-2024:8039
AlmaLinux:8podman-catatonit4:4.9.4-13.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8podman-catatonit4:4.9.4-13.module_el8.10.0+3898+7a25cb1aALSA-2024:8038
AlmaLinux:8podman-docker4:4.9.4-13.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:9podman-docker4:5.2.2-9.el9_5ALSA-2024:9454
AlmaLinux:9podman-docker4:4.9.4-13.el9_4ALSA-2024:8039
AlmaLinux:8podman-gvproxy4:4.9.4-13.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8podman-plugins4:4.9.4-13.module_el8.10.0+3898+7a25cb1aALSA-2024:8038
AlmaLinux:8podman-plugins4:4.9.4-13.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:9podman-plugins4:4.9.4-13.el9_4ALSA-2024:8039
AlmaLinux:9podman-plugins4:5.2.2-9.el9_5ALSA-2024:9454
AlmaLinux:8podman-remote4:4.9.4-13.module_el8.10.0+3898+7a25cb1aALSA-2024:8038
AlmaLinux:8podman-remote4:4.9.4-13.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:9podman-remote4:4.9.4-13.el9_4ALSA-2024:8039
AlmaLinux:9podman-remote4:5.2.2-9.el9_5ALSA-2024:9454
AlmaLinux:8podman-tests4:4.9.4-13.module_el8.10.0+3898+7a25cb1aALSA-2024:8038
AlmaLinux:8podman-tests4:4.9.4-13.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:9podman-tests4:5.2.2-9.el9_5ALSA-2024:9454
AlmaLinux:9podman-tests4:4.9.4-13.el9_4ALSA-2024:8039
AlmaLinux:8python3-criu3.18-5.module_el8.10.0+3858+6ad51f9fALSA-2024:8038
AlmaLinux:8python3-criu3.18-5.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8python3-criu3.18-5.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:9python3-osbuild141-1.el9.alma.1ALSA-2025:7118
AlmaLinux:8python3-podman4.9.0-2.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:8runc1:1.1.12-5.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8skopeo2:1.14.5-3.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:8skopeo2:1.14.5-3.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8skopeo-tests2:1.14.5-3.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:8skopeo-tests2:1.14.5-3.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8slirp4netns1.2.3-1.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8slirp4netns1.2.3-1.module_el8.10.0+3845+87b84552ALSA-2024:8038
AlmaLinux:8slirp4netns1.2.3-1.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:8toolbox0.0.99.5-2.module_el8.10.0+3845+87b84552ALSA-2024:8038
AlmaLinux:8toolbox0.0.99.5-2.module_el8.10.0+3858+6ad51f9fALSA-2024:8038
AlmaLinux:8toolbox0.0.99.5-2.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8toolbox0.0.99.5-2.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:8toolbox-tests0.0.99.5-2.module_el8.10.0+3876+e55593a8ALSA-2024:8038
AlmaLinux:8toolbox-tests0.0.99.5-2.module_el8.10.0+3901+4b80ecd7ALSA-2024:8038
AlmaLinux:8toolbox-tests0.0.99.5-2.module_el8.10.0+3858+6ad51f9fALSA-2024:8038
AlmaLinux:8udica0.2.6-21.module_el8.10.0+3876+e55593a8ALSA-2024:8038
Alpine:v3.20go1.22.7-r0ALPINE-CVE-2024-34158
Alpine:v3.21go1.23.1-r0ALPINE-CVE-2024-34158
Alpine:v3.22go1.23.1-r0ALPINE-CVE-2024-34158
Alpine:v3.23go1.23.1-r0ALPINE-CVE-2024-34158
Alpine:v3.24go1.23.1-r0ALPINE-CVE-2024-34158
Debian:12golang-1.19no fix listedDEBIAN-CVE-2024-34158
Gostdlib1.22.7, 1.23.1GO-2024-3107
Rocky Linux:8aardvark-dns2:1.10.1-2.module+el8.10.0+1874+ce489889RLSA-2024:8038
Rocky Linux:8buildah2:1.33.8-4.module+el8.10.0+1843+6892ab28RLSA-2024:8038
Rocky Linux:8cockpit-podman0:84.1-1.module+el8.10.0+1815+5fe7415eRLSA-2024:8038
Rocky Linux:8conmon3:2.1.10-1.module+el8.10.0+1815+5fe7415eRLSA-2024:8038
Rocky Linux:8container-selinux2:2.229.0-2.module+el8.10.0+1815+5fe7415eRLSA-2024:8038
Rocky Linux:8containernetworking-plugins1:1.4.0-5.module+el8.10.0+1843+6892ab28RLSA-2024:8038
Rocky Linux:8containers-common2:1-82.module+el8.10.0+1843+6892ab28RLSA-2024:8038
Rocky Linux:8criu0:3.18-5.module+el8.10.0+1815+5fe7415eRLSA-2024:8038
Rocky Linux:8crun0:1.14.3-2.module+el8.10.0+1815+5fe7415eRLSA-2024:8038
Rocky Linux:8delve0:1.21.2-4.module+el8.10.0+1868+7f5969f2RLSA-2024:6908
Rocky Linux:8fuse-overlayfs0:1.13-1.module+el8.10.0+1815+5fe7415eRLSA-2024:8038
Rocky Linux:8go-toolset0:1.21.13-1.module+el8.10.0+1868+7f5969f2RLSA-2024:6908
Rocky Linux:8golang0:1.21.13-2.module+el8.10.0+1868+7f5969f2RLSA-2024:6908
Rocky Linux:9golang0:1.21.13-3.el9_4RLSA-2024:6913
Rocky Linux:8libslirp0:4.4.0-2.module+el8.10.0+1815+5fe7415eRLSA-2024:8038
Rocky Linux:8netavark2:1.10.3-1.module+el8.10.0+1815+5fe7415eRLSA-2024:8038
Rocky Linux:8oci-seccomp-bpf-hook0:1.2.10-1.module+el8.10.0+1815+5fe7415eRLSA-2024:8038
Rocky Linux:8podman4:4.9.4-13.module+el8.10.0+1871+e6fa1069RLSA-2024:8038
Rocky Linux:9podman4:4.9.4-13.el9_4RLSA-2024:8039
Rocky Linux:8python-podman0:4.9.0-2.module+el8.10.0+1843+6892ab28RLSA-2024:8038
Rocky Linux:8runc1:1.1.12-5.module+el8.10.0+1874+ce489889RLSA-2024:8038
Rocky Linux:8skopeo2:1.14.5-3.module+el8.10.0+1843+6892ab28RLSA-2024:8038
Rocky Linux:8slirp4netns0:1.2.3-1.module+el8.10.0+1815+5fe7415eRLSA-2024:8038
Rocky Linux:8toolbox0:0.0.99.5-2.module+el8.10.0+1815+5fe7415e.rocky.0.2.rocky.0.2RLSA-2024:8038
Rocky Linux:8udica0:0.2.6-21.module+el8.10.0+1815+5fe7415eRLSA-2024:8038
Ubuntu:22.04:LTSgolang-1.171.17.13-3ubuntu1.3UBUNTU-CVE-2024-34158
Ubuntu:22.04:LTSgolang-1.171.17.13-3ubuntu1.3USN-7111-1
Ubuntu:22.04:LTSgolang-1.181.18.1-1ubuntu1.2UBUNTU-CVE-2024-34158
Ubuntu:22.04:LTSgolang-1.181.18.1-1ubuntu1.2USN-7109-1
Ubuntu:22.04:LTSgolang-1.20no fix listedUBUNTU-CVE-2024-34158
Ubuntu:22.04:LTSgolang-1.21no fix listedUBUNTU-CVE-2024-34158
Ubuntu:24.04:LTSgolang-1.21no fix listedUBUNTU-CVE-2024-34158
Ubuntu:22.04:LTSgolang-1.221.22.2-2~22.04.2USN-7081-1
Ubuntu:22.04:LTSgolang-1.221.22.2-2~22.04.2UBUNTU-CVE-2024-34158
Ubuntu:24.04:LTSgolang-1.221.22.2-2ubuntu0.3UBUNTU-CVE-2024-34158
Ubuntu:24.04:LTSgolang-1.221.22.2-2ubuntu0.3USN-7081-1

Affected products (as reported)

VendorProductVersions
Go standard library go/build/constraint 0 – before 1.22.71.23.0-0 – before 1.23.1

Weakness: CWE-674 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References