diff options
author | Jeffrey Altman <jaltman@secure-endpoints.com> | 2008-07-21 20:47:35 +0000 |
---|---|---|
committer | Jeffrey Altman <jaltman@secure-endpoints.com> | 2008-07-21 20:47:35 +0000 |
commit | a02347a6a1c5e809d168682ace9584363ad18e74 (patch) | |
tree | 699fb759cb1adf7706a4e40c30b6b0b15b773bfe /src/patchlevel.h | |
parent | 39d67c4cf3a060b09717dc541ae57520c9806f6e (diff) | |
download | krb5-a02347a6a1c5e809d168682ace9584363ad18e74.tar.gz krb5-a02347a6a1c5e809d168682ace9584363ad18e74.tar.xz krb5-a02347a6a1c5e809d168682ace9584363ad18e74.zip |
This patch addresses the issues raised in this ticket and ticket 5936
(a) In the case where 'cred_handle' != 'verifier_cred_handle'[1]
krb5_gss_accept_sec_context() leaks the 'cred_handle' in the success
case and the failure cases that result in returning from the function
prior to reaching the end of the function.
(b) The meaningful 'minor_status' return value is destroyed during the
cleanup operations.
The approach taken is to add a new 'exit:' label prior to the end of the
function through which all function returns after reaching the 'fail:'
label will goto. After 'exit:', the 'cred_handle' will be released and
if there is a krb5_context 'context' to be freed, the error info will be
saved and krb5_free_context() will be called.
In the success case, the krb5_context is saved in the gss context and we
now set 'context' to NULL to prevent it from being freed.
In order to preserve the minor_status return code, a 'tmp_minor_status'
variable is added that is used after the 'fail:' label in calls to
krb5_gss_delete_sec_context() and krb5_gss_release_cred().
[1] If 'verifier_cred_handle' is non-NULL, then 'cred_handle' is set to
the value of 'verifier_cred_handle'.
ticket: 5442
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20559 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/patchlevel.h')
0 files changed, 0 insertions, 0 deletions