diff options
author | Jeffrey Arbuckle <jeffa.lans@gmail.com> | 2019-12-21 22:59:20 -0500 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2020-01-07 16:37:51 -0500 |
commit | 8451ff6ed57361de585a35f35a39c54dc48172c7 (patch) | |
tree | 818a36c552ad7f906ec3a0df64d2470c89ae96bb | |
parent | c423f13cc2f3fbdbf48390535cb1629b99b0eb27 (diff) | |
download | krb5-8451ff6ed57361de585a35f35a39c54dc48172c7.zip krb5-8451ff6ed57361de585a35f35a39c54dc48172c7.tar.gz krb5-8451ff6ed57361de585a35f35a39c54dc48172c7.tar.bz2 |
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
-rw-r--r-- | 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++); |