Wireshark-bugs: [Wireshark-bugs] [Bug 2539] New: Bug found in decoder of PKM_ATTR_CRYPTO_SUITE
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2539
Summary: Bug found in decoder of PKM_ATTR_CRYPTO_SUITE
Product: Wireshark
Version: SVN
Platform: PC
OS/Version: Windows XP
Status: ASSIGNED
Severity: Major
Priority: Medium
Component: Wireshark
AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
ReportedBy: cfreeer@xxxxxxxxxxxx
CC: cfreeer@xxxxxxxxxxxx
Build Information:
SVN 25282
--
The offset need to be increased while decoding.
My patch:
--- wireshark/plugins/wimax/wimax_utils.c 2008-05-08 17:13:55.000000000
+0800
+++ ./wimax_utils.c 2008-05-14 10:07:35.000000000 +0800
@@ -392,7 +392,7 @@
{1, "3-DES EDE with 128-bit key"},
{2, "RSA with 1024-bit key"},
{3, "ECB mode AES with 128-bit key"},
- {3, "AES key wrap with 128-bit key"},
+ {4, "AES key wrap with 128-bit key"},
{0, NULL}
};
@@ -2787,8 +2787,8 @@
/* add subtree */
tlv_tree = add_tlv_subtree(&tlv_info,
ett_cryptographic_suite_list_decoder, tree, hf_pkm_msg_crypto_suite, tvb,
offset, tlv_len, FALSE);
proto_tree_add_item(tlv_tree,
hf_pkm_msg_crypto_suite_msb, tvb, offset, 1, FALSE);
- proto_tree_add_item(tlv_tree,
hf_pkm_msg_crypto_suite_middle, tvb, offset, 1, FALSE);
- proto_tree_add_item(tlv_tree,
hf_pkm_msg_crypto_suite_lsb, tvb, offset, 1, FALSE);
+ proto_tree_add_item(tlv_tree,
hf_pkm_msg_crypto_suite_middle, tvb, offset+1, 1, FALSE);
+ proto_tree_add_item(tlv_tree,
hf_pkm_msg_crypto_suite_lsb, tvb, offset+2, 1, FALSE);
break;
default:
tlv_tree = add_tlv_subtree(&tlv_info,
ett_cryptographic_suite_list_decoder, tree, hf_pkm_msg_unknown_type, tvb,
offset, tlv_len, FALSE);
@@ -2915,8 +2915,8 @@
/* add subtree */
tlv_tree = add_tlv_subtree(&tlv_info,
ett_pkm_tlv_encoded_attributes_decoder, tree, hf_pkm_msg_crypto_suite, tvb,
offset, tlv_len, FALSE);
proto_tree_add_item(tlv_tree,
hf_pkm_msg_crypto_suite_msb, tvb, offset, 1, FALSE);
- proto_tree_add_item(tlv_tree,
hf_pkm_msg_crypto_suite_middle, tvb, offset, 1, FALSE);
- proto_tree_add_item(tlv_tree,
hf_pkm_msg_crypto_suite_lsb, tvb, offset, 1, FALSE);
+ proto_tree_add_item(tlv_tree,
hf_pkm_msg_crypto_suite_middle, tvb, offset+1, 1, FALSE);
+ proto_tree_add_item(tlv_tree,
hf_pkm_msg_crypto_suite_lsb, tvb, offset+2, 1, FALSE);
break;
case PKM_ATTR_CRYPTO_LIST:
tlv_tree = add_protocol_subtree(&tlv_info,
ett_pkm_tlv_encoded_attributes_decoder, tree, proto_wimax_utility_decoders,
tvb, offset, tlv_len, "Cryptographic-Suite List (%u bytes)", tlv_len);
@@ -3285,8 +3285,8 @@
/* add subtree */
tlv_tree = add_tlv_subtree(&tlv_info,
ett_sa_descriptor_decoder, tree, hf_pkm_msg_crypto_suite, tvb, offset, tlv_len,
FALSE);
proto_tree_add_item(tlv_tree,
hf_pkm_msg_crypto_suite_msb, tvb, offset, 1, FALSE);
- proto_tree_add_item(tlv_tree,
hf_pkm_msg_crypto_suite_middle, tvb, offset, 1, FALSE);
- proto_tree_add_item(tlv_tree,
hf_pkm_msg_crypto_suite_lsb, tvb, offset, 1, FALSE);
+ proto_tree_add_item(tlv_tree,
hf_pkm_msg_crypto_suite_middle, tvb, offset+1, 1, FALSE);
+ proto_tree_add_item(tlv_tree,
hf_pkm_msg_crypto_suite_lsb, tvb, offset+2, 1, FALSE);
break;
default:
tlv_tree = add_tlv_subtree(&tlv_info,
ett_sa_descriptor_decoder, tree, hf_pkm_msg_unknown_type, tvb, offset, tlv_len,
FALSE);
--
Configure bugmail: http://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.