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.
Name | Vendor | Start Version | End Version |
---|---|---|---|
Go | Golang | * | 1.20.9 (excluding) |
Go | Golang | 1.21.0 (including) | 1.21.2 (excluding) |
Red Hat Enterprise Linux 8 | RedHat | go-toolset:rhel8-8090020231013032436.26eb71ac | * |
Red Hat Enterprise Linux 8 | RedHat | rhel8/go-toolset:1.20.10-3 | * |
Red Hat Enterprise Linux 8 | RedHat | ubi8/go-toolset:1.20.10-3 | * |
Golang-1.17 | Ubuntu | jammy | * |
Golang-1.18 | Ubuntu | esm-apps/bionic | * |
Golang-1.18 | Ubuntu | esm-apps/xenial | * |
Golang-1.18 | Ubuntu | focal | * |
Golang-1.18 | Ubuntu | jammy | * |
Golang-1.19 | Ubuntu | bionic | * |
Golang-1.19 | Ubuntu | lunar | * |
Golang-1.19 | Ubuntu | trusty | * |
Golang-1.19 | Ubuntu | xenial | * |
Golang-1.20 | Ubuntu | bionic | * |
Golang-1.20 | Ubuntu | focal | * |
Golang-1.20 | Ubuntu | jammy | * |
Golang-1.20 | Ubuntu | lunar | * |
Golang-1.20 | Ubuntu | mantic | * |
Golang-1.20 | Ubuntu | trusty | * |
Golang-1.20 | Ubuntu | upstream | * |
Golang-1.20 | Ubuntu | xenial | * |
Golang-1.21 | Ubuntu | bionic | * |
Golang-1.21 | Ubuntu | focal | * |
Golang-1.21 | Ubuntu | jammy | * |
Golang-1.21 | Ubuntu | lunar | * |
Golang-1.21 | Ubuntu | mantic | * |
Golang-1.21 | Ubuntu | trusty | * |
Golang-1.21 | Ubuntu | upstream | * |
Golang-1.21 | Ubuntu | xenial | * |