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.
Description of problem:
constrained delegation fails with
Cryptosystem internal error while getting credentials for
Version-Release number of selected component (if applicable):
ipa-server
release: 1.module+el8.3.0+6429+acaee14b
version: 4.8.6
How reproducible:
Always
Steps to Reproduce:
Install ipa-server in FIPS mode.
1: Create the service
ipa service-add test/ipa.example.com --force
ipa service-mod test/ipa.example.com --setattr krbticketflags=2097280
ipa service-add test2/ipa.example.com --force
2: Get keytabs for these services:
ipa-getkeytab -s ipa.example.com -k /tmp/test.keytab -p test/ipa.example.com
ipa-getkeytab -s ipa.example.com -k /tmp/test2.keytab -p test2/ipa.example.c
3: Show that we can't do delegation yet:
kdestroy -A
kinit -kt /tmp/test.keytab test/ipa.example.com
kvno -k /tmp/test.keytab -U admin -P test/ipa.example.com test2/ipa.example.com
Actual results:
kvno: Cryptosystem internal error while getting credentials for test1/ipa.example.com
Expected results:
kvno: KDC returned error string: NOT_ALLOWED_TO_DELEGATE test2/ipa.example.com: constrained delegation failed
Additional info:
In non-FIPS mode its passing.
I'm having trouble with my virtualization at the moment, so unfortunately I can't gather these answers myself. Things I would look at:
"ipa-getkeytab -s ipa.example.com -k /tmp/test2.keytab -p test2/ipa.example.c" - this is a typo, right? Should be test2/ipa.example.com
Output of the following:
kadmin.local getprinc admin
kadmin.local getprinc test/ipa.example.com
kadmin.local getprinc test2/ipa.example.com
Is there anything in the KDC logs?
What's the KRB5_TRACE output (of the failing kvno)?
What I'd really like to do at this point is point gdb at the KDC. However, I don't seem to be able to get IPA to install in FIPS mode (see https://bugzilla.redhat.com/show_bug.cgi?id=1841925 ).
So I'm probably stuck until I can get a machine with IPA installed in FIPS mode to test this, unfortunately.
Comment 8Alexander Bokovoy
2020-06-04 06:47:26 UTC
I guess it is used to verify that the data in PA-FOR-USER buffer is indeed provided by the KDC because the calculating checksum requires presence of the session key of the TGT of the service requesting S4U2Self. There is another checksum in PA-S4U-X509-USER structure which is must be checked:
--------------------
The client when receiving this padata type in the encrypted-pa-data field MUST verify the checksum values match with the corresponding checksum values in the request and the reply.
--------------------
The difference between PA-FOR-USER and PA-S4U-X509-USER is that the latter has the checksum operation corresponding to the encryption type of the TGT session key. For RC4-HMAC key it is explicitly defined to use RSA-MD5 for checksum.
If we aren't allowing RC4-HMAC session key, we would have RSA-MD5 not allowed too. But this is PA-S4U-X509-USER, not PA-FOR-USER. For that one there is no explicit 'must' or 'should' statement regarding whether the checksum is validated by the client receiving the response.
Simo, it's used for the TGS exchange to get the s4u2self service ticket. The client generates the checksum - it's part of packet 15 in the pcap (I'll attach this in a moment). Kerberos -> tgs_req -> padata -> PA-DATA PA-FOR-USER. Importantly, the HMAC is over the user the ticket is from (i.e., in a s4u2self request for a service ticket from C->S, this is C - which in the test case here is admin.)
As Alexander points out, the PA-S4U-X509-USER field in that same packet is using a checksum type of 16 (AES). (Note here that due to 3.1.5.1.1.1 there are some cases where both "should" be sent, as they are in this pcap. I put quotes around that because I do not know the behavior of various KDCs when they're not present, but suspect it's "must" for interop purposes.)
(In reply to Alexander Bokovoy from comment #8)
>
> If we aren't allowing RC4-HMAC session key, we would have RSA-MD5 not
> allowed too. But this is PA-S4U-X509-USER, not PA-FOR-USER. For that one
> there is no explicit 'must' or 'should' statement regarding whether the
> checksum is validated by the client receiving the response.
The PA-FOR-USER is never returned by the KDC, only the PA-S4U-X509-USER is.
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 (krb5 bug fix and enhancement update), 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-2020:4541