Skip to content
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

os/exec: Cmd.{Run,Start} should fail if Cmd.Path is unset [1.18 backport] #53057

Closed
gopherbot opened this issue May 24, 2022 · 4 comments
Closed
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge Security
Milestone

Comments

@gopherbot
Copy link
Contributor

@rolandshoemaker requested issue #52574 to be considered for backport to the next 1.18 minor release.

@gopherbot please open backport issues, this is a minor security issue.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label May 24, 2022
@gopherbot gopherbot added this to the Go1.18.3 milestone May 24, 2022
@toothrot toothrot added the CherryPickApproved Used during the release process for point releases label May 25, 2022
@toothrot
Copy link
Contributor

Approved. This is a serious issue with no workaround. @rolandshoemaker Does this need security text?

@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label May 25, 2022
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/408577 mentions this issue: [release-branch.go1.18] os/exec: return clear error for missing cmd.Path

@rolandshoemaker
Copy link
Member

@toothrot Yup, will follow-up OOB.

@gopherbot
Copy link
Contributor Author

Closed by merging 6c65a4a to release-branch.go1.18.

gopherbot pushed a commit that referenced this issue May 27, 2022
Following up on CL 403694, there is a bit of confusion about
when Path is and isn't set, along with now the exported Err field.
Catch the case where Path and Err (and lookPathErr) are all unset
and give a helpful error.

Updates #52574
Followup after #43724.

Fixes #53057
Fixes CVE-2022-30580

Change-Id: I03205172aef3801c3194f5098bdb93290c02b1b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/403759
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
(cherry picked from commit 960ffa9)
Reviewed-on: https://go-review.googlesource.com/c/go/+/408577
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
@golang golang locked and limited conversation to collaborators May 27, 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

4 participants