wireshark/CVE-2019-10894.patch
2019-12-25 18:37:21 +08:00

47 lines
2.1 KiB
Diff

diff -Nurp wireshark-2.6.2/epan/dissectors/packet-gssapi.c wireshark-2.6.2-bak/epan/dissectors/packet-gssapi.c
--- wireshark-2.6.2/epan/dissectors/packet-gssapi.c 2018-07-18 15:39:22.000000000 -0400
+++ wireshark-2.6.2-bak/epan/dissectors/packet-gssapi.c 2019-08-14 18:44:52.909000000 -0400
@@ -370,16 +370,34 @@ dissect_gssapi_work(tvbuff_t *tvb, packe
} else {
tvbuff_t *oid_tvb_local;
- oid_tvb_local = tvb_new_subset_remaining(gss_tvb, start_offset);
- if (is_verifier)
+ if (is_verifier) {
handle = oidvalue->wrap_handle;
- else
+ if (handle != NULL) {
+ oid_tvb_local = tvb_new_subset_remaining(gss_tvb, start_offset);
+ len = call_dissector_with_data(handle, oid_tvb_local, pinfo, subtree, encrypt_info);
+ if (len == 0)
+ return_offset = tvb_captured_length(gss_tvb);
+ else
+ return_offset = start_offset + len;
+ } else {
+ proto_tree_add_item(subtree, hf_gssapi_auth_verifier, gss_tvb, offset, -1, ENC_NA);
+ return_offset = tvb_captured_length(gss_tvb);
+ }
+ } else {
handle = oidvalue->handle;
- len = call_dissector_with_data(handle, oid_tvb_local, pinfo, subtree, encrypt_info);
- if (len == 0)
- return_offset = tvb_captured_length(gss_tvb);
- else
- return_offset = start_offset + len;
+ if (handle != NULL) {
+ oid_tvb_local = tvb_new_subset_remaining(gss_tvb, start_offset);
+ len = call_dissector_with_data(handle, oid_tvb_local, pinfo, subtree, encrypt_info);
+ if (len == 0)
+ return_offset = tvb_captured_length(gss_tvb);
+ else
+ return_offset = start_offset + len;
+ } else {
+ proto_tree_add_item(subtree, hf_gssapi_auth_credentials, gss_tvb, offset, -1, ENC_NA);
+ return_offset = tvb_captured_length(gss_tvb);
+ }
+ }
+
goto done; /* We are finished here */
}
}