Skip Menu |
 

Date: Wed, 15 Apr 2015 17:10:20 +0200
From: Pavel Jindra <paja@civ.zcu.cz>
To: krb5-bugs@mit.edu, Milan SEVCIK <majlen@civ.zcu.cz>
Subject: Re: kadmin(1.13-1) list_principals don't release memory
Download (untitled) / with headers
text/plain 1.4KiB
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):
Show quoted text
> 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
From: ghudson@mit.edu
Subject: git commit

Fix memory leak in DB2 iteration

Use the correct function to free the decoded principal entry in
curs_run_cb().

[ghudson@mit.edu: commit message]

https://github.com/krb5/krb5/commit/527edfaadb648a0dd2a42cd39a5a02a4ac37d7e3
Author: Pavel Jindra <paja@civ.zcu.cz>
Committer: Greg Hudson <ghudson@mit.edu>
Commit: 527edfaadb648a0dd2a42cd39a5a02a4ac37d7e3
Branch: master
src/plugins/kdb/db2/kdb_db2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
From: tlyu@mit.edu
Subject: git commit

Fix memory leak in DB2 iteration

Use the correct function to free the decoded principal entry in
curs_run_cb().

[ghudson@mit.edu: commit message]

(cherry picked from commit 527edfaadb648a0dd2a42cd39a5a02a4ac37d7e3)

https://github.com/krb5/krb5/commit/1e21529e8ddb98f9b00aa8b1be35b7c69c0b3c76
Author: Pavel Jindra <paja@civ.zcu.cz>
Committer: Tom Yu <tlyu@mit.edu>
Commit: 1e21529e8ddb98f9b00aa8b1be35b7c69c0b3c76
Branch: krb5-1.13
src/plugins/kdb/db2/kdb_db2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)