Skip Menu |
 

From: Bean Zhang <bean.zhang@centrify.com>
To: "krb5-bugs@mit.edu" <krb5-bugs@mit.edu>
Subject: Directly dereference the pointer svalue which may be NULL in kadm5_get_config_params()
Date: Thu, 9 Aug 2018 06:31:29 +0000
Hi Team,

In kadm5_get_config_params() of krb5-1.16.1/src/lib/kadm5/alt_prof.c,
After calling strdup() to assign pointer svalue,
we directly dereference it without checking if it is valid.

We should add pointer validity checking for svalue after assigning.

Could someone help to take a look?

Thanks,
Bean
From: ghudson@mit.edu
Subject: git commit

Check strdup return in kadm5_get_config_params()

When copying the realm string, if strdup() returns NULL, fail out with
ENOMEM instead of pretending the realm wasn't specified. When copying
KRB5_DEFAULT_SUPPORTED_ENCTYPES, if strdup() returns NULL, fail out
with ENOMEM instead of crashing. Reported by Bean Zhang.

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

Check strdup return in kadm5_get_config_params()

When copying the realm string, if strdup() returns NULL, fail out with
ENOMEM instead of pretending the realm wasn't specified. When copying
KRB5_DEFAULT_SUPPORTED_ENCTYPES, if strdup() returns NULL, fail out
with ENOMEM instead of crashing. Reported by Bean Zhang.

(cherry picked from commit c0af219be218c02e72160ecd0521bc5b9bad546f)

https://github.com/krb5/krb5/commit/06e5b5d5a032e9dfedcd19df54f16a4ce802bcbe
Author: Greg Hudson <ghudson@mit.edu>
Commit: 06e5b5d5a032e9dfedcd19df54f16a4ce802bcbe
Branch: krb5-1.16
src/lib/kadm5/alt_prof.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
From: ghudson@mit.edu
Subject: git commit

Check strdup return in kadm5_get_config_params()

When copying the realm string, if strdup() returns NULL, fail out with
ENOMEM instead of pretending the realm wasn't specified. When copying
KRB5_DEFAULT_SUPPORTED_ENCTYPES, if strdup() returns NULL, fail out
with ENOMEM instead of crashing. Reported by Bean Zhang.

(cherry picked from commit c0af219be218c02e72160ecd0521bc5b9bad546f)

https://github.com/krb5/krb5/commit/d6ce2d8273bf4b2a51de882866e42d33d1f568ca
Author: Greg Hudson <ghudson@mit.edu>
Commit: d6ce2d8273bf4b2a51de882866e42d33d1f568ca
Branch: krb5-1.15
src/lib/kadm5/alt_prof.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)