Bug 1756432 - Default client configuration breaks ssh in FIPS mode.
Summary: Default client configuration breaks ssh in FIPS mode.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: rc
: 8.2
Assignee: Christian Heimes
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks: 1771356 1760850
TreeView+ depends on / blocked
 
Reported: 2019-09-27 15:39 UTC by Simo Sorce
Modified: 2020-04-28 15:43 UTC (History)
8 users (show)

Fixed In Version: ipa-4.8.2-1.module+el8.2.0+4697+7171660c
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1771356 (view as bug list)
Environment:
Last Closed: 2020-04-28 15:43:29 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Fedora Pagure freeipa issue 8082 None None None 2019-09-27 16:21:24 UTC
Red Hat Product Errata RHEA-2020:1640 None None None 2020-04-28 15:43:59 UTC

Description Simo Sorce 2019-09-27 15:39:39 UTC
Description of problem:

Apparently by default (ssh_trust_dns option true) we set the HostKeyAlgorithms options for ssh in clients to a very restrictive set "ssh-rsa,ssh-dss".

this was done in 2012 to deal with an older version of ssh which did not properly support ecdsa keyex in the SSHFP checking case.

However this option ends up disabling all modern key exchanges (SHA-2/EC) and re-enables a key excahnge that is explicitly disabled in FIPS mode (DSA based).

The main issue though is that because of these options a RHEL-8 client (also RHEL-7) enrolled in IPA is unable to successfully SSH into a RHEL-8 server in FIPS mode, as there is no common set of algorithms left.

This is a high profile issue for any customers that want to use IDm client in a FIPS environment.


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Jakub Jelen 2019-09-27 15:50:42 UTC
I think this part of code was highly inspired by the bug report in Debian [1], which recommends these particular configuration options to be set as a workaround of old openssh versions in the frame between 5.7 and 6.1. Neither of these versions is available in neither of RHELs or Fedora anymore and as described above, they are even harmful since they reduce default security configuration of OpenSSH for all (!) connections in following ways:

 * ssh-dsa is disabled by default and no scripts should enable it this way. Using 1k DSA keys is purely wrong
 * ssh-rsa references to legacy RSA with SHA1, which is being slowly deprecated by rsa-sha2-256 and rsa-sha2-512, which are also disabled by your configuration
 * there are ecdsa and ED25519 key types that are being disabled this way also

Please, consider dropping this configuration change [2] from your install scripts.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698794
[2] https://github.com/freeipa/freeipa/blob/9c20641f5c8e9d4f813d0ba3e80b7ccc9df0ed15/ipaclient/install/client.py#L1111

Comment 2 Christian Heimes 2019-09-27 15:52:18 UTC
The HostKeyAlgorithms setting is only added when ipa-client-install is invoked with --ssh-trust-dns. By default the internal flag trust_sshfp is False and the setting is not added to the global ssh config.

Should IPA use a different setting for HostKeyAlgorithms or not touch HostKeyAlgorithms at all?

Comment 3 Christian Heimes 2019-09-27 16:02:10 UTC
Update from internal conversation with Simo and Rob:

It is sufficient to remove the problematic HostKeyAlgorithms stanza from the ssh config file. Since it only affects the global ssh client config file, it is not necessary to restart any service. A simple sed call might be good enough.

Comment 4 Christian Heimes 2019-09-27 16:18:24 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/8082

Comment 5 Christian Heimes 2019-11-12 08:56:26 UTC
Upstream fixed proposed in https://github.com/freeipa/freeipa/pull/3887

Comment 6 Christian Heimes 2019-11-12 11:27:31 UTC
Fixed upstream
master:
https://pagure.io/freeipa/c/97a31e69e8399933d45006c744ddafcf036eca5f

Comment 7 Christian Heimes 2019-11-13 07:38:46 UTC
Fixed upstream
ipa-4-8:
https://pagure.io/freeipa/c/2422970c34849192b15d1798eae9b11a400e7119

Comment 8 Christian Heimes 2019-11-13 07:40:03 UTC
Fixed upstream
ipa-4-6:
https://pagure.io/freeipa/c/7cd1d565ac2b240eda697dbebb043a1a2885d23a

Comment 9 Christian Heimes 2019-11-20 10:45:36 UTC
Fixed in IPA 4.8.2

Comment 21 errata-xmlrpc 2020-04-28 15:43:29 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://access.redhat.com/errata/RHEA-2020:1640


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