]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix output token and GSS context leaks in TKEY/GSS-API error paths
authorOndřej Surý <ondrej@isc.org>
Fri, 10 Apr 2026 10:51:31 +0000 (12:51 +0200)
committerMichał Kępień <michal@isc.org>
Thu, 7 May 2026 11:21:59 +0000 (13:21 +0200)
commitd273e3def097fbd186f23bcbb146c3ffb4f47301
treee9b31af0095f607a74bdfa876f166602c7b219c2
parente20119fc23e6f9226cecb56e9e1c285d70260184
Fix output token and GSS context leaks in TKEY/GSS-API error paths

In dst_gssapi_acceptctx(), rename outtoken to outtokenp (matching BIND
convention for output pointer parameters) and free the allocated output
token buffer on error in the cleanup path.

In process_gsstkey(), route the empty-principal error path through
cleanup via CLEANUP() instead of returning early, so that the output
token, GSS context, and TSIG key are all freed consistently by the
existing cleanup block.

(cherry picked from commit 6c46c85d02849fb659584275313529794039f433)
lib/dns/gssapictx.c
lib/dns/tkey.c