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 execution to x/sys/execabs for windows security fix #255

Closed
wants to merge 1 commit into from
Closed

Switch execution to x/sys/execabs for windows security fix #255

wants to merge 1 commit into from

Conversation

Jacalz
Copy link
Contributor

@Jacalz Jacalz commented Aug 3, 2021

This may or may not be relevant. Feel free to close this PR if you don't think that it is useful. I don't know how much it makes sense (or is possible) to use dbus on Windows, but I wanted to be nice and open this as part of the efforts in fyne-io/fyne#2344. We do not use use this library on Windows in our use cases.

Summary of the reasoning behind 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 may or may not be relevant. I don't know how much it makes sense (or is possible) to use dbus on Windows, but I wanted to be nice and open this as part of the efforts in fyne-io/fyne#2344.

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.
@jsouthworth
Copy link
Member

This appears to cause a problem with the "TestDbusLaunchMultilineResponse" test.

@jsouthworth
Copy link
Member

I'm generally OK with the change as long as the test breakage is addressed.

@Jacalz
Copy link
Contributor Author

Jacalz commented Aug 6, 2021

I'm honestly not entirely sure why the test fails. Will have to look into it more.

@Jacalz
Copy link
Contributor Author

Jacalz commented Sep 5, 2021

Sorry. I have a little too much on my plate at the moment. Feel free to take this over if anyone is interested.

@Jacalz Jacalz closed this Sep 5, 2021
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