git-annex/Assistant
Joey Hess df11e54788
avoid the dashed ssh hostname class of security holes
Security fix: Disallow hostname starting with a dash, which would get
passed to ssh and be treated an option. This could be used by an attacker
who provides a crafted ssh url (for eg a git remote) to execute arbitrary
code via ssh -oProxyCommand.

No CVE has yet been assigned for this hole.
The same class of security hole recently affected git itself,
CVE-2017-1000117.

Method: Identified all places where ssh is run, by git grep '"ssh"'
Converted them all to use a SshHost, if they did not already, for
specifying the hostname.

SshHost was made a data type with a smart constructor, which rejects
hostnames starting with '-'.

Note that git-annex already contains extensive use of Utility.SafeCommand,
which fixes a similar class of problem where a filename starting with a
dash gets passed to a program which treats it as an option.

This commit was sponsored by Jochen Bartl on Patreon.
2017-08-17 22:11:31 -04:00
..
Alert remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Install avoid warnings about not exported System.Directory.isSymbolicLink 2016-04-28 15:18:11 -04:00
Pairing avoid the dashed ssh hostname class of security holes 2017-08-17 22:11:31 -04:00
Threads assistant: Merge changes from refs/remotes/foo/master into master. 2017-06-07 16:17:46 -04:00
Types remove xmpp support 2016-11-14 14:53:08 -04:00
WebApp avoid the dashed ssh hostname class of security holes 2017-08-17 22:11:31 -04:00
Alert.hs fix tricky warning with ghc 8 2016-11-15 18:51:07 -04:00
BranchChange.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
Changes.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
Commits.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
Common.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
CredPairCache.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
DaemonStatus.hs add annex-ignore-command and annex-sync-command configs 2017-08-17 13:54:14 -04:00
DeleteRemote.hs AssociatedFile newtype 2017-03-10 13:35:31 -04:00
Drop.hs add VerifiedCopy data type 2015-10-08 16:55:11 -04:00
Fsck.hs Relicense 5 source files that are not part of the webapp from AGPL to GPL. 2016-11-21 23:46:59 -04:00
Gpg.hs Relicense 5 source files that are not part of the webapp from AGPL to GPL. 2016-11-21 23:46:59 -04:00
Install.hs make assistant not write wrappers when GIT_ANNEX_PACKAGE_INSTALL is set 2016-04-27 14:05:46 -04:00
MakeRemote.hs add annex-ignore-command and annex-sync-command configs 2017-08-17 13:54:14 -04:00
Monad.hs remove xmpp support 2016-11-14 14:53:08 -04:00
NamedThread.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Pairing.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Pushes.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
RemoteControl.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
Repair.hs Relicense 5 source files that are not part of the webapp from AGPL to GPL. 2016-11-21 23:46:59 -04:00
RepoProblem.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
Restart.hs Relicense 5 source files that are not part of the webapp from AGPL to GPL. 2016-11-21 23:46:59 -04:00
ScanRemotes.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
Ssh.hs avoid the dashed ssh hostname class of security holes 2017-08-17 22:11:31 -04:00
Sync.hs add annex-ignore-command and annex-sync-command configs 2017-08-17 13:54:14 -04:00
TransferQueue.hs get, move, copy, mirror: Added --failed switch which retries failed copies/moves 2016-08-03 12:37:12 -04:00
TransferrerPool.hs Always use filesystem encoding for all file and handle reads and writes. 2016-12-24 14:46:31 -04:00
TransferSlots.hs AssociatedFile newtype 2017-03-10 13:35:31 -04:00
Unused.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Upgrade.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
WebApp.hs unified AuthToken type between webapp and tor 2016-11-22 14:18:34 -04:00