Skip to content

security: fix CVE-2022-41716 [1.18 backport] #56327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gopherbot opened this issue Oct 19, 2022 · 2 comments
Closed

security: fix CVE-2022-41716 [1.18 backport] #56327

gopherbot opened this issue Oct 19, 2022 · 2 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge Security
Milestone

Comments

@gopherbot
Copy link
Contributor

@neild requested issue #56284 to be considered for backport to the next 1.18 minor release.

@gopherbot please open backport issues

(Sorry, I keep getting the process on this wrong. This issue is for the fix, backport issues for upcoming minor releases.)

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Oct 19, 2022
@gopherbot gopherbot added this to the Go1.18.8 milestone Oct 19, 2022
@neild neild added the Security label Oct 19, 2022
@heschi heschi added the CherryPickApproved Used during the release process for point releases label Oct 26, 2022
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Oct 26, 2022
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/446915 mentions this issue: [release-branch.go1.18] syscall, os/exec: reject environment variables containing NULs

@gopherbot
Copy link
Contributor Author

Closed by merging aba57b0 to release-branch.go1.18.

gopherbot pushed a commit that referenced this issue Nov 1, 2022
…s containing NULs

Check for and reject environment variables containing NULs.

The conventions for passing environment variables to subprocesses
cause most or all systems to interpret a NUL as a separator. The
syscall package rejects environment variables containing a NUL
on most systems, but erroneously did not do so on Windows. This
causes an environment variable such as "FOO=a\x00BAR=b" to be
interpreted as "FOO=a", "BAR=b".

Check for and reject NULs in environment variables passed to
syscall.StartProcess on Windows.

Add a redundant check to os/exec as extra insurance.

Updates #56284
Fixes #56327
Fixes CVE-2022-41716

Change-Id: I2950e2b0cb14ebd26e5629be1521858f66a7d4ae
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1609434
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
Reviewed-by: Roland Shoemaker <bracewell@google.com>
TryBot-Result: Security TryBots <security-trybots@go-security-trybots.iam.gserviceaccount.com>
(cherry picked from commit 845accdebb2772c5344ed0c96df9910f3b02d741)
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1617552
Run-TryBot: Tatiana Bradley <tatianabradley@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/446915
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
@golang golang locked and limited conversation to collaborators Nov 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge Security
Projects
None yet
Development

No branches or pull requests

3 participants