Skip Menu |
 

From: Bean Zhang <bean.zhang@wesoft.com>
To: "krb5-bugs@mit.edu" <krb5-bugs@mit.edu>
Subject: Resource leak in kadm5_randkey_principal_3()
Date: Thu, 11 Oct 2018 12:50:10 +0000

Hi Team,

 

In kadm5_randkey_principal_3() of krb5-1.16.1/src/lib/kadm5/srv/svr_principal.c,

when call apply_keysalt_policy(), it will allocate memory for pointer new_ks_tuple,

but later if keepold is not zero, it just return KADM5_PROTECT_PRINCIPAL without free new_ks_tuple.

 

Could someone help to take a look?

 

Thanks,

Bean

 

From: ghudson@mit.edu
Subject: git commit

Fix leak on error in kadm5 randkey handling

An attempt to change the kadmin/history key with the -keepold flag
would leak the KDB entry and keysalt tuple as it returned an error.
Use the cleanup handler instead of returning directly. Reported by
Bean Zhang.

https://github.com/krb5/krb5/commit/c4bdb3a1c890149a472ed98a94cf85316b143265
Author: Greg Hudson <ghudson@mit.edu>
Commit: c4bdb3a1c890149a472ed98a94cf85316b143265
Branch: master
src/lib/kadm5/srv/svr_principal.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
From: ghudson@mit.edu
Subject: git commit

Fix leak on error in kadm5 randkey handling

An attempt to change the kadmin/history key with the -keepold flag
would leak the KDB entry and keysalt tuple as it returned an error.
Use the cleanup handler instead of returning directly. Reported by
Bean Zhang.

(cherry picked from commit c4bdb3a1c890149a472ed98a94cf85316b143265)

https://github.com/krb5/krb5/commit/60766c9854e8a03afdd22258b38832a13fb584ff
Author: Greg Hudson <ghudson@mit.edu>
Commit: 60766c9854e8a03afdd22258b38832a13fb584ff
Branch: krb5-1.16
src/lib/kadm5/srv/svr_principal.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
From: ghudson@mit.edu
Subject: git commit

Fix leak on error in kadm5 randkey handling

An attempt to change the kadmin/history key with the -keepold flag
would leak the KDB entry and keysalt tuple as it returned an error.
Use the cleanup handler instead of returning directly. Reported by
Bean Zhang.

(cherry picked from commit c4bdb3a1c890149a472ed98a94cf85316b143265)

https://github.com/krb5/krb5/commit/8ce051e31b7e47fc22421576f87549c1ca318302
Author: Greg Hudson <ghudson@mit.edu>
Commit: 8ce051e31b7e47fc22421576f87549c1ca318302
Branch: krb5-1.15
src/lib/kadm5/srv/svr_principal.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)