krb5 commit [krb5-1.10]: Null pointer deref in kadmind [CVE-2012-1013]

Tom Yu tlyu at MIT.EDU
Tue May 29 19:19:00 EDT 2012


https://github.com/krb5/krb5/commit/ca2909440015d33be42e77d1955194963d8c0955
commit ca2909440015d33be42e77d1955194963d8c0955
Author: Richard Basch <basch at alum.mit.edu>
Date:   Tue May 29 14:07:03 2012 -0400

    Null pointer deref in kadmind [CVE-2012-1013]
    
    The fix for #6626 could cause kadmind to dereference a null pointer if
    a create-principal request contains no password but does contain the
    KRB5_KDB_DISALLOW_ALL_TIX flag (e.g. "addprinc -randkey -allow_tix
    name").  Only clients authorized to create principals can trigger the
    bug.  Fix the bug by testing for a null password in check_1_6_dummy.
    
    CVSSv2 vector: AV:N/AC:M/Au:S/C:N/I:N/A:P/E:H/RL:O/RC:C
    
    [ghudson at mit.edu: Minor style change and commit message]
    
    (cherry picked from commit c5be6209311d4a8f10fda37d0d3f876c1b33b77b)
    
    ticket: 7152
    version_fixed: 1.10.2
    status: resolved

 src/lib/kadm5/srv/svr_principal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/lib/kadm5/srv/svr_principal.c b/src/lib/kadm5/srv/svr_principal.c
index c4f8bc8..027b186 100644
--- a/src/lib/kadm5/srv/svr_principal.c
+++ b/src/lib/kadm5/srv/svr_principal.c
@@ -187,7 +187,7 @@ check_1_6_dummy(kadm5_principal_ent_t entry, long mask,
     char *password = *passptr;
 
     /* Old-style randkey operations disallowed tickets to start. */
-    if (!(mask & KADM5_ATTRIBUTES) ||
+    if (password == NULL || !(mask & KADM5_ATTRIBUTES) ||
         !(entry->attributes & KRB5_KDB_DISALLOW_ALL_TIX))
         return;
 


More information about the cvs-krb5 mailing list