krb5 commit: Fix handling of invalid CAMMAC service verifier
Greg Hudson
ghudson at mit.edu
Tue Jan 7 16:55:53 EST 2020
https://github.com/krb5/krb5/commit/8451ff6ed57361de585a35f35a39c54dc48172c7
commit 8451ff6ed57361de585a35f35a39c54dc48172c7
Author: Jeffrey Arbuckle <jeffa.lans at gmail.com>
Date: Sat Dec 21 22:59:20 2019 -0500
Fix handling of invalid CAMMAC service verifier
In extract_cammacs(), avoid a null dereference if the CAMMAC service
verifier is invalid or the CAMMAC is empty.
ticket: 8856
tags: pullup
target_version: 1.17-next
src/lib/krb5/krb/authdata.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/lib/krb5/krb/authdata.c b/src/lib/krb5/krb/authdata.c
index 3685fcd..7f28883 100644
--- a/src/lib/krb5/krb/authdata.c
+++ b/src/lib/krb5/krb/authdata.c
@@ -557,6 +557,8 @@ extract_cammacs(krb5_context kcontext, krb5_authdata **cammacs,
if (ret && ret != KRB5KRB_AP_ERR_BAD_INTEGRITY)
goto cleanup;
ret = 0;
+ if (elements == NULL)
+ continue;
/* Add the verified elements to list and free the container array. */
for (n_elements = 0; elements[n_elements] != NULL; n_elements++);
More information about the cvs-krb5
mailing list