Bug 1688081

Summary: curl sftp only supports up to insecure sha1 kex/mac
Product: Red Hat Enterprise Linux 7 Reporter: Chris Cheney <ccheney>
Component: curlAssignee: Kamil Dudka <kdudka>
Status: CLOSED DUPLICATE QA Contact: Daniel Rusek <drusek>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.6CC: kdudka
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-13 11:55:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chris Cheney 2019-03-13 05:12:37 UTC
Description of problem:

  ** This BZ should probably be cloned to RHEL 6. **


  If you disable sha-1 KEX/MACs in openssh then sftp is no longer
  able to connect on both RHEL 6 and 7.

  curl only supports the following:

    KEX algorithms: diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 [preauth]
    MACs ctos: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96,hmac-ripemd160,hmac-ripemd160 [preauth]

   openssh after removing sha-1:

     KEX algorithms: curve25519-sha256,curve25519-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256 [preauth]
     MACs ctos: umac-64-etm,umac-128-etm,hmac-sha2-256-etm,hmac-sha2-512-etm,umac-64,umac-128,hmac-sha2-256,hmac-sha2-512 [preauth]


Version-Release number of selected component (if applicable):

  curl-7.29.0-51.el7.x86_64
  openssh-7.4p1-16.el7.x86_64


How reproducible:

  Easily see steps to reproduce.


Steps to Reproduce:
1.  edit /etc/ssh/sshd_config

    KexAlgorithms curve25519-sha256,curve25519-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
    MACs umac-64-etm,umac-128-etm,hmac-sha2-256-etm,hmac-sha2-512-etm,umac-64,umac-128,hmac-sha2-256,hmac-sha2-512

2. Attempt to use curl to sftp file

3. Fails to connect


Actual results:

  Fails to connect


Expected results:

  Should use a secure KEX/MACs.


Additional info:

  Current curl upstream works without problem.

  So a rebase or backport of the change should resolve the problem.

Comment 3 Kamil Dudka 2019-03-13 11:55:56 UTC
(In reply to Chris Cheney from comment #0)
>   ** This BZ should probably be cloned to RHEL 6. **

It is too late to fix this in RHEL-6 unfortunately.

>   Current curl upstream works without problem.
> 
>   So a rebase or backport of the change should resolve the problem.

This is not about the version of curl but the version of libssh2, which is the library that implements the SSH layer for (lib)curl.  I believe that this is bug going to be fixed by the planned rebase of libssh2 to 1.8.0 (bug #1592784).

*** This bug has been marked as a duplicate of bug 1592784 ***