Skip to content

Commit

Permalink
Null pointer deref in kadmind [CVE-2012-1013]
Browse files Browse the repository at this point in the history
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]

(cherry picked from commit c5be620)

ticket: 7168 (new)
version_fixed: 1.9.4
status: resolved
  • Loading branch information
Richard Basch authored and tlyu committed Jun 11, 2012
1 parent 871c121 commit f7d42a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/kadm5/srv/svr_principal.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,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;

Expand Down

0 comments on commit f7d42a0

Please sign in to comment.