Diff

Differences From Artifact [0273269591]:

To Artifact [aae0556a18]:


1772
1773
1774
1775
1776
1777
1778
1779
1780
1781



1782
1783
1784
1785
1786
1787
1788
1789
1790
1791

1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804


1805
1806
1807
1808
1809
1810
1811
1812
1813
1814

1815
1816
1817
1818
1819
1820
1821
1772
1773
1774
1775
1776
1777
1778



1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790

1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802


1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813

1814
1815
1816
1817
1818
1819
1820
1821







-
-
-
+
+
+









-
+











-
-
+
+









-
+







	 */
	ssh->remote_bugs |= BUG_CHOKES_ON_RSA;
	logevent("We believe remote version can't handle RSA authentication");
    }

    if (cfg.sshbug_hmac2 == BUG_ON ||
	(cfg.sshbug_hmac2 == BUG_AUTO &&
	 (!strncmp(imp, "2.1.0", 5) || !strncmp(imp, "2.0.", 4) ||
	  !strncmp(imp, "2.2.0", 5) || !strncmp(imp, "2.3.0", 5) ||
	  !strncmp(imp, "2.1 ", 4)))) {
	 (wc_match("2.1.0*", imp) || wc_match("2.0.*", imp) ||
	  wc_match("2.2.0*", imp) || wc_match("2.3.0*", imp) ||
	  wc_match("2.1 *", imp)))) {
	/*
	 * These versions have the HMAC bug.
	 */
	ssh->remote_bugs |= BUG_SSH2_HMAC;
	logevent("We believe remote version has SSH2 HMAC bug");
    }

    if (cfg.sshbug_derivekey2 == BUG_ON ||
	(cfg.sshbug_derivekey2 == BUG_AUTO &&
	 (!strncmp(imp, "2.0.", 4)))) {
	 (wc_match("2.0.*", imp)))) {
	/*
	 * These versions have the key-derivation bug (failing to
	 * include the literal shared secret in the hashes that
	 * generate the keys).
	 */
	ssh->remote_bugs |= BUG_SSH2_DERIVEKEY;
	logevent("We believe remote version has SSH2 key-derivation bug");
    }

    if (cfg.sshbug_rsapad2 == BUG_ON ||
	(cfg.sshbug_rsapad2 == BUG_AUTO &&
	 ((!strncmp(imp, "OpenSSH_2.", 10) && imp[10]>='5' && imp[10]<='9') ||
	  (!strncmp(imp, "OpenSSH_3.", 10) && imp[10]>='0' && imp[10]<='2')))){
	 (wc_match("OpenSSH_2.[5-9]*", imp) ||
	  wc_match("OpenSSH_3.[0-2]*", imp)))) {
	/*
	 * These versions have the SSH2 RSA padding bug.
	 */
	ssh->remote_bugs |= BUG_SSH2_RSA_PADDING;
	logevent("We believe remote version has SSH2 RSA padding bug");
    }

    if (cfg.sshbug_dhgex2 == BUG_ON) {
	/*
	 * These versions have the SSH2 DH GEX bug.
	 * User specified the SSH2 DH GEX bug.
	 */
	ssh->remote_bugs |= BUG_SSH2_DH_GEX;
	logevent("We believe remote version has SSH2 DH group exchange bug");
    }
}

static int do_ssh_init(Ssh ssh, unsigned char c)