Commit Graph

46213 Commits

Author SHA1 Message Date
Evan Huus 2b9db8a7d4 Add wmem string-buffer tests and fix associated bugs.
svn path=/trunk/; revision=48957
2013-04-21 23:19:37 +00:00
Pascal Quantin ca72de3ffe Dissect more TLV objects
svn path=/trunk/; revision=48956
2013-04-21 21:12:24 +00:00
Guy Harris b391fb9c7f In tcp_dissect_pdus(), don't put the PDU length into the protocol tree
unless we're going to hand a packet to the PDU subdissector.

svn path=/trunk/; revision=48955
2013-04-21 19:47:45 +00:00
Guy Harris cdd75ed113 Update a comment.
svn path=/trunk/; revision=48954
2013-04-21 19:43:36 +00:00
Guy Harris 09e0d5b406 When creating a subset tvbuff, inherit the flags from the tvbuff of
which we're making a subset, so that if the parent tvbuff is marked as a
fragment, the child tvbuff will be marked as one as well.

svn path=/trunk/; revision=48953
2013-04-21 17:38:57 +00:00
Gerald Combs 39f2407b5f [Automatic manuf, services and enterprise-numbers update for 2013-04-21]
svn path=/trunk/; revision=48950
2013-04-21 14:03:28 +00:00
Jörg Mayer f8dc3aab11 Use -Wshadow in cmake builds
svn path=/trunk/; revision=48949
2013-04-21 08:16:07 +00:00
Jörg Mayer 087d1f02f6 Fix new gcc 4.8 warning:
[  6%] Building C object epan/CMakeFiles/epan.dir/dissectors/packet-pw-fr.c.o
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-pw-fr.c: In function ‘dissect_pw_fr’:
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-pw-fr.c:81:4: error: typedef ‘packet_quality_e’ locally defined but not used [-Werror=unused-local-typedefs]
  } packet_quality_e;
    ^


svn path=/trunk/; revision=48948
2013-04-21 08:11:28 +00:00
Jörg Mayer 567570868c Fix new warning in gcc 4.8:
[  5%] Building C object epan/CMakeFiles/epan.dir/dissectors/packet-dcerpc-rs_pgo.c.o
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-dcerpc-rs_pgo.c: In function ‘dissect_rs_pgo_query_t’:
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-dcerpc-rs_pgo.c:631:5: error: typedef ‘rs_pgo_query_t’ locally defined but not used [-Werror=unused-local-typedefs]
   } rs_pgo_query_t;
     ^
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-dcerpc-rs_pgo.c: In function ‘dissect_rs_pgo_query_key_t’:
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-dcerpc-rs_pgo.c:845:5: error: typedef ‘rs_pgo_query_t’ locally defined but not used [-Werror=unused-local-typedefs]
   } rs_pgo_query_t;
     ^
cc1: all warnings being treated as errors
make[2]: *** [epan/CMakeFiles/epan.dir/dissectors/packet-dcerpc-rs_pgo.c.o] Error 1
[  5%] Building C object epan/CMakeFiles/epan.dir/dissectors/packet-pw-fr.c.o
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-pw-fr.c: In function ‘dissect_pw_fr’:
/home/jmayer/work/wireshark/svn/trunk/epan/dissectors/packet-pw-fr.c:81:4: error: typedef ‘packet_quality_e’ locally defined but not used [-Werror=unused-local-typedefs]
  } packet_quality_e;
    ^


svn path=/trunk/; revision=48947
2013-04-21 08:09:12 +00:00
Guy Harris 82d2d5a1ec If pinfo->fragmented is set, map ReportedBoundsError to
FragmentBoundsError.

svn path=/trunk/; revision=48946
2013-04-21 06:14:11 +00:00
Guy Harris a0e54160af show_reported_bounds_error() should only be used to handle things such
as overflows in offsets, where the error presumably was that some field
size was so bogusly huge that it overflowed 32 bits; that's a malformed
packet even if the packet wasn't reassembled.

svn path=/trunk/; revision=48945
2013-04-21 03:22:30 +00:00
Evan Huus cb387ad2de Initialize branch_taken right at the top of dissect_ber_choice so that the
caller can depend on it being initialized even in peculiar error conditions.

Fixes the other half of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8599

svn path=/trunk/; revision=48944
2013-04-20 21:20:00 +00:00
Evan Huus 513698ca76 Fix typo - we want to check if the pointer is NULL, not if the value
pointed to is NULL.

Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8599

svn path=/trunk/; revision=48943
2013-04-20 21:09:41 +00:00
Alexis La Goutte cf0a2c952e Remove expert info for bit AD in DNS query
See Section 5.7 (Setting the AD Bit on Queries) of RFC 6840 (Clarifications and Implementation Notes for DNS Security (DNSSEC))

The semantics of the Authentic Data (AD) bit in the query were
previously undefined.  Section 4.6 of [RFC4035] instructed resolvers
to always clear the AD bit when composing queries.

This document defines setting the AD bit in a query as a signal
indicating that the requester understands and is interested in the
value of the AD bit in the response. This allows a requester to
indicate that it understands the AD bit without also requesting
DNSSEC data via the DO bit.

svn path=/trunk/; revision=48942
2013-04-20 09:49:12 +00:00
Alexis La Goutte 579deaa7b9 Enhance BT-DHT Dissector * Use proto_tree_add_item * Enhance display list (nodes, peers...) * Remove ununeed space * ...
svn path=/trunk/; revision=48941
2013-04-20 09:49:00 +00:00
Guy Harris 0efcd0632b When we're dissecting the beginning of a fragmented packet that we
haven't reassembled, we're probably moving sequentially through the
packet, which means that we'll run past the end of the fragment rather
than past the end of what would have been the reassembled packet had we
reassembled it.

I.e., there's little reason to care whether we're past the end of the
fragment but not past the end of the packet, or whether we're past the
end of the packet; in either case, we're past the end of the fragment,
and if somebody wants to know whether the packet is malformed by
stopping short of certain fields, they should enable reassembly.

So we get rid of the explicit fragment length in tvbuffs and, instead,
have a "this is a fragment" flag; if that flag is set, we throw
FragmentBoundsError rather than ReportedBoundsError if we run past the
end of the reported data.

(This also means we could flag the tvbuff even if we don't know how
large the reassembled packet will be, e.g. when doing IP reassembly.)

Replace tvb_new_subset_length_fragment() with tvb_new_subset_length()
and a new "set the "this is a fragment flag"" routine.

svn path=/trunk/; revision=48940
2013-04-20 02:53:57 +00:00
Guy Harris 5524d0f801 Pull tvb_init() into tvb_new(); there's no other way to get a new
tvbuff, so we might as well keep all the "here's a new tvbuff" code
together.

svn path=/trunk/; revision=48939
2013-04-19 23:39:35 +00:00
Gerald Combs d72bce7558 Add back the sample bug test.
svn path=/trunk/; revision=48938
2013-04-19 18:53:44 +00:00
Guy Harris 36dfc6b108 Clean up a bit.
svn path=/trunk/; revision=48937
2013-04-19 18:48:16 +00:00
Evan Huus c7e09b6ca7 Remove duplicate hf array entry.
svn path=/trunk/; revision=48936
2013-04-19 18:20:19 +00:00
Evan Huus c2c68fc2b9 s/mfs/nfs/
svn path=/trunk/; revision=48935
2013-04-19 18:19:05 +00:00
Evan Huus 7a173f9b0d From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8581
Major NFS dissector cleanup. Consistent naming, spacing, line wrapping,
variable initialization, ...

For full details see comment #18 of the bug.

svn path=/trunk/; revision=48934
2013-04-19 18:16:50 +00:00
Jörg Mayer 3978d46572 Slightly improve heuristics to not interpret a zero-filled trailer
as vss data.

svn path=/trunk/; revision=48933
2013-04-19 16:40:06 +00:00
Jörg Mayer c5548e1077 Add HAVE_TM_ZONE and HAVE_TZNAME detection to fix timezone display
in cmake builds.

svn path=/trunk/; revision=48932
2013-04-19 16:38:28 +00:00
Jörg Mayer 6c137314aa Add col. pseudo dissector to thsark manpage.
svn path=/trunk/; revision=48931
2013-04-19 16:36:52 +00:00
Anders Broman 0567069a98 Based on http://anonsvn.wireshark.org/viewvc?revision=48893&view=revision
"Cast scrolling values to gdoubles, not gfloats - GtkAdjustment have
always taken doubles that I've been able to find, and casting to floats
causes loss of precision and weird bugs when the values get enormous."

svn path=/trunk/; revision=48930
2013-04-19 16:26:27 +00:00
Evan Huus ca6a24df42 Fix apparent copy-paste error leading to a 'used-uninitialized' warning.
svn path=/trunk/; revision=48929
2013-04-19 16:16:22 +00:00
Anders Broman 29734bf7b3 Fix GTPv2 MM Context (UMTS Key, Quad, and Quint Decoded) incorrectly
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8596

svn path=/trunk/; revision=48928
2013-04-19 16:06:55 +00:00
Anders Broman b339913fc1 Add dissection of QoS blob.
svn path=/trunk/; revision=48927
2013-04-19 16:06:01 +00:00
Irene Rüngeler e1713c142d Initialize another variable.
svn path=/trunk/; revision=48926
2013-04-19 11:54:22 +00:00
Irene Rüngeler 319e5be393 Show Forward_Tsn chunks in the graph
svn path=/trunk/; revision=48925
2013-04-19 11:34:46 +00:00
Guy Harris 72c5985ec6 Don't use ENC_NA for integer fields longer than 1 byte; use
ENC_BIG_ENDIAN or ENC_LITTLE_ENDIAN.

Treat the AP PS Buffer State subfield of the QoS field the same way we
treat other subfields in the second byte of the QoS field - show it as
the upper 8 bits of the (shown as big-endian) QoS field.  Fix a bitmap
while we're at it.

Show the channel map as an FT_NONE - it's a structure with two bytes.

svn path=/trunk/; revision=48924
2013-04-19 08:59:45 +00:00
Jörg Mayer 171fe6de6c Small cosmetic fixes to CCX decoding
svn path=/trunk/; revision=48923
2013-04-19 05:44:41 +00:00
Guy Harris ec3d987eb9 Note that Query Server was reserved.
svn path=/trunk/; revision=48922
2013-04-19 01:37:48 +00:00
Guy Harris eb0bd03939 Add some names for reserved-but-never-implemented operations, with
references for them.

svn path=/trunk/; revision=48921
2013-04-19 01:37:24 +00:00
Michael Mann faa146f5f0 convert proto_tree_add_text "items" to proto_tree_add_item.
svn path=/trunk/; revision=48920
2013-04-19 00:09:18 +00:00
Evan Huus ca781caf07 Add overflow check to fix
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8464

Also add modelines.

svn path=/trunk/; revision=48919
2013-04-18 19:45:22 +00:00
Evan Huus e1f903a2b2 Fix apparent copy-paste-o that was leading to an 'unused variable' warning on
bleeding-edge GCC.

svn path=/trunk/; revision=48918
2013-04-18 19:31:24 +00:00
Guy Harris c0c15029ed Add to tvbuffs a "fragment length" field; if the tvbuff represents the
first fragment of a non-reassembled packet, and we know the length the
packet would have if it were reassembled, this field holds the length of
the fragment, and the "reported length" field shows the length the
packet would have if it were reassembled, so going past the end of the
fragment but staying within the length of the reassembled packet can be
reported as "dissection would have worked if the packet had been
reassembled" rather than "the packet is too short, so it was probably
malformed".

Add a FragmentBoundsError exception, thrown in the "dissection would
have worked if the packet had been reassembled" case.

Add a new tvb_new_subset_length_fragment() routine to create a new
subset tvb with specified fragment and reported lengths.  Use it in the
CLNP dissector.

Add some more sanity checks in the CLNP dissector.

svn path=/trunk/; revision=48917
2013-04-18 19:22:24 +00:00
Guy Harris d89d6c8314 Report bogus handshake length values with expert info. This includes
trying to handle reassembly of packets with *differing* handshake length
values a bit better.

Make coding style a little more consistent.

svn path=/trunk/; revision=48916
2013-04-18 19:19:38 +00:00
Guy Harris c35b6c5f6d Catch retransmission of FINs, so if we're doing "reassemble until end of
data stream", only the first FIN segment is reported with the
reassembled packet.

Show the TCP fragment tree *before* processing the payload, so it's
shown even if processing the payload throws an exception.

svn path=/trunk/; revision=48915
2013-04-18 19:11:05 +00:00
Guy Harris e300ddb0df Catch retransmission of FINs, so if we're doing "reassemble until end of
data stream", only the first FIN segment is reported with the
reassembled packet.

Show the TCP fragment tree *before* processing the payload, so it's
shown even if processing the payload throws an exception.

svn path=/trunk/; revision=48914
2013-04-18 19:10:23 +00:00
Guy Harris bb61c171a9 Let proto_tree_add_item() do the length checking for string lengths, so
we thrown an exception if the lengths are too long.

For UCS-2/UTF-16 strings, do an extra length check to avoid overflows,
but throw ReportedBoundsError if the check fails, so we report them the
same way we report other too-large length errors.

Just use proto_tree_add_item() to put UCS-2/UTF-16 strings (assumed to
be UTF-16, not UCS-2; is that correct?) into the protocol tree.

svn path=/trunk/; revision=48913
2013-04-18 19:07:44 +00:00
Gerald Combs cdab66760a <tt> → <code>
svn path=/trunk/; revision=48912
2013-04-18 17:10:47 +00:00
Martin Mathieson edfccaa019 Add R10 versions of LTE protocols.
svn path=/trunk/; revision=48911
2013-04-18 14:59:41 +00:00
Michael Mann 05c5740166 improve AUTH handling of SMTP dissector. Bug 8591 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8591)
From Uli Heilmeier

The current version of the SMTP dissector expects a 'AUTH LOGIN' mechanism without checking the mechanism.

When some other mechanism (like NTLM or PLAIN) is in use the decoding is wrong. Furthermore it is expected that the username is in a seperate packet. When the username is in the AUTH line the password is shown as smtp.auth.username and the username is not decoded.

svn path=/trunk/; revision=48910
2013-04-18 13:38:26 +00:00
Guy Harris c2087da0ab When we throw a reassembly error, remember the error, so that, if we
revisit this reassembly (in a multi-pass program such as Wireshark, or
TShark with -2), we'll throw the same error.

In fragment_set_tot_len(), allow the length to be set to a value that's
before the offset of existing fragments; we'll catch that later when the
reassembly completes.  This lets us handle some problems with DTLS less
confusingly.

When adding frames to an already-completed reassembly, check for
fragments that overlap existing fragments or go past the end of the
reassembly, and report errors.

When completing a reassembly, make the buffer for the reassembled data
big enough to contain the specified data length for the reassembly, even
if that's less than the offset + length of the last fragment.  Flag all
fragments that go past that length as "too long", and only copy out what
part of them fits, if any.  That lets us flag the correct fragment or
fragments as being "too long".

When adding fragments, do some additional checks, even if we're not
doing the first pass through the packets, so errors that show up in the
first pass also show up on subsequent passes.

svn path=/trunk/; revision=48909
2013-04-18 02:31:45 +00:00
Guy Harris 6bfd0bb9d5 See whether we can whitelist 'GPL (v3 or later)' for the output of Bison
run on wiretap/ascend.y.

svn path=/trunk/; revision=48908
2013-04-18 02:06:53 +00:00
Guy Harris 4b34417a5e Fix FSF address.
svn path=/trunk/; revision=48907
2013-04-18 02:04:18 +00:00
Gerald Combs 05cb9ac17c Convert a couple of Docbook-style "href"s to "a href"s.
svn path=/trunk/; revision=48906
2013-04-18 00:05:54 +00:00