forked from osmocom/wireshark
SMB2: only move ssi for request if request is really complete
MS-SMB2 section '3.2.5.1.5 Handling Asynchronous Responses' states "If SMB2_FLAGS_ASYNC_COMMAND is set in the Flags field of the SMB2 header and Status is not STATUS_PENDING, this is a final response to a request which was processed by the server asynchronously" This patch delays moving ssi information for a processed request to the matched hashmap until the request is actually completed. Without this patch the ssi information for the *final* matching message id response will not be available (on first pass) so a subdissector (e.g. MS-WSP) will not have the ssi information available to it. After this patch the ssi infomation will remain in the 'unmatched' hashmap until the 'final' response for the request is seen. While processing the 'final' matching response the ssi will be moved to the matched hashmap. Change-Id: Id501179ecb4f967a34c82b07d34dcdcd92537dc3 Bug: 11402 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-on: https://code.wireshark.org/review/9805 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
254dd6b777
commit
b467f1c211
|
@ -52,6 +52,8 @@
|
|||
#include <wsutil/wsgcrypt.h>
|
||||
#endif /* HAVE_LIBGCRYPT */
|
||||
|
||||
#define NT_STATUS_PENDING 0x00000103
|
||||
|
||||
void proto_register_smb2(void);
|
||||
void proto_reg_handoff_smb2(void);
|
||||
|
||||
|
@ -7596,7 +7598,9 @@ dissect_smb2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, gboolea
|
|||
}
|
||||
} else {
|
||||
/* This is a response */
|
||||
if (ssi) {
|
||||
if (!((si->flags & SMB2_FLAGS_ASYNC_CMD)
|
||||
&& si->status == NT_STATUS_PENDING)
|
||||
&& ssi) {
|
||||
/* just set the response frame and move it to the matched table */
|
||||
ssi->frame_res = pinfo->fd->num;
|
||||
g_hash_table_remove(si->conv->unmatched, ssi);
|
||||
|
|
Loading…
Reference in New Issue