]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Null pointer deref in kadmind [CVE-2012-1013]
authorRichard Basch <basch@alum.mit.edu>
Tue, 29 May 2012 18:07:03 +0000 (14:07 -0400)
committerGreg Hudson <ghudson@mit.edu>
Tue, 29 May 2012 18:10:27 +0000 (14:10 -0400)
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@mit.edu: Minor style change and commit message]

ticket: 7152
target_version: 1.10.2
tags: pullup

src/lib/kadm5/srv/svr_principal.c

index a0b110def012d343d536ad59ded21219348e7c08..f5ea005b2738d58afb89b2015747dfafdabc882c 100644 (file)
@@ -186,7 +186,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;