Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2023-29403: [security] Go 1.20.5 and Go 1.19.10 are released

On Unix platforms, the Go runtime does not behave differently when a binary is run with the setuid/setgid bits. This can be dangerous in certain cases, such as when dumping memory state, or assuming the status of standard i/o file descriptors. If a setuid/setgid binary is executed with standard I/O file descriptors closed, opening any files can result in unexpected content being read or written with elevated privileges. Similarly, if a setuid/setgid program is terminated, either via panic or signal, it may leak the contents of its registers.

CVE
#web#google#git#c++

anno…@golang.org

unread,

Jun 6, 2023, 8:14:07 PM (2 days ago) Jun 6

to golan…@googlegroups.com

Hello gophers,

We have just released Go versions 1.20.5 and 1.19.10, minor point releases.

These minor releases include 3 security fixes following the security policy:

  • cmd/go: cgo code injection

    The go command may generate unexpected code at build time when using cgo. This
    may result in unexpected behavior when running a go program which uses cgo.

    This may occur when running an untrusted module which contains directories with
    newline characters in their names. Modules which are retrieved using the go command,
    i.e. via "go get", are not affected (modules retrieved using GOPATH-mode, i.e.
    GO111MODULE=off, may be affected).

    Thanks to Juho Nurminen of Mattermost for reporting this issue.

    This is CVE-2023-29402 and Go issue https://go.dev/issue/60167.

  • runtime: unexpected behavior of setuid/setgid binaries

    The Go runtime didn’t act any differently when a binary had the setuid/setgid
    bit set. On Unix platforms, if a setuid/setgid binary was executed with standard
    I/O file descriptors closed, opening any files could result in unexpected
    content being read/written with elevated prilieges. Similarly if a setuid/setgid
    program was terminated, either via panic or signal, it could leak the contents
    of its registers.

    Thanks to Vincent Dehors from Synacktiv for reporting this issue.

    This is CVE-2023-29403 and Go issue https://go.dev/issue/60272.

  • cmd/go: improper sanitization of LDFLAGS

    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.

    Thanks to Juho Nurminen of Mattermost for reporting this issue.

    This is CVE-2023-29404 and CVE-2023-29405 and Go issues https://go.dev/issue/60305 and https://go.dev/issue/60306.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.20.5

You can download binary and source distributions from the Go website:
https://go.dev/dl/

To compile from source using a Git clone, update to the release with
git checkout go1.20.5 and build as usual.

Thanks to everyone who contributed to the releases.

Cheers,
David and Michael for the Go team

Ian Lance Taylor

unread,

Jun 6, 2023, 10:00:13 PM (2 days ago) Jun 6

to golan…@googlegroups.com

On Tue, Jun 6, 2023 at 11:12 AM <anno…@golang.org> wrote:
>
> cmd/go: improper sanitization of LDFLAGS
>
> 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.

Due to an unfortunate mistake, this change will break the use of “#cgo
LDFLAGS” directives when using -compiler=gccgo. Most people using
gccgo or GoLLVM use the cmd/go that is distributed with those tools,
and that is unaffected. Therefore, we will fix this in the next minor
release. The current minor releases 1.20.5 and 1.19.10 are
unfortunately broken for some cases when using gccgo or GoLLVM. Our
apologies for the mishap. Thanks to Jeffrey Tolar for spotting the
problem.

Ian

Related news

Ubuntu Security Notice USN-7109-1

Ubuntu Security Notice 7109-1 - Philippe Antoine discovered that Go incorrectly handled crafted HTTP/2 streams. An attacker could possibly use this issue to cause a denial of service. Marten Seemann discovered that Go did not properly manage memory under certain circumstances. An attacker could possibly use this issue to cause a panic resulting in a denial of service. Ameya Darshan and Jakob Ackermann discovered that Go did not properly validate the amount of memory and disk files ReadForm can consume. An attacker could possibly use this issue to cause a panic resulting in a denial of service.

Ubuntu Security Notice USN-7061-1

Ubuntu Security Notice 7061-1 - Hunter Wittenborn discovered that Go incorrectly handled the sanitization of environment variables. An attacker could possibly use this issue to run arbitrary commands. Sohom Datta discovered that Go did not properly validate backticks as Javascript string delimiters, and did not escape them as expected. An attacker could possibly use this issue to inject arbitrary Javascript code into the Go template.

Red Hat Security Advisory 2024-4119-03

Red Hat Security Advisory 2024-4119-03 - Updated rhceph-5.3 container image is now available in the Red Hat Ecosystem Catalog. Issues addressed include a code execution vulnerability.

Gentoo Linux Security Advisory 202311-09

Gentoo Linux Security Advisory 202311-9 - Multiple vulnerabilities have been discovered in Go, the worst of which could lead to remote code execution. Versions greater than or equal to 1.20.10 are affected.

CVE-2023-22130: Oracle Critical Patch Update Advisory - October 2023

Vulnerability in the Sun ZFS Storage Appliance product of Oracle Systems (component: Core). The supported version that is affected is 8.8.60. Difficult to exploit vulnerability allows unauthenticated attacker with network access via HTTP to compromise Sun ZFS Storage Appliance. Successful attacks of this vulnerability can result in unauthorized ability to cause a hang or frequently repeatable crash (complete DOS) of Sun ZFS Storage Appliance. CVSS 3.1 Base Score 5.9 (Availability impacts). CVSS Vector: (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H).

RHSA-2023:3923: Red Hat Security Advisory: go-toolset and golang security update

An update for go-toolset and golang is now available for Red Hat Enterprise Linux 9. Red Hat Product Security has rated this update as having a security impact of Critical. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available for each vulnerability from the CVE link(s) in the References section.This content is licensed under the Creative Commons Attribution 4.0 International License (https://creativecommons.org/licenses/by/4.0/). If you distribute this content, or a modified version of it, you must provide attribution to Red Hat Inc. and provide a link to the original. Related CVEs: * CVE-2023-29402: The go command may generate unexpected code at build time when using cgo. This may result in unexpected behavior when running a go program which uses cgo. This may occur when running an untrusted module which contains directories with newline characters in their names. Modules which are retrieved using the go command, i.e. via "go g...

RHSA-2023:3922: Red Hat Security Advisory: go-toolset:rhel8 security update

An update for the go-toolset:rhel8 module is now available for Red Hat Enterprise Linux 8. Red Hat Product Security has rated this update as having a security impact of Critical. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available for each vulnerability from the CVE link(s) in the References section.This content is licensed under the Creative Commons Attribution 4.0 International License (https://creativecommons.org/licenses/by/4.0/). If you distribute this content, or a modified version of it, you must provide attribution to Red Hat Inc. and provide a link to the original. Related CVEs: * CVE-2023-29402: The go command may generate unexpected code at build time when using cgo. This may result in unexpected behavior when running a go program which uses cgo. This may occur when running an untrusted module which contains directories with newline characters in their names. Modules which are retrieved using the go command, i.e. via...

RHSA-2023:3920: Red Hat Security Advisory: go-toolset-1.19 and go-toolset-1.19-golang security update

An update for go-toolset-1.19 and go-toolset-1.19-golang is now available for Red Hat Developer Tools. Red Hat Product Security has rated this update as having a security impact of Critical. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available for each vulnerability from the CVE link(s) in the References section.This content is licensed under the Creative Commons Attribution 4.0 International License (https://creativecommons.org/licenses/by/4.0/). If you distribute this content, or a modified version of it, you must provide attribution to Red Hat Inc. and provide a link to the original. Related CVEs: * CVE-2023-29402: The go command may generate unexpected code at build time when using cgo. This may result in unexpected behavior when running a go program which uses cgo. This may occur when running an untrusted module which contains directories with newline characters in their names. Modules which are retrieved using the go comma...

CVE-2023-29404: cmd/go: improper sanitization of LDFLAGS [CVE-2023-29404] · Issue #60305 · golang/go

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. The arguments for a number of flags which are non-optional are incorrectly considered optional, allowing disallowed flags to be smuggled through the LDFLAGS sanitization. This affects usage of both the gc and gccgo compilers.

CVE-2023-29405: cmd/go: improper sanitization of LDFLAGS [CVE-2023-29405] · Issue #60306 · golang/go

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.

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda
CVE-2023-6905
CVE-2023-6903
CVE-2023-6904
CVE-2023-3907