Skip to content
OpenAdvisories

Description

Line directives ("//line") can be used to bypass the restrictions on "//go:cgo_" directives, allowing blocked linker and compiler flags to be passed during compilation. This can result in unexpected execution of arbitrary code when running "go build". The line directive requires the absolute path of the file in which the directive lives, which makes exploiting this issue significantly more complex.

Affected products

VendorProductAffectedFixed
Go toolchain cmd/go < 1.20.9, 1.21.0-0 – < 1.21.2 1.20.9

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 12 golang-1.19 No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 22.04 LTS golang-1.17 1.17.13-3ubuntu1.3 USN-7111-1
Ubuntu 22.04 LTS golang-1.18 1.18.1-1ubuntu1.2 USN-7109-1
Ubuntu 22.04 LTS golang-1.20 1.20.3-1ubuntu0.1~22.04.1 USN-6574-1
Ubuntu 22.04 LTS golang-1.21 1.21.1-1~ubuntu22.04.2 USN-6574-1
Ubuntu 20.04 LTS golang-1.18 1.18.1-1ubuntu1~20.04.3 USN-7109-1
Ubuntu 20.04 LTS golang-1.20 1.20.3-1ubuntu0.1~20.04.1 USN-6574-1
Ubuntu 20.04 LTS golang-1.21 1.21.1-1~ubuntu20.04.2 USN-6574-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 18.04 LTS golang-1.18 1.18.1-1ubuntu1~18.04.4+esm1 USN-7109-1
Ubuntu Pro 16.04 LTS golang-1.18 1.18.1-1ubuntu1~16.04.6+esm1 USN-7109-1
ReleasePackageFixed inAdvisory
RHEL 8 delve 1.20.2-1.module+el8.9.0+18926+5193682d RHBA-2023:6928
RHEL 8 golang +6 1.20.10-1.module+el8.9.0+20382+04f7fe80 RHBA-2023:6928
ReleasePackageFixed inAdvisory
SLES 15 SP5 go1.20 1.20.9-150000.1.26.1 SUSE-SU-2023:4018-1
SLES 15 SP5 go1.20-openssl 1.20.11.1-150000.1.14.1 SUSE-SU-2023:4472-1
SLES 15 SP5 go1.21 1.21.2-150000.1.9.1 SUSE-SU-2023:4017-1
SLES 15 SP5 go1.21-openssl 1.21.4.1-150000.1.5.1 SUSE-SU-2023:4469-1
SLES 15 SP4 go1.20 1.20.9-150000.1.26.1 SUSE-SU-2023:4018-1
SLES 15 SP4 go1.20-openssl 1.20.11.1-150000.1.14.1 SUSE-SU-2023:4472-1
SLES 15 SP4 go1.21 1.21.2-150000.1.9.1 SUSE-SU-2023:4017-1
SLES 15 SP4 go1.21-openssl 1.21.4.1-150000.1.5.1 SUSE-SU-2023:4469-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SUSE Package Hub 12 go 1.21-41.1 openSUSE-SU-2023:0360-1
SUSE Package Hub 12 go1.21 1.21.3-2.1 openSUSE-SU-2023:0360-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed go1.20 1.20.9-1.1 openSUSE-SU-2024:13306-1
openSUSE Tumbleweed go1.21 1.21.2-1.1 openSUSE-SU-2024:13307-1
openSUSE Leap 15.5 go1.20 1.20.9-150000.1.26.1 SUSE-SU-2023:4018-1
openSUSE Leap 15.5 go1.20-openssl 1.20.11.1-150000.1.14.1 SUSE-SU-2023:4472-1
openSUSE Leap 15.5 go1.21 1.21.2-150000.1.9.1 SUSE-SU-2023:4017-1
openSUSE Leap 15.5 go1.21-openssl 1.21.4.1-150000.1.5.1 SUSE-SU-2023:4469-1
openSUSE Leap 15.4 go1.20 1.20.9-150000.1.26.1 SUSE-SU-2023:4018-1
openSUSE Leap 15.4 go1.20-openssl 1.20.11.1-150000.1.14.1 SUSE-SU-2023:4472-1
openSUSE Leap 15.4 go1.21 1.21.2-150000.1.9.1 SUSE-SU-2023:4017-1
openSUSE Leap 15.4 go1.21-openssl 1.21.4.1-150000.1.5.1 SUSE-SU-2023:4469-1
ReleasePackageFixed inAdvisory
Alpine v3.24 go 1.21.2-r0 —
Alpine v3.23 go 1.21.2-r0 —
Alpine v3.22 go 1.21.2-r0 —
Alpine v3.21 go 1.21.2-r0 —
Alpine v3.20 go 1.21.2-r0 —
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 go 1.21.2-r0 —
Alpine v3.18 go 1.20.9-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 ecs-service-connect-agent v1.27.2.0-1.amzn2023 ALAS2023-2023-420
Amazon Linux 2023 golang +6 1.20.10-1.amzn2023.0.1 ALAS2023-2023-394
Amazon Linux 2 golang +6 1.20.10-1.amzn2.0.1 ALAS2-2023-2313

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 golang 1.20.10-1 —
Azure Linux 2 (CBL-Mariner) golang 1.20.10-1 —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling katib-earlystopping +8 0.19.0-r31 —
Wolfi rolling katib-suggestion-goptuna-compat 0.19.0-r40 —
Wolfi rolling kind 0.21.0-r0 —
Wolfi rolling metrics-server 0.6.4-r2 —

Affected packages

EcosystemPackageAffectedFixedRecord
Go toolchain < 1.20.9 · >= 1.21.0-0, < 1.21.2 1.20.9, 1.21.2 GO-2023-2095

Advisories 15

References