]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix overzealous SPNEGO src_name/deleg_cred release 1065/head
authorGreg Hudson <ghudson@mit.edu>
Tue, 28 Apr 2020 15:37:10 +0000 (11:37 -0400)
committerGreg Hudson <ghudson@mit.edu>
Thu, 30 Apr 2020 15:53:17 +0000 (11:53 -0400)
commitb2fe66fed560ae28917a4acae6f6c0f020156353
tree9f195d9700e267956275c98b2ed7eb680a91709b
parentf7b8a6432bd289bdc528017be122305f95b8e285
Fix overzealous SPNEGO src_name/deleg_cred release

Commit 24b844714dea3e47b17511746b5df5b6ddf13d43 (ticket 8845) added
releases of sc->internal_name and sc->deleg_cred before calling the
underlying mech's gss_accept_sec_context(), to avoid a potential leak
if the mech reports a value multiple times.  Commit
c2ca2f26eaf817a6a7ed42257c380437ab802bd9 (ticket 8851) added a branch
which calls negoex_accept() instead of calling directly into the
underlying mech.  If negoex_accept() doesn't call into the mech on the
last acceptor leg, the src_name and deleg_cred values from the final
mech call are lost.

Move the releases to the non-NegoEx branch.  negoex_accept() already
does its own releases when it calls into the mech.

Reported by Luke Howard.

ticket: 8898 (new)
tags: pullup
target_version: 1.18-next
src/lib/gssapi/spnego/spnego_mech.c