[31114] in CVS-changelog-for-Kerberos-V5
krb5 commit [krb5-1.18]: Fix KDC null deref on TGS inner body null
daemon@ATHENA.MIT.EDU (Greg Hudson)
Mon Mar 14 16:17:08 2022
Date: Mon, 14 Mar 2022 16:11:18 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-ID: <202203142011.22EKBIBQ028387@drugstore.mit.edu>
To: <cvs-krb5@mit.edu>
MIME-Version: 1.0
Reply-To: krbdev@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/fd9decf85055acca218c34c9e1222dc692b973d4
commit fd9decf85055acca218c34c9e1222dc692b973d4
Author: Greg Hudson <ghudson@mit.edu>
Date: Tue Aug 3 01:15:27 2021 -0400
Fix KDC null deref on TGS inner body null server
After the KDC decodes a FAST inner body, it does not check for a null
server. Prior to commit 39548a5b17bbda9eeb63625a201cfd19b9de1c5b this
would typically result in an error from krb5_unparse_name(), but with
the addition of get_local_tgt() it results in a null dereference. Add
a null check.
Reported by Joseph Sutton of Catalyst.
CVE-2021-37750:
In MIT krb5 releases 1.14 and later, an authenticated attacker can
cause a null dereference in the KDC by sending a FAST TGS request with
no server field.
(cherry picked from commit d775c95af7606a51bf79547a94fa52ddd1cb7f49)
ticket: 9008
version_fixed: 1.18.5
src/kdc/do_tgs_req.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/kdc/do_tgs_req.c b/src/kdc/do_tgs_req.c
index 241f34e..386ed5f 100644
--- a/src/kdc/do_tgs_req.c
+++ b/src/kdc/do_tgs_req.c
@@ -208,6 +208,11 @@ process_tgs_req(krb5_kdc_req *request, krb5_data *pkt,
status = "FIND_FAST";
goto cleanup;
}
+ if (sprinc == NULL) {
+ status = "NULL_SERVER";
+ errcode = KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN;
+ goto cleanup;
+ }
errcode = get_local_tgt(kdc_context, &sprinc->realm, header_server,
&local_tgt, &local_tgt_storage, &local_tgt_key);
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5