Wireshark-bugs: [Wireshark-bugs] [Bug 4082] New: Mobile Classmark3 wrong dissection
Date: Fri, 2 Oct 2009 08:56:23 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4082

           Summary: Mobile Classmark3 wrong dissection
           Product: Wireshark
           Version: SVN
          Platform: Other
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: Low
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: david.ceccanti@xxxxxxxxxxxxx


Created an attachment (id=3732)
 --> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3732)
Jpeg showd bug

Build Information:
Version 1.3.1 (SVN Rev 30140 from /trunk)

Copyright 1998-2009 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled with GTK+ 2.16.6, with GLib 2.20.5, with WinPcap (version unknown),
without libz, without POSIX capabilities, with libpcre 7.0, with SMI 0.4.8,
with
c-ares 1.6.0, with Lua 5.1, without Python, with GnuTLS 2.8.1, with Gcrypt
1.4.4, with MIT Kerberos, with GeoIP, with PortAudio V19-devel (built Sep 25
2009), with AirPcap, with new_packet_list.

Running on Windows XP Service Pack 3, build 2600, with WinPcap version 4.0.1
(packet.dll version 4.0.0.901), based on libpcap version 0.9.5, GnuTLS 2.8.1,
Gcrypt 1.4.4, without AirPcap.

Built using Microsoft Visual C++ 8.0 build 50727

Wireshark is Open Source Software released under the GNU General Public
License.

Check the man page and http://www.wireshark.org for more information.
--
On gsm epan\dissector\packet-gsm_a_common.c on function de_ms_cm_3(ecc.)


When length message is less than 3, 4, 8 There aren't check on the remained
bits and dissection gives malformed packet but packet is right formatted

I have added 

bits_left = ((len + offset) << 3) - bit_offset;
        if (bits_left == 0)
                return(len);

        if (bits_left < 8)
        {       
                if (tvb_get_bits8(tvb, bit_offset, bits_left) == 0)
                {
                        proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits,
tvb, bit_offset, bits_left, FALSE);
                        return(len);
                }
        }

And it works fine.


-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.