17_fix_from_1.8.3_fix_LDP_crash.patch 4.03 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
From ac3bdf57670fd59afef128b33d11907fc28436ba Mon Sep 17 00:00:00 2001
From: Jeff Morriss <jeff.morriss.ws@gmail.com>
Date: Fri, 7 Sep 2012 01:35:16 +0000
Subject: [PATCH 4/4] From Aditya Ambadkar via
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7046
 :

Fix CID 703472 and (external) fuzz failure 7567:

The dissect_subtlv_interface_parameters is missing the handling of BFD 2..4.
For the crash patch, we decided to add the bfd2..4 in dissect_tlc function(in
the diff). We plan to open a separate bug to fix
dissect_subtlv_interface_parameters to make it handle BFD2..4. (Thanks to Arun
Arunachalam for this analysis)

From me: fix up some indentation and replace tabs with spaces (for consistency).

svn path=/trunk/; revision=44801
---
 epan/dissectors/packet-ldp.c |   20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/epan/dissectors/packet-ldp.c b/epan/dissectors/packet-ldp.c
index 86a6301..4d08088 100644
--- a/epan/dissectors/packet-ldp.c
+++ b/epan/dissectors/packet-ldp.c
@@ -2459,7 +2459,13 @@ dissect_tlv(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem)
                 &hf_ldp_tlv_intparam_vccv_cctype_ttl1 ,
                 &hf_ldp_tlv_intparam_vccv_cvtype_icmpping ,
                 &hf_ldp_tlv_intparam_vccv_cvtype_lspping ,
-                &hf_ldp_tlv_intparam_vccv_cvtype_bfd
+                &hf_ldp_tlv_intparam_vccv_cvtype_bfd,
+                &hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_bfd2,
+                &hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_bfd3,
+                &hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_bfd4,
+                &hf_ldp_tlv_fec_vc_intparam_flowlabel_t,
+                &hf_ldp_tlv_fec_vc_intparam_flowlabel_r,
+                &hf_ldp_tlv_fec_vc_intparam_flowlabel_res
             };
             int vc_len = length;
             offset += 4;
@@ -3568,25 +3574,25 @@ proto_register_ldp(void)
           { "BFD IP/UDP-encapsulated, for PW Fault Detection only", "ldp.msg.tlv.fec.vc.intparam.vccv.cvtype_bfd1", FT_BOOLEAN, 8,
             NULL, 0x04, "VC FEC Interface Param VCCV CV Type BFD IP/UDP-encapsulated, for PW Fault Detection only", HFILL }},
 
-	{ &hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_bfd2,
+        { &hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_bfd2,
           { "BFD IP/UDP-encapsulated, for PW Fault Detection and AC/PW Fault Status Signaling", "ldp.msg.tlv.fec.vc.intparam.vccv.cvtype_bfd2", FT_BOOLEAN, 8,
             NULL, 0x08, "VC FEC Interface Param VCCV CV Type BFD IP/UDP-encapsulated, for PW Fault Detection and AC/PW Fault Status Signaling", HFILL }},
 
-	{ &hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_bfd3,
+        { &hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_bfd3,
           { "BFD BFD PW-ACH-encapsulated, for PW Fault Detection only", "ldp.msg.tlv.fec.vc.intparam.vccv.cvtype_bfd3", FT_BOOLEAN, 8,
             NULL, 0x10, "VC FEC Interface Param VCCV CV Type BFD PW-ACH-encapsulated, for PW Fault Detection only", HFILL }},
 
-	{ &hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_bfd4,
+        { &hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_bfd4,
           { "BFD BFD PW-ACH-encapsulated, for PW Fault Detection and AC/PW Fault Status Signaling", "ldp.msg.tlv.fec.vc.intparam.vccv.cvtype_bfd4", FT_BOOLEAN, 8,
             NULL, 0x20, "VC FEC Interface Param VCCV CV Type BFD PW-ACH-encapsulated, for PW Fault Detection and AC/PW Fault Status Signaling", HFILL }},
 
-	{ &hf_ldp_tlv_fec_vc_intparam_flowlabel_t,
+        { &hf_ldp_tlv_fec_vc_intparam_flowlabel_t,
           { "Flow Label Transmit bit", "ldp.msg.tlv.fec.vc.intparam.flowlabel.t", FT_UINT8, BASE_DEC, NULL, 0x80, NULL, HFILL}},
 
-	{ &hf_ldp_tlv_fec_vc_intparam_flowlabel_r,
+        { &hf_ldp_tlv_fec_vc_intparam_flowlabel_r,
           { "Flow Label Receive bit", "ldp.msg.tlv.fec.vc.intparam.flowlabel.r", FT_UINT8, BASE_DEC, NULL, 0x40, NULL, HFILL}},
 
-    { &hf_ldp_tlv_fec_vc_intparam_flowlabel_res,
+        { &hf_ldp_tlv_fec_vc_intparam_flowlabel_res,
           { "Flow Label Reserved", "ldp.msg.tlv.fec.vc.intparam.flowlabel.res", FT_UINT16, BASE_HEX, NULL, 0x3FFF, NULL, HFILL}},
 
         { &hf_ldp_tlv_lspid_act_flg,
-- 
1.7.10.4