[31188] in CVS-changelog-for-Kerberos-V5
krb5 commit [krb5-1.20]: Free verto context later in KDC cleanup
daemon@ATHENA.MIT.EDU (ghudson@mit.edu)
Tue Nov 15 11:32:49 2022
From: ghudson@mit.edu
To: <cvs-krb5@mit.edu>
Message-ID: <20221115163149.0E2CA1045F9@krbdev.mit.edu>
Date: Tue, 15 Nov 2022 11:31:49 -0500 (EST)
MIME-Version: 1.0
Reply-To: krbdev@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/782e3cf8e909ff7ad62c3b49e18aaad3e9c65279
commit 782e3cf8e909ff7ad62c3b49e18aaad3e9c65279
Author: Greg Hudson <ghudson@mit.edu>
Date: Fri Jun 3 14:38:45 2022 -0400
Free verto context later in KDC cleanup
The KDC supplies the verto context to kdcpreauth modules via the loop
method (added in commit 83b4ecd20e50ad330cd761977d5dadefe30a785b).
This context should remain valid until kdcpreauth modules are
unloaded, as modules might refer to it during cleanup. In particular,
the OTP module references the verto context when freeing the RADIUS
client object (commit e89abc2d4ea1fea1ec28d470f297514b828e4842), which
can cause a memory error during KDC shutdown without this change.
(cherry picked from commit 8dcace04945723cd6a3c8ea2c1ba467c22eb6584)
ticket: 9064
version_fixed: 1.20.1
src/kdc/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/kdc/main.c b/src/kdc/main.c
index 074680da9..38b929906 100644
--- a/src/kdc/main.c
+++ b/src/kdc/main.c
@@ -1041,7 +1041,6 @@ int main(int argc, char **argv)
kau_kdc_start(kcontext, TRUE);
verto_run(ctx);
- loop_free(ctx);
kau_kdc_stop(kcontext, TRUE);
krb5_klog_syslog(LOG_INFO, _("shutting down"));
unload_preauth_plugins(kcontext);
@@ -1055,6 +1054,7 @@ int main(int argc, char **argv)
#ifndef NOCACHE
kdc_free_lookaside(kcontext);
#endif
+ loop_free(ctx);
krb5_free_context(kcontext);
return errout;
}
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5