[krbdev.mit.edu #8697] Resource leak in krb5_gss_inquire_cred()

Bean Zhang via RT rt-comment at KRBDEV-PROD-APP-1.mit.edu
Fri Jun 15 10:51:19 EDT 2018


Hi Team,

krb5_gss_inquire_cred() in krb5-1.16.1/src/lib/gssapi/krb5/inq_cred.c
calls generic_gss_create_empty_oid_set() to create a empty oid set and store allocated memory to pointer "mechs"
but later if the code run into "goto fail", the storage mechs points to will not be freed when leaves this function.

The fix is to call gssalloc_free(mechs) in fail label.

Could someone help to take a look?

Thanks,
Bean



More information about the krb5-bugs mailing list