[krbdev.mit.edu #8168] Re: kadmin(1.13-1) list_principals don't release memory

Pavel Jindra via RT rt-comment at krbdev.mit.edu
Wed Apr 15 11:48:13 EDT 2015


Hello

we probably found a error with release memory by list_principals.
Here is a patch:

diff --git a/src/plugins/kdb/db2/kdb_db2.c b/src/plugins/kdb/db2/kdb_db2.c
index 4c2292c..7bc760a 100644
--- a/src/plugins/kdb/db2/kdb_db2.c
+++ b/src/plugins/kdb/db2/kdb_db2.c
@@ -1078,7 +1078,7 @@ curs_run_cb(iter_curs *curs, ctx_iterate_cb func, 
krb5_pointer func_arg)

      k5_mutex_unlock(krb5_db2_mutex);
      retval = (*func)(func_arg, entry);
-    krb5_db2_free(ctx, entry);
+    krb5_dbe_free(ctx, entry);
      k5_mutex_lock(krb5_db2_mutex);
      if (dbc->unlockiter) {
          lockerr = curs_lock(curs);

Please check if it is all right.

Sincerely
Pavel Jindra & Milan Sevcik
University of West Bohemia

Dne 15.4.2015 v 14:59 Pavel Jindra napsal(a):
> Hello,
>
> we have a problem with calling
>
> kadmin -p admin/root
> kadmin: list_principals host/<fqdn>@ZCU.CZ
>
> the command at KDC consume about 250 MB of memory a not release it.
> The same situation is by calling kadmin.local.
> When we call listprincs by 3-4 times the KDC server going down by memory
> exceed.
> If you request we can send you some more information.
>
> KDC information:
> # krb5-config --all
> Version:     Kerberos 5 release 1.13.1
> Vendor:      Massachusetts Institute of Technology
> nr. principals: about 40000
> db size: 100 MB
>
> The bug tested and occurred in Linux and Solaris 10 platform.
>
> Sincerely
> Pavel Jindra
> University of West Bohemia




More information about the krb5-bugs mailing list