]> 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)
committerOndřej Surý <ondrej@isc.org>
Thu, 7 May 2026 13:14:06 +0000 (15:14 +0200)
commitf2f1c0cb244a6d9e2fd8550a38bd2465856abce3
treedb203f7d11a592f49ced0e01a0b2d99c2d535cd2
parente3c74f19c6b3b29ec649062f95bf1df5688a0799
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 f2240d2d06a1a68b622bd6b00a52c6fe4274426d)
lib/dns/gssapictx.c
lib/dns/tkey.c