Bug 812348 - Unable to change ssh key password while in FIPS mode (fips=1)
Unable to change ssh key password while in FIPS mode (fips=1)
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: openssl (Show other bugs)
6.2
All Linux
urgent Severity urgent
: rc
: ---
Assigned To: Tomas Mraz
Miroslav Vadkerti
: Regression, ZStream
Depends On:
Blocks: 836160 848406
  Show dependency treegraph
 
Reported: 2012-04-13 09:22 EDT by Ricky Nelson
Modified: 2013-02-21 05:43 EST (History)
6 users (show)

See Also:
Fixed In Version: openssl-1.0.0-26.el6
Doc Type: Bug Fix
Doc Text:
This was already documented in the Z-stream errata.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 05:43:11 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Ricky Nelson 2012-04-13 09:22:29 EDT
Description of problem:


Version-Release number of selected component (if applicable):
openssh-5.3p1-70.el6_2.2.x86_64

How reproducible:
Enable FIPS (fips=1 on kernel line), create an ssh key with a valid password, then attempt to change the password. This fails with 'Bad passphrase.'

Steps to Reproduce:

[root@dhcp209-46 ~]# cat /proc/sys/crypto/fips_enabled
1

[root@dhcp209-46 ~]# ssh-keygen -t rsa -f rsa -b 2048
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in rsa.
Your public key has been saved in rsa.pub.
The key SHA1 fingerprint is:
f6:f5:cb:d1:ce:79:a0:9f:f4:ed:18:64:79:39:ac:7e:d2:c7:61:6f root@dhcp209-46.gsslab.pnq.redhat.com
The key's SHA1 randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|                 |
|              ...|
|        S   . ++.|
|       . . . +o=.|
|          .  oBo+|
|            o+ %E|
|             oO+O|
+-----------------+

root@dhcp209-46 ~]# ssh-keygen -p -f rsa
Enter old passphrase:
Bad passphrase.


Expected results:
Should be able to change an ssh key password.
Comment 5 Petr Lautrbach 2012-04-24 15:38:49 EDT
This seems to be problem with used key format in OpenSSL.
Comment 9 Suzanne Yeghiayan 2012-04-25 13:46:27 EDT
This request was evaluated by Red Hat Product Management for inclusion in the
current release of Red Hat Enterprise Linux. Because the affected component is
not scheduled to be updated in the current release, Red Hat is unfortunately
unable to address this request at this time.  It has been proposed for the next
release. If you would like it considered as an exception in the current
release, please ask your support representative.
Comment 10 Tomas Mraz 2012-04-26 06:34:48 EDT
The workaround:

umask 077
openssl genrsa 2048 | openssl pkcs8 -topk8 -v2 aes128 -out rsa
restorecon rsa
ssh-keygen -y -f rsa > rsa.pub

This creates a key in pkcs8 format even on rhel-6.
Comment 11 Tomas Mraz 2012-04-26 06:35:41 EDT
Of course changing the passphrase with ssh-keygen is not possible - the openssl pkcs8 command has to be used instead.
Comment 26 errata-xmlrpc 2013-02-21 05:43:11 EST
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.

http://rhn.redhat.com/errata/RHBA-2013-0443.html

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