GitLab's annual major release is around the corner. Along with a lot of new and exciting features, there will be a few breaking changes. Learn more here.

Commit 6095a4f0 authored by Isaac Boukris's avatar Isaac Boukris Committed by Andrew Bartlett
Browse files

kdc: allow checksum of PA-FOR-USER to be HMAC_MD5

even if the tgt session key uses different hmac.

Per [MS-SFU] 2.2.1 PA-FOR-USER the checksum is
always HMAC_MD5, and that's what windows 7 client
and MIT client send.

In heimdal both the client and kdc use the checksum of
the tgt key instead and therefore work with each other
but windows and MIT clients fail against heimdal KDC.

Windows KDC allows either checksum (HMAC_MD5 or from
tgt) so we should do the same to support all clients.
Signed-off-by: default avatarIsaac Boukris <>
Reviewed-by: Andrew Bartlett's avatarAndrew Bartlett <>

Autobuild-User(master): Andrew Bartlett <>
Autobuild-Date(master): Thu Jun 11 02:48:58 UTC 2020 on sn-devel-184
parent c8080bbd
......@@ -393,5 +393,3 @@
# Fixed upstream heimdal in PR #439
......@@ -1946,12 +1946,29 @@ server_lookup:
goto out;
ret = krb5_verify_checksum(context,
/* Allow HMAC_MD5 checksum with any key type */
if (self.cksum.cksumtype == CKSUMTYPE_HMAC_MD5) {
unsigned char csdata[16];
Checksum cs;
cs.checksum.length = sizeof(csdata); = &csdata;
ret = _krb5_HMAC_MD5_checksum(context, &crypto->key,, datack.length,
if (ret == 0 &&
krb5_data_ct_cmp(&cs.checksum, &self.cksum.checksum) != 0)
else {
ret = krb5_verify_checksum(context,
krb5_crypto_destroy(context, crypto);
if (ret) {
......@@ -764,6 +764,7 @@ HEIMDAL_KRB5_2.0 {
# kinit helper
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment