Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
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.
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.
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...
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.
(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.
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
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.