Skip Menu |
 

Subject: krb5_verify_init_creds should try all host principals in keytab by default
Since 1.10 (r24749, #6887), krb5_verify_init_creds defaults to using the
first principal in the keytab if no principal is specified. The prior
behavior was to use krb5_sname_to_principal with the "host" service.

For two reasons, this new behavior is not ideal. First, if a host changes
names and the new hostname's key is appended to the keytab without
removing the old one, the login system can stop accepting users, which is
a pretty serious consequence of an arguably not-incorrect administration
operation. Second, not all keys in the system keytab necessarily have
host-level privilege; verifying credentials with a key known to some non-
root service could allow that service to conduct a Zanarotti attack on the
login system.

The desired behavior is to try verification with all unique host/*
principals in the keytab.
From: ghudson@mit.edu
Subject: SVN Commit
Try all host keys by default in vfy_increds

Factor out the core code of krb5_verify_init_creds into a helper, add
new helper functions to retrieve the list of unique host principals
from a keytab, and make krb5_verify_init_creds drive the helper once
per host principal.

Augment the test harness and test cases to better test the new
behavior. Add a k5test method to retrieve an NFS principal for the
test realm for the sake of the new test cases.

https://github.com/krb5/krb5/commit/d49a1be67e19467473f98dd3268ff0bfc57c3894
Commit By: ghudson
Revision: 25845
Changed Files:
U trunk/src/include/krb5/krb5.hin
U trunk/src/lib/krb5/krb/t_vfy_increds.c
U trunk/src/lib/krb5/krb/t_vfy_increds.py
U trunk/src/lib/krb5/krb/vfy_increds.c
U trunk/src/util/k5test.py
I forgot to give credit in the commit message. This change was based on a
contribution from Will Fiveash.