krb5 commit: Fix kdcpreauth counting bug
Greg Hudson
ghudson at mit.edu
Thu Jul 9 14:44:26 EDT 2015
https://github.com/krb5/krb5/commit/2c3c44ce0555110a919aff0902d143b7f00e26ef
commit 2c3c44ce0555110a919aff0902d143b7f00e26ef
Author: Greg Hudson <ghudson at mit.edu>
Date: Thu Jul 9 01:00:40 2015 -0400
Fix kdcpreauth counting bug
In kdc_preauth.c, commit be20a5f5cee8d6c4072d1b81712520dbf9f6eefd made
load_preauth_plugins() handle negative preauth type numbers.
get_plugin_vtables() also needs to handle negative preauth type
numbers, or it can return the wrong count and load_preauth_plugins()
can overflow the table.
ticket: 8200
src/kdc/kdc_preauth.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/kdc/kdc_preauth.c b/src/kdc/kdc_preauth.c
index 34775f3..e121c5d 100644
--- a/src/kdc/kdc_preauth.c
+++ b/src/kdc/kdc_preauth.c
@@ -235,7 +235,7 @@ get_plugin_vtables(krb5_context context,
n_tables++;
}
for (i = 0, n_systems = 0; i < n_tables; i++) {
- for (count = 0; vtables[i].pa_type_list[count] > 0; count++);
+ for (count = 0; vtables[i].pa_type_list[count] != 0; count++);
n_systems += count;
}
*vtables_out = vtables;
More information about the cvs-krb5
mailing list