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 2039684 - AES SHA-1 HMAC encryption types failing in FIPS mode
Summary: AES SHA-1 HMAC encryption types failing in FIPS mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: krb5
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Julien Rische
QA Contact: Filip Dvorak
Filip Hanzelka
URL:
Whiteboard:
: 1998991 2050138 (view as bug list)
Depends On:
Blocks: 2027125 2050138 2057471 2067971 2124308 2124310
TreeView+ depends on / blocked
 
Reported: 2022-01-12 08:56 UTC by Filip Dvorak
Modified: 2022-09-05 15:33 UTC (History)
16 users (show)

Fixed In Version: krb5-1.19.1-14.el9_0
Doc Type: Bug Fix
Doc Text:
.FIPS mode now supports the `aes128-cts-hmac-sha1-96` and `aes256-cts-hmac-sha1-96` encryption types Previously, Kerberos could not use the `aes128-cts-hmac-sha1-96` and `aes256-cts-hmac-sha1-96` encryption types in FIPS mode on RHEL 9 because the SHA-1 hash algorithm is deprecated in RHEL 9. With this release, the KRB5KDF key derivation function has been modified and the `FIPS:AD-SUPPORT` crypto subpolicy has been changed to enable `aes128-cts-hmac-sha1-96` and `aes256-cts-hmac-sha1-96` in FIPS mode. As a result, with the `FIPS:AD-SUPPORT` crypto-policy enabled, the Kerberos Key Distribution Center (KDC) can use the two encryption types to achieve the following: * Create a KDC database. * Create keys for Kerberos principals. * Use the keys for the communication between the client and the KDC. Enabling the `FIPS:AD-SUPPORT` crypto-policy is required if your systems are integrated into Active Directory. Note that `FIPS:AD-SUPPORT` does not support the `arcfour-hmac-md5` cipher. If this cipher is needed, enable it with the `FIPS:AD-SUPPORT-LEGACY` support policy.
Clone Of:
Environment:
Last Closed: 2022-05-17 15:54:14 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-7690 0 None None None 2022-01-13 17:39:04 UTC
Red Hat Issue Tracker RHELPLAN-107538 0 None None None 2022-01-12 09:05:13 UTC
Red Hat Product Errata RHBA-2022:3951 0 None None None 2022-05-17 15:54:53 UTC

Description Filip Dvorak 2022-01-12 08:56:57 UTC
Description of problem:
It is not possible to create a KDC db with the help of "kdb5_util" when the default master_key_type (aes256-cts-hmac-sha1-96) is used.

Version-Release number of selected component (if applicable):
krb5-server-1.19.1-13.el9.x86_64
openssl-3.0.0-6.el9.x86_64
RHEL-9.0.0-20220110.3

How reproducible:


Steps to Reproduce:
1. hostnamectl set-hostname kerberos.example.com
2. sed -i "1i 127.0.0.1 kerberos.example.com" /etc/hosts
3. echo -ne '[realms]\nEXAMPLE.COM = {\n    kdc = kerberos.example.com\n    admin_server = kerberos.example.com\n}\n\n[domain_realm]\n.example.com = EXAMPLE.COM\nexample.com = example.com\n' > /etc/krb5.conf.d/example_com
4. sed -i "s/^# default_realm/ default_realm/" /etc/krb5.conf
5. modify /var/kerberos/krb5kdc/kdc.conf 
...
     supported_enctypes = aes256-sha2:normal
...

Actual results:
#kdb5_util create -r EXAMPLE.COM -P password -k aes256-cts-hmac-sha1-96
Loading random data
Initializing database '/var/kerberos/krb5kdc/principal' for realm 'EXAMPLE.COM',
master key name 'K/M'
kdb5_util: Cryptosystem internal error while transforming master key from password

Expected results:
The KDC db should be created because "hmac-sha1-96" will be supported in FIPS mode.

Additional info:
- Works with aes256-cts-hmac-sha384-192:

# kdb5_util create -r EXAMPLE.COM -P password -k aes256-cts-hmac-sha384-192
Loading random data
Initializing database '/var/kerberos/krb5kdc/principal' for realm 'EXAMPLE.COM',
master key name 'K/M'

Comment 4 Simo Sorce 2022-01-13 17:21:13 UTC
Not really no.
Unfortunately the Krb5 KDF is not an approved KDF, so the krb5 code needs to either explictly opt out of FIPS mode, or simply accept this limitation in FIPS mode.

Comment 5 Alexander Bokovoy 2022-01-13 17:54:51 UTC
From Simo on IRC: 

"pass the -fips property when instantiating the KDF for now, until we can find a way to have it in the fips provider"

This is to explicitly get out of FIPS policy use for krb5kdc.

Comment 6 Julien Rische 2022-02-03 13:24:11 UTC
I confirm that passing the "-fips" property when retrieving the default KRB5 KDF does the trick. But if we take this decision, the KDC will not be FIPS-compliant.

Comment 7 Julien Rische 2022-02-03 14:17:24 UTC
*** Bug 2050138 has been marked as a duplicate of this bug. ***

Comment 14 Julien Rische 2022-02-09 13:31:28 UTC
We discovered another issue with RC4 encryption types. MD4/MB5[1] which are necessary for password hashing, are not provided when FIPS mode is on. The "legacy" provider[2] is required to get these algorithms.

@simo confirmed this use of MD4/5 in krb5 is not a violation of FIPS. As he advised me, I will import the legacy provider in a local context for this specific case.

[1] https://www.openssl.org/docs/man1.1.1/man3/EVP_MD_type.html
[2] https://www.openssl.org/docs/manmaster/man7/OSSL_PROVIDER-legacy.html

Comment 15 Julien Rische 2022-02-10 15:43:35 UTC
The RC4 enctypes issue is a distinct one, I opened a dedicated bug 2053135.

Comment 27 Michal Polovka 2022-03-18 17:58:33 UTC
Pre-verified tested using automation krb5-tests/tests/Sanity/sanity-test-of-cipher-suites in FIPS mode run in gating pipeline for krb5-1.19.1-15.el9_0.x86_64 on link http://idm-artifacts.usersys.redhat.com/krb5/Gating-krb5/RHEL9.0/43922298/gating-tests/bash-gating/2/gating-restraint.01/index.html.gz


krb5-tests/tests/Sanity/sanity-test-of-cipher-suites	2022-03-18T15:26:14+0000

2022-03-18T15:27:39+0000 00:01:25 Completed	PASS

Therefore marking as pre-verified: tested.

Comment 32 Julien Rische 2022-04-21 08:42:42 UTC
*** Bug 1998991 has been marked as a duplicate of this bug. ***

Comment 35 errata-xmlrpc 2022-05-17 15:54:14 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 (new packages: krb5), 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/RHBA-2022:3951


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