Use golang.org/x/sys/execabs#2950
Merged
Merged
Conversation
tiborvass
commented
Jan 25, 2021
| github.com/docker/distribution 0d3efadf0154c2b8a4e7b6621fff9809655cc580 | ||
| github.com/docker/docker f0014860c1b3345e1fcc7ed81c491298de2633fb # v20.10.1 | ||
| github.com/docker/docker-credential-helpers 54f0238b6bf101fc3ad3b34114cb5520beb562f5 # v0.6.3 | ||
| github.com/docker/docker 7ca0cb7ffafc5339ac5fa575ce3f8b479c3643bf https://github.com/tiborvass/docker |
Collaborator
Author
There was a problem hiding this comment.
wip, updating when moby/moby#41927 is merged
added 2 commits
January 26, 2021 17:18
…ackage Signed-off-by: Tibor Vass <[email protected]>
On Windows, the os/exec.{Command,CommandContext,LookPath} functions
resolve command names that have neither path separators nor file extension
(e.g., "git") by first looking in the current working directory before
looking in the PATH environment variable.
Go maintainers intended to match cmd.exe's historical behavior.
However, this is pretty much never the intended behavior and as an abundance of precaution
this patch prevents that when executing commands.
Example of commands that docker.exe may execute: `git`, `docker-buildx` (or other cli plugin), `docker-credential-wincred`, `docker`.
Note that this was prompted by the [Go 1.15.7 security fixes](https://blog.golang.org/path-security), but unlike in `go.exe`,
the windows path lookups in docker are not in a code path allowing remote code execution, thus there is no security impact on docker.
Signed-off-by: Tibor Vass <[email protected]>
tiborvass
marked this pull request as ready for review
January 26, 2021 17:20
tonistiigi
approved these changes
Jan 26, 2021
thaJeztah
approved these changes
Jan 27, 2021
| github.com/docker/docker f0014860c1b3345e1fcc7ed81c491298de2633fb # v20.10.1 | ||
| github.com/docker/docker-credential-helpers 54f0238b6bf101fc3ad3b34114cb5520beb562f5 # v0.6.3 | ||
| github.com/docker/docker d5209b29b9777e0b9713d87847a5dc8ce9d93da6 | ||
| github.com/docker/docker-credential-helpers 38bea2ce277ad0c9d2a6230692b0606ca5286526 |
Member
There was a problem hiding this comment.
Think we should tag a release for the creds helpers?
Member
|
These changes were cherry-picked into the 20.10 release branch, and released as part of v20.10.3; v20.10.2...v20.10.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows, the os/exec.{Command,CommandContext,LookPath} functions
resolve command names that have neither path separators nor file extension
(e.g., "git") by first looking in the current working directory before
looking in the PATH environment variable.
Go maintainers intended to match cmd.exe's historical behavior.
However, this is pretty much never the intended behavior and as an abundance of precaution
this patch prevents that when executing commands.
Example of commands that docker.exe may execute:
git,docker-buildx(or other cli plugin),docker-credential-wincred,docker.Note that this was prompted by the Go 1.15.7 security fixes, but unlike in
go.exe,the windows path lookups in docker are not in a code path allowing remote code execution, thus there is no security impact on docker.
Signed-off-by: Tibor Vass [email protected]