Upstream: https://bugs.launchpad.net/brz/+bug/1710979
Upstream: https://sources.debian.org/patches/bzr/2.7.0+bzr6619-7+deb9u1/27_CVE-2017-14176/
Description: Prevent SSH command line options from being specified in bzr+ssh:// URLs
Bug: https://bugs.launchpad.net/brz/+bug/1710979
Bug-Debian: https://bugs.debian.org/874429
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2017-14176
Author: Jelmer Vernooij <jelmer@jelmer.uk>
=== modified file 'bzrlib/tests/test_ssh_transport.py'
--- bzrlib/tests/test_ssh_transport.py 2010-10-07 12:45:51 +0000
+++ bzrlib/tests/test_ssh_transport.py 2017-08-20 01:59:20 +0000
class SubprocessVendorsTests(TestCase):
+ def test_openssh_command_tricked(self):
+ vendor = OpenSSHSubprocessVendor()
+ vendor._get_vendor_specific_argv(
+ "user", "-oProxyCommand=blah", 100, command=["bzr"]),
+ ["ssh", "-oForwardX11=no", "-oForwardAgent=no",
+ "-oClearAllForwardings=yes",
+ "-oNoHostAuthenticationForLocalhost=yes",
+ "-oProxyCommand=blah", "bzr"])
def test_openssh_command_arguments(self):
vendor = OpenSSHSubprocessVendor()
"-oNoHostAuthenticationForLocalhost=yes",
"-oNoHostAuthenticationForLocalhost=yes",
+ "-s", "--", "host", "sftp"]
+ def test_openssh_command_tricked(self):
+ vendor = SSHCorpSubprocessVendor()
+ vendor._get_vendor_specific_argv,
+ "user", "-oProxyCommand=host", 100, command=["bzr"])
def test_sshcorp_command_arguments(self):
vendor = SSHCorpSubprocessVendor()
+ def test_lsh_command_tricked(self):
+ vendor = LSHSubprocessVendor()
+ vendor._get_vendor_specific_argv,
+ "user", "-oProxyCommand=host", 100, command=["bzr"])
def test_lsh_command_arguments(self):
vendor = LSHSubprocessVendor()
"--subsystem", "sftp", "host"]
+ def test_plink_command_tricked(self):
+ vendor = PLinkSubprocessVendor()
+ vendor._get_vendor_specific_argv,