RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1008178 - curl scp download fails in fips mode
Summary: curl scp download fails in fips mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: curl
Version: 6.5
Hardware: All
OS: Linux
urgent
medium
Target Milestone: rc
: ---
Assignee: Kamil Dudka
QA Contact: Stefan Kremen
URL:
Whiteboard:
Depends On: 856100 968575
Blocks: 1182186
TreeView+ depends on / blocked
 
Reported: 2013-09-15 13:48 UTC by Ondrej Moriš
Modified: 2019-03-22 07:07 UTC (History)
3 users (show)

Fixed In Version: curl-7.19.7-43.el6
Doc Type: Bug Fix
Doc Text:
Previously, the implementation of SCP/SFTP protocols in libcurl did not properly handle failure of the libssh2_hostkey_hash() function from the libssh2 library. This resulted in abnormal process termination when the system was running in FIPS mode. An upstream patch has been applied on libcurl source code to properly handle such a case and the failure is now sanely propagated back to the application.
Clone Of:
: 1182186 (view as bug list)
Environment:
Last Closed: 2015-07-22 05:42:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Output of 'strace -f'. (50.94 KB, text/plain)
2013-09-15 13:49 UTC, Ondrej Moriš
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1254 0 normal SHIPPED_LIVE Moderate: curl security, bug fix, and enhancement update 2015-07-20 17:50:03 UTC

Description Ondrej Moriš 2013-09-15 13:48:35 UTC
Description of problem:

In FIPS mode, curl segfaults when downloading via scp (see details below). 

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

curl-7.19.7-37.el6_4

How reproducible:

100%

Steps to Reproduce:

1. add curltestuser account
   # useradd -m curltestuser
2. create a test file
   # su - curltestuser -c 'dd if=/dev/zero of=testfile bs=1M count=200'
3. Create ssh key (for FIPS you need RSA with more than 1024 bits)
   # ssh-keygen -t rsa -f /root/.ssh/id_rsa -N ''
   # mkdir /home/curltestuser/.ssh
   # cat /root/.ssh/id_rsa.pub > /home/curltestuser/.ssh/authorized_keys 
   # chown -R curltestuser.curltestuser /home/curltestuser/.ssh/
4. Initiate curl scp download
   # curl -v -o ./scp_file -u curltestuser: --key /root/.ssh/id_rsa \
     --pubkey /root/.ssh/id_rsa.pub scp://localhost/home/curltestuser

Actual results:

* About to connect() to localhost port 22 (#0)
*   Trying ::1... connected
* Connected to localhost (::1) port 22 (#0)
* Failed to read known hosts from /root/.ssh/known_hosts
Segmentation fault (core dumped)

Expected results:

Successful download.

Additional info:

This is not happening in a non-FIPS mode, where scp download works flawlessly.

Output from 'strace -f' is attached.

Comment 1 Ondrej Moriš 2013-09-15 13:49:03 UTC
Created attachment 797937 [details]
Output of 'strace -f'.

Comment 2 Kamil Dudka 2013-09-15 14:48:53 UTC
Looks like a duplicate of bug 968575.  Could you please check whether installing libssh2 from the private-bz968575 branch of dist-git fixes the problem?

Alternatively, I can check it myself if you have a RHEL-6 machines booting in FIPS that you can lend me for testing...

Comment 3 Kamil Dudka 2013-09-15 14:53:44 UTC
I just realized we have also bug 856100 against curl running in FIPS.  Chances are we will have to fix both in RHEL-6.  So we can use this bug as a RHEL-6 sibling of bug 856100.

Comment 5 Ondrej Moriš 2013-09-17 13:26:32 UTC
(In reply to Kamil Dudka from comment #2)
> Looks like a duplicate of bug 968575.  Could you please check whether
> installing libssh2 from the private-bz968575 branch of dist-git fixes the
> problem?
> 
> Alternatively, I can check it myself if you have a RHEL-6 machines booting
> in FIPS that you can lend me for testing...

Is this request still actual? I can test it easily (and I can give you rhel6 fips machine for a testing as well), I am just curious if BZ#856100 would not block me, if not, I can do it right away.

Comment 20 errata-xmlrpc 2015-07-22 05:42:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-1254.html


Note You need to log in before you can comment on or make changes to this bug.