krb5 commit [krb5-1.11]: Fix decoding of mkey kvno in mkey_aux tl-data
Tom Yu
tlyu at MIT.EDU
Wed Oct 30 17:43:26 EDT 2013
https://github.com/krb5/krb5/commit/cd9c927e81f290d7099e027eb4b2b2866fcbe185
commit cd9c927e81f290d7099e027eb4b2b2866fcbe185
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.
(cherry picked from commit 64ec2941af1561ef06e7e885b2ffb65a675516ce)
ticket: 7746 (new)
version_fixed: 1.11.4
status: resolved
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 ed124d0..beb449f 100644
--- a/src/lib/kdb/kdb5.c
+++ b/src/lib/kdb/kdb5.c
@@ -1650,7 +1650,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 */
@@ -1683,7 +1683,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