Skip Menu |
 

From: ghudson@mit.edu
Subject: KDC can select local TGT key of unsupported enctype
Date: Wed, 13 May 2020 12:59:37 -0400
To: rt@krbdev.mit.edu
If the first current key of the local krbtgt principal is of an unsupported enctype, but there are other keys of the same enctype, an AS-REQ for a local TGT will fail with the cryptic "HANDLE_AUTHDATA: <client> for krbtgt/REALM@REALM, Bad encryption type".  This error has been observed in the wild (by Leonard Peirce at WMich) while staging an upgrade from 1.14 to 1.18, with a single-DES first local TGT key.

This happens is because get_local_tgt() (introduced in commit 570967e11bd5ea60a82fc8157ad7d07602402ebb) takes a shortcut, decrypting the first key data entry in the principal entry instead of calling krb5_dbe_find_enctype() as previous code did. Commit 44ad57d8d38efc944f64536354435f5b721c0ee0 made this shortcut mostly valid by sorting key data, but there is still this edge case.  When make_signedpath_checksum() tries to use the local TGT key, it gets the KRB5_BAD_ENCTYPE error.
Subject: git commit
From: ghudson@mit.edu

Prevent use of invalid local TGT key

Commit 570967e11bd5ea60a82fc8157ad7d07602402ebb took a shortcut in
get_local_tgt() by using the first key data entry in the TGT principal
entry. This is usually correct, but if the first key data entry has
an invalid enctype (such as a single-DES enctype), we can select a key
we can't use. Call krb5_dbe_find_enctype() instead. Reported by
Leonard Peirce.

https://github.com/krb5/krb5/commit/d7ed635e822e13b89fef93463d1d132b1e03b78f
Author: Greg Hudson <ghudson@mit.edu>
Commit: d7ed635e822e13b89fef93463d1d132b1e03b78f
Branch: master
src/kdc/kdc_util.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
Subject: git commit
From: ghudson@mit.edu

Prevent use of invalid local TGT key

Commit 570967e11bd5ea60a82fc8157ad7d07602402ebb took a shortcut in
get_local_tgt() by using the first key data entry in the TGT principal
entry. This is usually correct, but if the first key data entry has
an invalid enctype (such as a single-DES enctype), we can select a key
we can't use. Call krb5_dbe_find_enctype() instead. Reported by
Leonard Peirce.

(cherry picked from commit d7ed635e822e13b89fef93463d1d132b1e03b78f)

https://github.com/krb5/krb5/commit/32f3659b836319112ed951371944ca50f19e9167
Author: Greg Hudson <ghudson@mit.edu>
Commit: 32f3659b836319112ed951371944ca50f19e9167
Branch: krb5-1.18
src/kdc/kdc_util.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)