krb5 commit: Fix decoding of mkey kvno in mkey_aux tl-data
Greg Hudson
ghudson at MIT.EDU
Tue Oct 29 12:45:10 EDT 2013
https://github.com/krb5/krb5/commit/64ec2941af1561ef06e7e885b2ffb65a675516ce
commit 64ec2941af1561ef06e7e885b2ffb65a675516ce
Author: Greg Hudson <ghudson at mit.edu>
Date: Sat Oct 26 20:17:10 2013 -0400
Fix decoding of mkey kvno in mkey_aux tl-data
krb5_dbe_lookup_mkey_aux was decoding a 16-bit value directly into an
int, resulting in the wrong value on big-endian platforms. The
consequences are mostly invisible because we ignore this field and try
all mkey_aux nodes in krb5_def_fetch_mkey_list.
ticket: 7738 (new)
target_version: 1.12
tags: pullup
src/lib/kdb/kdb5.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/lib/kdb/kdb5.c b/src/lib/kdb/kdb5.c
index 8d6374f..93293ba 100644
--- a/src/lib/kdb/kdb5.c
+++ b/src/lib/kdb/kdb5.c
@@ -1628,7 +1628,7 @@ krb5_dbe_lookup_mkey_aux(krb5_context context, krb5_db_entry *entry,
krb5_mkey_aux_node **mkey_aux_data_list)
{
krb5_tl_data tl_data;
- krb5_int16 version;
+ krb5_int16 version, mkey_kvno;
krb5_mkey_aux_node *head_data = NULL, *new_data = NULL,
*prev_data = NULL;
krb5_octet *curloc; /* current location pointer */
@@ -1661,7 +1661,8 @@ krb5_dbe_lookup_mkey_aux(krb5_context context, krb5_db_entry *entry,
}
memset(new_data, 0, sizeof(krb5_mkey_aux_node));
- krb5_kdb_decode_int16(curloc, new_data->mkey_kvno);
+ krb5_kdb_decode_int16(curloc, mkey_kvno);
+ new_data->mkey_kvno = mkey_kvno;
curloc += sizeof(krb5_ui_2);
krb5_kdb_decode_int16(curloc, new_data->latest_mkey.key_data_kvno);
curloc += sizeof(krb5_ui_2);
More information about the cvs-krb5
mailing list