Wireshark-bugs: [Wireshark-bugs] [Bug 5183] New: PANA (RFC 5191) packets are dissected incorrect

Date: Sun, 5 Sep 2010 23:15:29 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5183

           Summary: PANA (RFC 5191) packets are dissected incorrectly.
           Product: Wireshark
           Version: 1.4.0
          Platform: x86
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: Low
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: yatch@xxxxxxxxxxxxxxxxxxxxx


Created an attachment (id=5124)
 --> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=5124)
pana-draft18-pached.cap

Build Information:
Version 1.4.0 (SVN Rev 34005 from /trunk-1.4)

Copyright 1998-2010 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, (32-bit) with GLib 2.22.4, with WinPcap (version
unknown), with libz 1.2.3, without POSIX capabilities, without libpcre, with
SMI
0.4.8, with c-ares 1.7.1, with Lua 5.1, without Python, with GnuTLS 2.8.5, with
Gcrypt 1.4.5, with MIT Kerberos, with GeoIP, with PortAudio V19-devel (built
Aug
29 2010), with AirPcap.

Running on Windows XP Service Pack 3, build 2600, with WinPcap version 4.1.2
(packet.dll version 4.1.0.2001), based on libpcap version 1.0 branch 1_0_rel0b
(20091008), GnuTLS 2.8.5, Gcrypt 1.4.5, without AirPcap.

Built using Microsoft Visual C++ 9.0 build 30729

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

Check the man page and http://www.wireshark.org for more information.
--
In the capture file 'pana-draft18-patched.cap', packets from 2 to
13 are dissected as raw UDP packets or malformed PANA packets.

I checked the latest packet-pana.c in trunk-1.4 and found that
packet-pana.c treats the PANA AVP Length field as including the
length of AVP Code, AVP Length, AVP Flags, Reserved, and Vendor-Id
fields. I think this behavior is not correct because RFC
5191 (http://tools.ietf.org/html//rfc5191) says that the AVP
Length field indicates the number of octets in the Value field.

(quoted from RFC 5191)
>   AVP Length
>
>      The AVP Length field is two octets, and indicates the number of
>      octets in the Value field.  The length of the AVP Code, AVP
>      Length, AVP Flags, Reserved and Vendor-Id fields are not counted
>      in the AVP Length value.


The sample capture
'pana-draft18.cap'
(http://wiki.wireshark.org/SampleCaptures?action=AttachFile&do=view&target=pana-draft18.cap)
also has errors on treating the AVP Length field. I created
'pana-draft18-pached.cap' from 'pana-draft18.cap'.

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