<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>30518</bug_id>
          
          <creation_ts>2014-11-27 23:24:25 +0300</creation_ts>
          <short_desc>can&apos;t connect to host with old sshd</short_desc>
          <delta_ts>2016-02-10 15:01:30 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>openssh</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sergey Bolshakov">sbolshakov</reporter>
          <assigned_to name="Gleb F-Malinovskiy">glebfm</assigned_to>
          <cc>evg</cc>
    
    <cc>glebfm</cc>
    
    <cc>lav</cc>
    
    <cc>ldv</cc>
    
    <cc>mike</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>149060</commentid>
    <comment_count>0</comment_count>
    <who name="Sergey Bolshakov">sbolshakov</who>
    <bug_when>2014-11-27 23:24:25 +0300</bug_when>
    <thetext>после апдейта на openssh-clients-6.7p1-alt1
стало невозможным зайти на хост с openssh-server-5.9p1-alt2:
(вывод ssh -v xxx, несколько очищенный от лишних деталей)
--- %&lt; ---
...
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9
debug1: match: OpenSSH_5.9 pat OpenSSH_5* compat 0x0c000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server-&gt;client aes256-ctr umac-64@openssh.com none
debug1: kex: client-&gt;server aes256-ctr umac-64@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA e6:05:e9:f7:e9:ba:03:60:0c:31:d7:a7:b0:5a:8b:8b
debug1: Host &apos;[xxx]:222&apos; is known and matches the ECDSA host key.
debug1: Found key in .../.ssh/known_hosts:45
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
Connection closed by xxx
--- %&lt; ---

на стороне сервера при этом в логе:
--- %&lt; ---
Nov 27 23:09:01 xxx sshd[4302]: Corrupted MAC on input. [preauth]
Nov 27 23:09:01 xxx sshd[4302]: fatal: packet_disconnect called recursively. [preauth]
--- %&lt; ---

с других хостов, в т.ч использующих предпоследний openssh-clients-6.6p1-alt3
проблем с заходом на xxx нет.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>149061</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2014-11-27 23:48:02 +0300</bug_when>
    <thetext>Corrupted MAC on input?
А если на 6.6p1-alt3 попробовать этот же MAC, -o &apos;macs umac-64@openssh.com&apos;?
А если на 6.7p1-alt1 попробовать какой-нибудь другой MAC, например, -o &apos;macs hmac-sha2-256&apos;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>149062</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2014-11-28 01:03:59 +0300</bug_when>
    <thetext>У меня на чистой установке не воспроизвелось:
...
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9
debug1: match: OpenSSH_5.9 pat OpenSSH_5* compat 0x0c000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server-&gt;client aes256-ctr umac-64@openssh.com none
debug1: kex: client-&gt;server aes256-ctr umac-64@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 02:5e:95:b0:f6:1c:a7:13:0e:06:cf:86:44:d2:2f:1b
debug1: Host &apos;[xxx]:222&apos; is known and matches the ECDSA host key.
debug1: Found key in /usr/src/.ssh/known_hosts:1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>149070</commentid>
    <comment_count>3</comment_count>
    <who name="Evgenii Terechkov">evg</who>
    <bug_when>2014-11-28 11:14:32 +0300</bug_when>
    <thetext>Похоже что при обновлении 6.6-&gt;6.7 изменился список приемлимых шифров. 27.11.2014 обновился на нескольких машинах (конфиг openssh-server из пакетов, неизменный):
===8&lt;========================================================
Transaction starting at Thu 27 Nov 2014 09:43:00 AM KRAT
Installing libedit3 3.1.20141030-alt1
Upgrading openssh-server 6.6p1-alt3 to 6.7p1-alt1
Upgrading openssh-server-control 6.6p1-alt3 to 6.7p1-alt1
Upgrading openssh 6.6p1-alt3 to 6.7p1-alt1
Upgrading openssh-clients 6.6p1-alt3 to 6.7p1-alt1
Upgrading openssh-common 6.6p1-alt3 to 6.7p1-alt1
Transaction succeeded at Thu 27 Nov 2014 09:43:03 AM KRAT
===8&lt;========================================================

и только к концу рабочего дня обнаружил, что не могу подключиться к ним графическим клиентом из под ОС Windows, который жалуется, что не нашел общих шифров с сервером. На серверах при этом такие логи:

===8&lt;========================================================
Nov 27 16:14:31 xxx sshd[971798]: fatal: no matching cipher found: client aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc@lysator.liu.se server aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr,chacha20-poly1305@openssh.com [preauth]
Nov 27 16:14:38 xxx sshd[971849]: fatal: no matching cipher found: client aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc@lysator.liu.se server aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr,chacha20-poly1305@openssh.com [preauth]
Nov 27 16:15:47 xxx sshd[972055]: fatal: no matching cipher found: client aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc@lysator.liu.se server aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr,chacha20-poly1305@openssh.com [preauth]
Nov 27 16:21:23 xxx sshd[973207]: fatal: no matching cipher found: client aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc@lysator.liu.se server aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr,chacha20-poly1305@openssh.com [preauth]
===8&lt;========================================================

обошел проблему путём включения в список разрешенных шифров на клиенте aes192-ctr, aes128-ctr, aes256-ctr (не знаю, почему они у меня были выключены).

Но это явный баг.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>149074</commentid>
    <comment_count>4</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2014-11-28 15:00:25 +0300</bug_when>
    <thetext>(In reply to comment #3)
&gt; обошел проблему путём включения в список разрешенных шифров на клиенте
&gt; aes192-ctr, aes128-ctr, aes256-ctr (не знаю, почему они у меня были выключены).
&gt; 
&gt; Но это явный баг.

Это явный, но не баг, см. /usr/share/doc/openssh-6.7p1/CHANGES:

Changes since OpenSSH 6.6
=========================

Potentially-incompatible changes

 * sshd(8): The default set of ciphers and MACs has been altered to
   remove unsafe algorithms. In particular, CBC ciphers and arcfour*
   are disabled by default.

   The full set of algorithms remains available if configured
   explicitly via the Ciphers and MACs sshd_config options.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>149077</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2014-11-28 15:10:31 +0300</bug_when>
    <thetext>Если что, 6.7p1-alt1 на 3.6.1p2-alt6 сходил всё так же.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>149079</commentid>
    <comment_count>6</comment_count>
    <who name="Evgenii Terechkov">evg</who>
    <bug_when>2014-11-28 18:25:49 +0300</bug_when>
    <thetext>Извиняюсь, проморгал. Но не ожидал такой пороси от казалось бы минорного обновления. С другой стороны, хорошо, security is supposed to break things :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>149333</commentid>
    <comment_count>7</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2014-12-16 14:48:59 +0300</bug_when>
    <thetext>(In reply to comment #1)
&gt; Corrupted MAC on input?
&gt; А если на 6.6p1-alt3 попробовать этот же MAC, -o &apos;macs umac-64@openssh.com&apos;?
&gt; А если на 6.7p1-alt1 попробовать какой-нибудь другой MAC, например, -o &apos;macs
&gt; hmac-sha2-256&apos;?

ping?
И еще, какая архитектура у того хоста с openssh-server-5.9p1-alt2?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>149334</commentid>
    <comment_count>8</comment_count>
    <who name="Sergey Bolshakov">sbolshakov</who>
    <bug_when>2014-12-16 15:34:48 +0300</bug_when>
    <thetext>(В ответ на комментарий №7)
&gt; (In reply to comment #1)
&gt; &gt; Corrupted MAC on input?
&gt; &gt; А если на 6.6p1-alt3 попробовать этот же MAC, -o &apos;macs umac-64@openssh.com&apos;?
&gt; &gt; А если на 6.7p1-alt1 попробовать какой-нибудь другой MAC, например, -o &apos;macs
&gt; &gt; hmac-sha2-256&apos;?
&gt; 
&gt; ping?
&gt; И еще, какая архитектура у того хоста с openssh-server-5.9p1-alt2?

с другим mac пускало.
Я явно прописал список MACs на сервере, оказалось достаточно.
Это наш старый armv5, так что врядли что-то стоит делать.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>149335</commentid>
    <comment_count>9</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2014-12-16 16:41:58 +0300</bug_when>
    <thetext>(In reply to comment #8)
&gt; (В ответ на комментарий №7)
&gt; &gt; (In reply to comment #1)
&gt; &gt; &gt; Corrupted MAC on input?
&gt; &gt; &gt; А если на 6.6p1-alt3 попробовать этот же MAC, -o &apos;macs umac-64@openssh.com&apos;?
&gt; &gt; &gt; А если на 6.7p1-alt1 попробовать какой-нибудь другой MAC, например, -o &apos;macs
&gt; &gt; &gt; hmac-sha2-256&apos;?
&gt; &gt; 
&gt; &gt; ping?
&gt; &gt; И еще, какая архитектура у того хоста с openssh-server-5.9p1-alt2?
&gt; 
&gt; с другим mac пускало.
&gt; Я явно прописал список MACs на сервере, оказалось достаточно.
&gt; Это наш старый armv5, так что врядли что-то стоит делать.

В старых реализациях umac-*@openssh.com на не-x86 были проблемы такого рода.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>