Bug 748528 - kinit from keytab fails when no AES keys available
Summary: kinit from keytab fails when no AES keys available
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: krb5
Version: 6.1
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Nalin Dahyabhai
QA Contact: BaseOS QE Security Team
Depends On:
TreeView+ depends on / blocked
Reported: 2011-10-24 17:24 UTC by Marko Myllynen
Modified: 2012-10-12 08:48 UTC (History)
4 users (show)

Fixed In Version: krb5-1.9-28.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-06-20 14:26:45 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0921 0 normal SHIPPED_LIVE krb5 bug fix and enhancement update 2012-06-19 20:46:12 UTC

Description Marko Myllynen 2011-10-24 17:24:29 UTC
Description of problem:
When /etc/krb5.keytab contains only des-cbc-crc, des-cbc-md5, and
arcfour-hmac keys and the KDC supports AES, kinit -k -t /etc/krb5.keytab fails.

Quoting Nalin:

The client is sending a request in both cases, but when the KDC encrypts its reply to the client, it uses an AES key if the client says that it supports AES.  But the client doesn't have a key of that type in the keytab, so the client can't decrypt the server's reply.

This is indeed what's happening (though the error's hit when the client tries to use the key of the agreed-upon type to generate preauth data).  It's a bug, alright.

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

Comment 3 Ondrej Valousek 2011-10-25 09:40:24 UTC
Note that this works perfectly on RHEL 5.7.

Comment 4 Marko Myllynen 2011-10-26 11:45:58 UTC
Also note that this issue comes up only with AD 2008R2 not AD 2003R2. The workaround is to add to krb5.conf the following lines under [libdefaults]:

default_tkt_enctypes = rc4-hmac des-cbc-crc des-cbc-md5
default_tgs_enctypes = rc4-hmac des-cbc-crc des-cbc-md5

See https://bugzilla.redhat.com/show_bug.cgi?id=748407 for related discussion.

Comment 11 Nalin Dahyabhai 2012-02-29 22:22:09 UTC
(In reply to comment #3)
> Note that this works perfectly on RHEL 5.7.

I tried to set up a baseline working version with krb5-1.6.1-70.el5 and samba-3.0.33-3.38.el5_8 and was not able to do so without the workaround Marko described.  Just in case, I tried rolling back to krb5-1.6.1-62.el5, which was the version used in 5.7, and the same error occurred.  Ondrej, is there a Samba setting or some other tweak that you made to get your setup to work correctly in combination with Server 2008?

Comment 12 Ondrej Valousek 2012-03-01 09:46:22 UTC
No tweaks/special settings were necessary on RHEL5.7 with Windows server 2008.

Comment 13 Nalin Dahyabhai 2012-03-03 04:04:04 UTC
(In reply to comment #12)
> No tweaks/special settings were necessary on RHEL5.7 with Windows server 2008.

Can you attach with the output of "klist -k -e -t /path/to/keytab" and a packet capture of the traffic between the client and the KDC (captured with tcpdump -s 0 or equivalent)?  One of both of those should help isolate what's happening that isn't happening in my test setup.

Comment 14 Nalin Dahyabhai 2012-03-03 04:29:20 UTC
Yikes, let me try that again.  Can you attach the output of 'klist -k -e' for the keytab you're using, along with a packet capture of the traffic between the client and the KDC (captured with 'tcpdump -s 0' or an equivalent) when you run 'kinit -k'?  One or both of those should shed some light on what's happening on your systems that isn't happening on mine.

Comment 15 Marko Myllynen 2012-03-05 11:26:52 UTC
Hi Nalin,

I'm happy to confirm that the issue which was still present with krb5-1.9-22.el6 is now solved with krb5-1.9-28.el6.


Comment 19 Ondrej Valousek 2012-05-31 09:36:27 UTC
Will this fix find its way to upstream, too?
Fedora 17 (krb5-workstation-1.10-6.fc17.x86_64) is still broken

Comment 20 Nalin Dahyabhai 2012-06-01 19:09:06 UTC
I'm leaning more to preferring Stef's approach from ticket #2131, which also works correctly when pre-authentication isn't used.  I expect the Fedora update will look more like a backport of that.

Comment 21 errata-xmlrpc 2012-06-20 14:26:45 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.


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