[krbdev.mit.edu #8695] Resource leak in krb5_524_conv_principal()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[krbdev.mit.edu #8695] Resource leak in krb5_524_conv_principal()

Norm Green via RT
Hi Team,

In krb5-1.16.1/src/lib/krb5/krb/conv_princ.c,
krb5_524_conv_principal() calls profile_get_string() which allocates memory and stores into temp_realm,
but later if (tmp_realm_len > REALM_SZ - 1), before "return KRB5_INVALID_PRINCIPAL", does not free the storage temp_realm points to.

The fix is simple, just call "profile_release_string(tmp_realm);" before "return KRB5_INVALID_PRINCIPAL".

Could someone help to take a look?

Thanks,
Bean

_______________________________________________
krb5-bugs mailing list
[hidden email]
https://mailman.mit.edu/mailman/listinfo/krb5-bugs