-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Use golang.org/x/sys/execabs #2950
Conversation
vendor.conf
Outdated
@@ -13,8 +13,8 @@ github.com/creack/pty 2a38352e8b4d7ab6c336eef107e4 | |||
github.com/davecgh/go-spew 8991bc29aa16c548c550c7ff78260e27b9ab7c73 # v1.1.1 | |||
github.com/docker/compose-on-kubernetes 78e6a00beda64ac8ccb9fec787e601fe2ce0d5bb # v0.5.0-alpha1 | |||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wip, updating when moby/moby#41927 is merged
…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]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we should tag a release for the creds helpers?
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 |
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]