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

[Security]Check file permissions of system wide ssh_config file. #1753

Closed
bagajjal opened this issue Mar 11, 2021 · 1 comment
Closed

[Security]Check file permissions of system wide ssh_config file. #1753

bagajjal opened this issue Mar 11, 2021 · 1 comment
Assignees
Milestone

Comments

@bagajjal
Copy link
Collaborator

bagajjal commented Mar 11, 2021

Windows don't have a system-wide ssh folder ($env:Programdata\ssh) by default.
Assume a non-admin user creates the system-wide ssh folder and then the admin user installs the win32-OpenSSH.
Admin user later manually creates the system-wide ssh_config ($env:Programdata\ssh\ssh_config). By default, this file inherits the parent folder permissions i.e., the non-admin user has the write permission.
This is not desirable.

Proposed fix - ssh.exe should check the file permissions on system-wide ssh_config file. If this file has write permissions for non admin users then fail the ssh connection.

@bagajjal
Copy link
Collaborator Author

bagajjal commented Mar 12, 2021

Associated upstream bug,
https://bugzilla.mindrot.org/show_bug.cgi?id=3277

OpenBSD team plan to fix this in next version i.e., OpenSSH v8.6

@bagajjal bagajjal changed the title Check file permissions of system wide ssh_config file. [Security]Check file permissions of system wide ssh_config file. May 14, 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

No branches or pull requests

1 participant