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

DOS-style socket paths are too permissive #24

Closed
cuviper opened this issue Nov 16, 2014 · 1 comment
Closed

DOS-style socket paths are too permissive #24

cuviper opened this issue Nov 16, 2014 · 1 comment
Labels

Comments

@cuviper
Copy link
Owner

cuviper commented Nov 16, 2014

$ ssh-pageant -a "$(cygpath -w /tmp/foo)" sh -c 'ls -l $SSH_AUTH_SOCK'
srw-r--r-- 1 jistone None 0 Nov 16 14:22 C:\cygwin64\tmp\foo

Note that both group and other have read access, despite the internal umask 0177 used when binding the socket path. I hoped for a moment that other users still couldn't send requests to the agent without write access, but unfortunately they can!

This is a semi-intentional "feature" since cygwin 1.7.2, “Handle native DOS paths always as if mounted with "posix=0,noacl".” Without ACLs, umask and chmod are ineffective. At least Windows machines are usually single-user...

I think this can be fixed by using cygwin_conv_path to posix before binding.

@cuviper cuviper added the defect label Nov 16, 2014
@cuviper
Copy link
Owner Author

cuviper commented Nov 16, 2014

In a brief test with MSYS, it seems to always ignore umask and chmod, no matter what style of path is used, so I don't think that one can be fixed. The default /tmp path appears to be $LOCALAPPDATA though, which should be private at the Windows level.

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

No branches or pull requests

1 participant