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

Switch to x/sys/execabs for windows security fix #3

Merged
merged 2 commits into from
Aug 2, 2021
Merged

Switch to x/sys/execabs for windows security fix #3

merged 2 commits into from
Aug 2, 2021

Conversation

Jacalz
Copy link
Contributor

@Jacalz Jacalz commented Jul 31, 2021

The os/exec package on Windows will match the behaviour of cmd.exe by considering the local folder as a primary part of the path. This means that a malicious binary with the same name, in the current folder, would be run instead of the expected binary in the system path. Due to the backwards compat being an issue, this could not be fixed within ox/exec before Go v2. See https://blog.golang.org/path-security for more info.

This should not change any behaviour for anything else than Windows platforms. I have switched everything to use the new package for the sake of consistency and avoiding to compile two very similar packages into the binary.

Jacalz added 2 commits July 31, 2021 13:32
Just some various fixes and improvements. Not necessarilly related to this change.
The os/exec package on Windows will match the behaviour of cmd.exe by considering the local folder as a primary part of the path. This means that a malicious binary with the same name, in the current folder, would be run instead of the expected binary in the system path. Due to the backwards compat being an issue, this could not be fixed within ox/exec before Go v2. See https://blog.golang.org/path-security for more info.

This should not change any behaviour for anything else than Windows platforms. I have switched everything to use the new package for the sake of consistency and avoiding to compile two very similar packages into the binary.
@lucor lucor merged commit fce12a3 into lucor:master Aug 2, 2021
@lucor
Copy link
Owner

lucor commented Aug 2, 2021

Thanks :)

@Jacalz
Copy link
Contributor Author

Jacalz commented Aug 2, 2021

You're welcome. I plan on opening a similar PR for fyne-cross as well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants