Commit Graph

41753 Commits

Author SHA1 Message Date
John Thacker e814fe0c9b SOCKS: fix desegmentation over multiple TCP segments
The SOCKS dissector temporarily changes the pinfo values for destport
or srcport, so it should get the tcp_conversation_data after doing so
before recursively calling the TCP dissector again. Otherwise the TCP
dissector will be confused about whether a TCP multisegment PDU is in
progress or not, causing failure to lookup and store fragments correctly,
including both failed desegmentation and failed asserts (when it expects
an entry in the table which isn't there, as it was stored under a different
port number.) Fixes #16646.
2020-10-21 10:03:38 +00:00
Kenneth Soerensen 38cdd3df4e ieee802154: Add timeout to ACK tracking
In captures where a lot of packets are missing, requests and ACKs are
sometimes incorrectly paired. With this improvement, ACKs must arrive in
a reasonable time to be paired with a request.
2020-10-21 10:02:56 +00:00
Stig Bjørlykke 93ea780e7c tls/dtls: Add a generated field for Application Data Protocol 2020-10-21 08:18:22 +00:00
Martin Mathieson 3f0649bbe5 Correct a few more item lengths. 2020-10-20 21:23:53 +01:00
Martin Mathieson 89e96c1e77 XML Escaping: Don't need to escape unprintable chars.
Should not be needed because the attribute encoding="utf-8" is there.

closes #10445
2020-10-20 05:32:29 +00:00
Martin Mathieson d86df72da3 RTCP: Fix length of PTT participant ref
Found by ./tools/check_typed_item_calls.py
2020-10-20 05:08:56 +00:00
Guy Harris c8882c0f29 bthci: add a note about the case where we hve no connection handle.
A previous change initialized the k_connection_handle, so we don't
compare random data with remote_bdaddr->chandle, but perhaps we
shouldn't compare it at all if we didn't find a handle pair.
2020-10-19 21:19:39 -07:00
Gerald Combs 666e74401a BT ISO Data: Initialize a variable.
Initialize a variable caught by Valgrind. Fixes #16926.
2020-10-19 20:21:45 +00:00
Guy Harris 0d2277bca5 Include <stdint.h> in YACC/Bison parsers if necessary.
MSVC doesn't, by default, define __STDC_VERSION__, which means that the
code generated by newer versions of winflexbison3's Bison end up
defining YYPTRDIFF_T as long, which is wrong on 64-bit Windows, as
that's an LLP64 platform, not an LP64 platform, and causes warnings to
be generated.  Those warnings turn into errors.

With MSVC, if __STDC_VERSION__ isn't defined, Forcibly include
<stdint.h> here to work around that.

Fixes #16924.
2020-10-19 11:17:43 -07:00
Gerald Combs 1a244f9de5 CMake: Configure our .y files for different Bison/YACC flavors.
Bison 3.4 and later generate deprecation warnings for the "%pure-parser"
directive. As https://git.savannah.gnu.org/cgit/bison.git/tree/NEWS says,

----
** Deprecated features

  The %pure-parser directive is deprecated in favor of '%define api.pure'
  since Bison 2.3b (2008-05-27), but no warning was issued; there is one
  now.  Note that since Bison 2.7 you are strongly encouraged to use
  '%define api.pure full' instead of '%define api.pure'.
----

Rename our .y files to .y.in, and modify FindYACC.cmake to detect newer
versions of Bison and configure our .y files with "%pure-parser" or
"%define api.pure" as needed. Squelches warnings from Bison in #16924.
2020-10-19 08:46:32 -07:00
Huang Qiangxiong 0a219bf8b9 Protobuf: dissect a google.protobuf.Timestamp as absolute time field
The google.protobuf.Timestamp is a standard protobuf message type and
consists of seconds and nanos fields. We dissect protobuf field in
google.protobuf.Timestamp type as wireshark FT_ABSOLUTE_TIME field.
And add tvb_get_protobuf_field_uint() to make it easy to get a
Protobuf field of varint type from the tvb.

close #16927
2020-10-19 10:57:50 +00:00
Mikael Kanstrup 3b74cbcf4e EAP: Let dissect_eap_psk_pchannel return offset
For consistency with other functions in this dissector let
dissect_eap_psk_pchannel also return offset instead of "number of
bytes dissected".
2020-10-19 10:09:41 +00:00
Mikael Kanstrup 279bde1a0e EAP: Fix GPSK CSuite Sel dissection
The function to dissect CSuite Sel returns offset not number of
dissected bytes so calling function must assign new offset rather
than incrementing. For consistency also update the CSuite List
function to return offset.
2020-10-19 10:09:41 +00:00
Mikael Kanstrup 72fbe69d9b EAP: Fix GPSK failure code item length
Fix issues found by running ./tools/check_typed_item_calls.py

epan/dissectors/packet-eap.c:1475 proto_tree_add_item called for hf_eap_gpsk_failure_code  -  item type is FT_UINT16 but call has len  4
epan/dissectors/packet-eap.c:1479 proto_tree_add_item called for hf_eap_gpsk_failure_code  -  item type is FT_UINT16 but call has len  4
2020-10-19 10:09:41 +00:00
Mikael Kanstrup 6da08adcca Minor fixes to TEAP dissector
Fix the hf_teap_status item length and hf_teap_prompt diplay name.
2020-10-19 10:09:41 +00:00
Martin Mathieson bf245c5f68 PDML: speed up writing
Speed functions to print hex bytes, escape XML strings and
print out indents by avoiding specifier calls, and building
larger strings before calling fputs().

Someone mentioned this in the sharkfest chat yesterday.
Also, Ostinato relies upon this when importing from pcap.

An example capture I have has gone from 18 to 11 seconds.
2020-10-19 09:32:49 +00:00
David Perry c03011b906 Lua: base64_decode: handle unpadded data
As noted in bug #16386, glib's `g_base64_decode_inplace()` aborts
decoding of base64 strings that aren't padded. This addresses that by
adding padding "=" characters if needed to the buffer which will be
decoded.

I added the test case from the bug report to the test suite, though the
location therein may not be ideal.

Closes #16386
2020-10-19 08:38:31 +00:00
Martin Mathieson 723d0fab8f IEEE80211: Fix the lengths of a couple of items
Found by running ./tools/check_typed_item_calls.py

epan/dissectors/packet-ieee80211.c:14209 proto_tree_add_item called for hf_ieee80211_osen_akm_count  -  item type is FT_UINT8 but call has len  2
epan/dissectors/packet-ieee80211.c:20025 proto_tree_add_item called for hf_ieee80211_tclas_ether_type  -  item type is FT_UINT8 but call has len  2
2020-10-19 06:26:47 +00:00
Martin Mathieson d0fe9cae70 GTP and GTPv2: Fix some item lengths.
Fix issues found by running ./tools/check_typed_item_calls.py

epan/dissectors/packet-gtp.c:4414 proto_tree_add_item called for hf_gtp_sel_mode  -  item type is FT_UINT8 but call has len  2
epan/dissectors/packet-gtp.c:6807 proto_tree_add_item called for hf_gtp_rai_rac  -  item type is FT_UINT8 but call has len  2
epan/dissectors/packet-gtp.c:7600 proto_tree_add_item called for hf_gtp_bssgp_cause  -  item type is FT_UINT8 but call has len  2
epan/dissectors/packet-gtpv2.c:3607 proto_tree_add_item called for hf_gtpv2_trace_id  -  item type is FT_UINT16 but call has len  3
epan/dissectors/packet-gtpv2.c:5049 proto_tree_add_item called for hf_gtpv2_trace_id  -  item type is FT_UINT16 but call has len  3
2020-10-18 20:00:39 +01:00
Guy Harris a58ed646aa Handle relative times with >2^31 seconds.
Make display_signed_time() take a 64-bit signed number of seconds, and,
in calls to it, cast the argument to gint64, not gint32.

Addresses issue #16909.
2020-10-18 02:06:07 -07:00
Joerg Mayer 10297b60be packet-tcp.c: Add tcp D-SACK support
And it's all Sake's fault anyway :-)
2020-10-17 22:09:48 +02:00
Joerg Mayer bf1b34c35d packet-tcp: Rename ei_tcp_connection_sack to ei_tcp_connection_synack
This unfortunately includes the name of the filter element but "sack" in TCP
should not mean "a packet with syn+ack set" to most networking people nowadays.
2020-10-17 22:09:48 +02:00
Nardi Ivan e9ab795179 TLS: fix visualization of QUIC Transport Parameter Preferred Address 2020-10-16 21:27:57 +02:00
Prerit Jain 04145521b4 nrup: fix in Frame Indicator display 2020-10-16 13:42:44 +00:00
Jamie Hare cf83a67fd3 IPPUSB Protocol
Added a dissector to reassemble IPP Over USB packets and pass them to
the HTTP dissector. Added a display filter so IPPUSB packets can be
filtered. Dissector checks to ensure semgent is IPPUSB and supports
reassembly of send-documents and print-job documents. It also supports
the reassembly and dissection of packets that are truncted or
incomplete.

Change-Id: Icc9525592c07b00baaac887a70bc9e7568273016
2020-10-16 08:49:48 +00:00
Christian Krump 76e56358c2 EPL: wrong size detection of last segment
- fixed size detection of last segment in multiple read/write ASNDs
2020-10-15 22:35:29 +00:00
Ameya Deshpande 34626f2596 USBLL: Introduce usbll states in usbll_data_t.
This commit introduces usbll states. These states
represent the transaction upto the current packet.

Uses of introducing usbll states:
1. Avoid condition checks upto last three packets.
2. Identify invalid PID sequences.
3. Identify correct transactions. This will help in
   the USB 2.0 reassembly.

Ping-bug: 15908
Signed-off-by: Ameya Deshpande <ameyanrd@outlook.com>
2020-10-15 22:10:59 +00:00
John Thacker 91b792c6dc Replace ill-formed UTF-8 byte sequences with replacement character
Implement the Unicode Standard "best practices" for replacing ill-formed
sequences with the Unicode REPLACEMENT CHARACTER. Add wmem_strbuf_append_len
for appending strings with embedded null characters. Clarify why
wmem_strbuf_grow() doesn't always ensure that there's enough room for
a new string, and short-circuit some tests there. Related to #14948
2020-10-15 21:48:28 +00:00
Joerg Mayer 8b622bffc8 packet-stun.c: Series of small updates
- Rename some elements to their current RFC names
- Add an expert item for msg_len field
- Create an attribute for 8006 as unknown to avoid triggering the expert item for unknown attributes
2020-10-15 20:48:16 +00:00
Allan Møller Madsen 6d752876ef bthci_iso: full packet decode and reassembly added
Decode all Bluetooth HCI ISO packet fields and reassemble
fragmented packets.
2020-10-15 19:12:00 +00:00
Joakim Karlsson A 39f6b0d391 pfcp: fix handle of predefined by UP URR ID
Change-Id: Ia6e71c4860503db82c44b03ae1d8ccb3daf94339
2020-10-15 18:22:14 +00:00
Filipe Laíns 0ceb46e1c2 proto: add support for FT_BYTES in proto_tree_add_bits
Change-Id: I5030d550bd760953ac84c2700bb0e03cc7a831a1
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-10-15 18:21:34 +00:00
Pascal Quantin 21d3eb2338 WSP: add application/octet-stream content type 2020-10-15 17:26:20 +02:00
Joerg Mayer 64f6a650ce packet-stun.c: Fix display of nonce and realm attributes when using MS-TURN
Also: Move network_version display to the end of the header
2020-10-15 15:52:18 +02:00
Joakim Karlsson A ddd58fbead fbzero: fix build
packet-fbzero.c:348:47: error: ‘tag_len’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

Change-Id: I775edcae2bfdc6184267ee8d1873744a675e0fba
2020-10-15 13:22:20 +00:00
Rene Nielsen b3099a839f New dissector: Added support for IEEE 802.1CB R-Tags (EtherType 0xF1C1) 2020-10-15 13:51:51 +02:00
Jason Cohen 888de57c1b f5ethtrailer: Look for trailer after FCS
Under some conditions the trailer can be added after the FCS has already
been added.  Advance 4 bytes and take a second look for a triler without
needing to resort to walking the trailer.
2020-10-15 10:18:36 +00:00
John Thacker dcbe7b6c84 MP2T: Reassembly multiple transport streams between the same IPs properly.
Whether over RTP or just UDP, it's possible to get multiple simultaneous MP2T
transport streams between the same pair of IPs but on different ports. They
will not be part of the same reassembly. Thus the reassembly table functions
that use ports as well should be used to avoid ressembly errors and overlaps.
2020-10-15 08:56:11 +00:00
Nardi Ivan baebbbce4d QUIC: fix heuristic
In the heuristic function we don't know the length of the CID in the short
header, so we assume the worst case scenario compatible with packet length
(no more than 20 bytes)
2020-10-14 20:06:53 +00:00
Martin Mathieson d6a9bfa503 NRUP: Add missing SN field indicated by Report Delivered 2020-10-14 13:27:03 +00:00
Pascal Quantin 83af7b89fd 3GPP: add 5G-TMSI to 3gpp.tmsi common filter 2020-10-14 11:08:19 +02:00
Anders Broman e209253636 Create a cross protocol filter 3gpp.tmsi
It can be useful to track a "call" trough multiple protocols to make
that easier create a cross protocol filter, more may come.
2020-10-14 07:56:26 +00:00
Guy Harris 6e6233521a Have WTAP_ERR_INTERNAL include an err_info string giving details.
That way, users won't just see "You got an internal error", the details
will be given, so they can report them in a bug.
2020-10-14 04:51:45 +00:00
John Thacker 824eec89ca eassembly: Fix check for no data to prevent NULL deference
There's a check for adding a zero length fragment to a reassembly in progress,
but it accidentally checks fd_head->tvb_data (the reassembly in progress)
instead of fd_i->tvb_data (the new fragment) before calling tvb_get_data() on
fd_i->tvb_data. (Note that data / fd_head->tvb_data is created based on the
sum of the lengths of all the fd_i->tvb_data, so the former can only be NULL
if all the latter are, but it's possible for one fragment to be zero length
but not the entire reassembly. Thus this is the necessary and sufficient check.)
Fixes #15569
2020-10-14 03:31:48 +00:00
Guy Harris 7b5b6501f0 Revert "No need for a local lua_State * variable in file handler routines."
This reverts commit 873e079659.

That change didn't help what I wanted to do; there's another way to do
it.
2020-10-13 17:54:50 -07:00
Guy Harris 873e079659 No need for a local lua_State * variable in file handler routines.
Just use fh->L; the compiler will put that into a register if
appropriate.  This removes one side-effect from
INIT_FILEHANDLER_ROUTINE().
2020-10-13 13:30:52 -07:00
Thiyagarajan P c1950aa8cc ieee80211:Fix ieee80211_tag_beacon_timing() beacon timing element length check. 2020-10-13 19:33:09 +00:00
Joerg Mayer 743dcc7a41 packet-eap.c: Fix a typo in a comment 2020-10-13 13:29:40 +00:00
Nardi Ivan 051742fe1d STUN: add expert info for unknown attributes
This way, it is more simple to find them...
2020-10-13 06:36:10 +00:00
Martin Kaiser bd2c10de79 glusterfs: use a simpler way to read time fields
There's no need to parse the time fields ourselves.
proto_tree_add_item() supports the encoding that is used here.
2020-10-13 06:17:03 +00:00
Nardi Ivan 3f76684f91 CLASSIC-STUN: dissect the entire packet on first-pass
Request-response tracking of STUN messages encapsulated in CLASSIC-STUN
packets (via DATA attribute) doesn't work right now.

The reason for this is that req-resp tracking is usually performed on
first-pass, but CLASSIC-STUN attributes are not dissected on first-pass
(on wireshark, at least). So the encapsulated STUN messages are never
elaborated on first pass, either.
2020-10-13 05:30:44 +00:00
Martin Kaiser 724a288560 qnet6: use a simpler way to read a time field
Fix yet another occassion where we can call proto_tree_add_item() directly
instead of parsing the time field ourselves.
2020-10-13 05:07:35 +00:00
Edward Smith e96a1082c0 GFP: Handoff to MPEG2TS dissector when UPI is DVB-ASI 2020-10-12 19:56:20 +00:00
Nardi Ivan 354bbbe7cb STUN: add support for MS-TURN Multiplexed Channel
MS-TURN Multiplexed TURN Channels have a slightly different header format
compare to standard TURN Channels: see MS-TURN 15.1, section 2.2.3
https://docs.microsoft.com/en-us/openspecs/office_protocols/ms-turn/65f6ef76-a79d-42a4-a43f-dac56d4a19ac
2020-10-12 19:32:14 +00:00
Richard Smith b287e7165e GQUIC: make sure our tag offset advances.
Make sure gquic tag offset advances so that we don't infinitely loop.
2020-10-12 19:07:17 +00:00
Joerg Mayer f1e28064ec Cisco ACI specific protocol enhancements
Add Ethertype for Cisco ACI ARP gleaning and dissect its payload
Improve some Cisco ACI vendor specific DHCP options
Update mcp after looking at knet_parser.py
Update lldp after looking at knet_parser.py

Also reorder some ETHERTYPEs by value
2020-10-12 18:38:08 +02:00
Stig Bjørlykke a750cab655 thread: Add check for valid CoAP info
Add a check for valid CoAP info in dissect_thread_coap() before use.
It may happen that this is NULL because setting a decode_as rule
for application/octet-stream will also catch other packets.
2020-10-12 12:30:31 +00:00
Anders Broman 073055c1bc Diameter: Handle (IP)address type E164 as string
The Diameter type Address hase a two byte address type family field
previously only IPv4 and IPv6 was handled. Add handling of E.164 when
encoded as a string.
2020-10-12 11:25:37 +02:00
Guy Harris 5dd6fc9459 Add proto_tree_add_item_ret_ipv4().
Change some guint32's to ws_in4_addr while we're at it.
2020-10-11 17:54:58 -07:00
Guy Harris 41c7b848d0 Fix some error messages. 2020-10-11 13:46:02 -07:00
Martin Mathieson 6894bccf03 check_tfs.py: Also match case insensitively
Fix up some issues where the words were the same except for
captitalisation.
2020-10-11 18:46:31 +00:00
Martin Mathieson 6af49f0537 Make NRUP work as a separate protocol.
It is called as a protocol by GTP  as before, but making it separate
and findable by name protocol allows for that layer to be logged and
dissected separately.
2020-10-11 18:19:47 +00:00
Guy Harris d3f2fa4019 tn3270: add new URL for the 3270 data stream spec. 2020-10-10 17:28:56 -07:00
Pascal Quantin f1eb3953f0 RRC: upgrade dissector to v16.1.0 2020-10-10 19:06:41 +02:00
Anders Broman 6dada3acf2 SNMP: Use BASE_SHOW_ASCII_PRINTABLE for octet strings
Closes #16900
2020-10-10 13:28:06 +00:00
Alexis La Goutte 85c03c37b5 ebhscr: fix conflict
'ebhscr.sts' exists multiple times with incompatible types: FT_NONE and FT_UINT16
2020-10-09 13:01:51 +00:00
Alexis La Goutte 32a06d76d1 kafka: fix uninitialized value
found by clang analyzer
2020-10-09 08:16:02 +02:00
Francisco Jose Alvarez 4189581cc9 ieee80211: Fix dissect_hs20_osu_provider() return parameter
With the current return parameter of dissect_hs20_osu_provider() function, the dissector only show the first
osu_provider of the list. Changing the return end by return offset, the
dissector show all osu_provider of the list.
2020-10-08 18:23:56 +00:00
Pascal Quantin 21c3bdff06 NR RRC: upgrade dissector to v16.2.0 2020-10-08 10:24:28 +02:00
Pascal Quantin 39744b8edf DVB-S2-TABLE: fix test on hand_over_type variable
Closes #16894
2020-10-08 04:21:47 +00:00
Jason Cohen 48ff4ae387 Disable greedy heuristic dissectors by default
Exablaze and Metamako ethernet trailer dissector heuristics are not
specific enough to limit the data they comsume and identiy as the
respective trailers.  Disable by default.

Fixes: #16898
2020-10-08 03:36:05 +00:00
Jeff Widman 46c9f2579d typo: is require --> is required 2020-10-07 17:32:54 -07:00
Pascal Quantin 7924aaae00 LTE RRC: update message identifier value_string array 2020-10-07 21:30:08 +00:00
Pascal Quantin 1fd8174965 NGAP: dissect some PWS related fields 2020-10-07 23:00:26 +02:00
Martin Mathieson 3160f11af2 NGAP: Change "encyption" -> "encryption". 2020-10-07 20:20:38 +00:00
Pascal Quantin 1fd6a542fe LTE RRC: upgrade dissector to v16.2.0 2020-10-07 17:17:02 +00:00
Martin Mathieson 9c8eece68a MC-NMF: Fix a couple of spelling errors. 2020-10-07 17:21:55 +01:00
Pascal Quantin 1afe9a96d4 BGP: remove useless assignments
Closes #16896
2020-10-07 10:42:14 +00:00
Pascal Quantin 926d6e3799 E212: fix a test when checking MCC digits
Closes #16895
2020-10-07 10:18:05 +00:00
Jim Young da8f6e318e file-pcapng - Dissect the Darwin flags option 2020-10-07 09:03:15 +00:00
Gerald Combs 9875011fda Update some field names to match what's in RFCs.
Update some field names and capitalization in the IPv4, IPv6, ICMPv4,
and TCP dissectors to match the names documented in their respective
RFCs. This is in no way comprehensive, but it ensures that the packet
diagram more closely matches the RFC diagrams for those protocols.

(I haven't found a document that explitly says so, but protocol field
names in IETF RFCs seem to follow Chicago Manual of Style capitalization
recommendations in section 3.4 of the RFC Style Guide[1] for the most
part.)

[1]https://tools.ietf.org/html/rfc7322#section-3.4
2020-10-07 08:01:51 +00:00
Vadim Yanitskiy 35c69efaf4 BSSAP: fix dissection of Control Channel bits in DLCI
According to 3GPP TS 48.006, section 9.3.2, Data Link Connection
Identifier (DLCI) is coded as follows:

  .... .SSS - SAPI value used on the radio link;
  CC.. .... - control channel identification:
    00.. .... - indicates that the control channel is not further specified,
    10.. .... - represents the FACCH or the SDCCH,
    11.. .... - represents the SACCH,
    other values are reserved.

The following values in value_string 'bssap_cc_values':

  { 0x80,     "FACCH or SDCCH" },
  { 0xc0,     "SACCH" },

are valid before applying CC_MASK (0xc0) mask, but not after.
2020-10-06 19:52:36 +00:00
Ed 2402521a69 SCTP: update PPI values 2020-10-06 19:19:09 +00:00
Nardi Ivan fbdf48e024 STUN: add an option to auto-detect STUN protocol version
Commit 3a5d0569d7 added support for different STUN protocol versions;
a global preference allows the user to select the desired flavour.

Unfortunately, it is pretty common to have different flavours in the same
capture file, or even in the same packet (with STUN messages encapsulated
in a TURN tunnel), so a global preference applied to the entire file might
not provide enough flexibility.

Add a basic auto-detect algorithm to identify the STUN version specific to
each STUN message (the users will still have the option to force a global
version)
2020-10-06 13:46:55 +00:00
Pascal Quantin 0abf89ce4f MC-NMF: change get_size_length() signature to get rid of multiple casts 2020-10-06 14:31:12 +02:00
Pascal Quantin b74077c717 MC-NMF: add some missing casts to please MSVC 2020-10-06 13:51:42 +02:00
Uli Heilmeier 557a64d9a9 MC-NMF/MS-NNS: New dissector .NET Message Framing Protocol
New dissector for MC-NMF (.NET Message Framing Protocol) and
MS-NNS (.NET NegotiateStream Protocol).

TLS implementation is not tested due to the lack of a sample capture.

Fixes: wireshark/wireshark#16861
2020-10-06 07:15:55 +02:00
Pascal Quantin fd85f6e9fc XnAP: fix the dissection of some NR and E-UTRA cell identity fields 2020-10-05 14:39:50 +02:00
Pascal Quantin aeb68eb68c X2AP: upgrade dissector to v16.3.0 2020-10-05 13:25:02 +02:00
Pascal Quantin 1dbc6f1da7 XnAP: upgrade dissector to v16.3.0 2020-10-05 10:50:45 +00:00
Pascal Quantin 4b4cd94093 E1AP: upgrade dissector to v16.3.0 2020-10-05 10:16:13 +00:00
Pascal Quantin 069ec8df85 NGAP: upgrade dissector to v16.3.0 2020-10-05 11:47:19 +02:00
Noel Power f97f5a6027 Only parse CRangeCategSpec record for CATEGORIZE_UNIQUE type
parse_CCategSpec was incorrectly always parsing the CRangeCategSpec
record, this record however is optional depending on the value of
CategType. (see MS-WSP 2.2.1.21)

Signed-off-by: Noel Power <noel.power@suse.com>
2020-10-05 08:26:56 +00:00
Pascal Quantin 44739c33ce S1AP: upgrade dissector to v16.3.0 2020-10-05 09:54:35 +02:00
Guy Harris b3de8fd165 Add some comments noting changes that should probably be made. 2020-10-04 15:59:06 -07:00
Peter Wu 1936fef77a TLS: remove support for deprecated QUIC key format
Since draft-ietf-quic-tls-17, QUIC uses TLS 1.3 base secrets for
decryption, so no separate key label is necessary. Applications should
not generate such non-standard key log entries. quiche has already been
updated, picoquic will presumably follow soon if it has not already.
2020-10-04 08:23:25 +00:00
Guy Harris d76ee2cb89 fbzero: do more detailed tag value offset checks.
Check the tag end offset - the offset in the packet of the tag's value's
end - to make sure that 1) it's at or after the offset of the
*beginning* of the tag's value and 2) that it's not past the end of the
packet; in either case, report an error with an expert info, and do not
show the value of that tag or any subsequent tags, as we don't have a
valid value for the length of this tag's value or even the *offset* of
subsequent tags' values.

For tags whose values have a fixed length, report an error, with an
expert info, if the tag value length isn't the expected value, and don't
dissect it.

For tags whose values have a minimum length, report an error, with an
expert value, if the tag value length isn't at least the minimum value,
and don't dissect it.

For tags whose values consist of a sequence of zero or more fixed-length
items, report an error, with an expert value, if there's leftover data
after processing those items.

Add some comments while we're at it.
2020-10-03 21:17:18 -07:00
Martin Mathieson 16dc0c71d3 Last batch of filter field string fixes.
There may still be some cases seen by
./toos/check_typed_item_calls.py --consecutive
that ought to be fixed, but wasn't sure so left.
2020-10-04 00:07:59 +01:00
Martin Mathieson 607831d870 Fix more filter field strings.
These appear to be copy/paste errors detected by running
./tools/check_typed_item_calls.py --consecutive

Quite a few issues still remain after this batch.
2020-10-03 22:11:32 +00:00
ishaangandhi c1eb36b84b ICMP: Fix dissection of Interface Information Object
If an address subobject was included, all subsequent subobjects (eg, interface name or MTU subobjects) would read from the same offset.
2020-10-03 12:43:36 -04:00
Guy Harris a883081b70 Update URLs pointing to the bug database.
Switch from bugs.wireshark.org to the GitLab issues list.
2020-10-03 07:54:12 -07:00
Gerald Combs 3ff9406529 FBZERO: Make sure our offset advances.
Make sure our offset advances so that we don't infinitely loop.
Fixes #16887.
2020-10-03 06:52:10 +00:00
Guy Harris e013c5ec7f Clean up URLs.
Add ui/urls.h to define some URLs on various of our websites.  Use the
GitLab URL for the wiki.  Add a macro to generate wiki URLs.

Update wiki URLs in comments etc.

Use the #defined URL for the docs page in
WelcomePage::on_helpLabel_clicked; that removes the last user of
topic_online_url(), so get rid of it and swallow it up into
topic_action_url().
2020-10-02 20:13:42 -07:00
Gerald Combs 22e7ddb637 LBMSRS: Break out of a loop.
Break out of a loop if our offset advances. Fixes #16886.
2020-10-02 21:26:12 +00:00
Chuck Craft 4a0d8d4ef6 Qt: point to Lua wiki page now on Gitlab 2020-10-02 17:25:54 +00:00
Peter Wu 43e0bd125b QUIC: fix dissection of Short Header packets with Grease QUIC bit
The condition aimed to avoid interpreting padding bytes after the
Initial Packet as Short Header to avoid breaking decryption. However it
also prevents actual Short Header packets from being matched that have
the QUIC bit cleared.

To avoid breaking the latter, strengthen the condition to match the
former only. Tested with quic-31_grease_quic_bit__with_keys.pcapng (from
!429). Regression tested against a private Firefox Nightly trace.
2020-10-02 10:06:50 +00:00
Dr. Lars Völker b57832fdbf TECMP: Adding CAS flag for FlexRay
This adds the CAS (Collision Avoidance Symbol) to the TECMP dissector.

Signed-off-by: Dr. Lars Völker <lars.voelker@technica-engineering.de>
2020-10-02 04:58:56 +00:00
Alexis La Goutte 82e7835b2e EAP: Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang
2020-10-01 07:14:40 +00:00
Ronnie Sahlberg 9ad3d14ea4 http: don't try to dissect zero-length bodies
Closes #16844

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-10-01 07:49:33 +10:00
Anders Broman a08e78f324 GTPv1: Highlight only the value part of "TEID Control Plane"
While at it use proto_tree_add_item_ret_uint().
Closes #16881
2020-09-30 12:22:04 +02:00
Alexis La Goutte b65893f4f4 lithionics: Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang
2020-09-29 18:53:21 +00:00
Alexis La Goutte 71ea1f9017 dcerpc: Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang
2020-09-29 18:53:21 +00:00
Alexis La Goutte 4ad8adeab4 gtp: Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang
2020-09-29 18:53:21 +00:00
Alexis La Goutte e126d91455 mbim: Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang
2020-09-29 18:53:21 +00:00
Alexis La Goutte de44c3e392 smb2: Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang
2020-09-29 18:53:21 +00:00
Anders Broman 7d3ee49180 RTCP: Add dissection of Application mccp TS 24.380 2020-09-29 16:47:42 +00:00
Aurelien Aptel 7514e50d16 SMB2: add reasonable upper limit to pattern_v1 repetition
MAX_UNCOMPRESSED_SIZE is currently 16MiB.

Fix Coverity report CID 1467509: Insecure data
handling (TAINTED_SCALAR) Using tainted variable "times" as a loop
boundary.
2020-09-29 11:00:18 +02:00
Guy Harris 3502d53ffb Remove leftover cruft from previous comment. 2020-09-29 04:39:51 +00:00
Martin Mathieson 2ecd9f6818 IEEE 802.11: Use common filter string for action_code
For radio measurements, use same filter string as most others,
i.e. wlan.fixed.action_code.
2020-09-28 23:29:01 +00:00
Ronnie Sahlberg b9a2d861e4 quic: fix reassembly issue for smb2 (and other protocols)
If we did not find an msp that matched the current segment we would
try to find the msp for set-1 instead. This will only work IFF
we do not know the the exact size of the PDU and where it ends,
i.e. DESEGMENT_ONE_MORE_SEGMENT and friends.

In the case where "get msp for seq-1" gives us an msp where we know the exact
PDU boundary and the current seq is beyond the end of that boundary, then
we should not use the msp for seq-1 but instead treat this as a brand new PDU.

This fixes issues with SMB2-over-QUIC dissection that can be seen in the
sample capture for the "add smb2-over-quic" bug where only the first
multi-segment PDU would be dissected correctly for each direction.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-09-28 23:07:37 +00:00
Guy Harris c597927da8 Add some more string encodings.
Add an encoding for "unpacked" 3GPP TS 23.038 7-bit strings, in which
each code position is in a byte of its own, rather than with the code
positions packed into 7 bits.  Rename the packed encoding to explicitly
indicate that it's packed.

Add an encoding for ETSI TS 102 221 Annex A strings.

Use the new encodings.
2020-09-28 22:30:35 +00:00
Martin Mathieson 8b4e0148a2 Fix some more wrong filter names.
These are duplicates detected seen by running
check_typed_item_calls.py  --consecutive.

There are still quite a few more to go.
2020-09-28 18:20:09 +01:00
Nardi Ivan ec7c5699a7 QUIC: update to draft-31 2020-09-28 14:31:08 +00:00
Martin Mathieson 08ab0e5d1f Fix some wrong filter names.
These were detected by running check_typed_item_calls.py
with --consecutive, which flags items that have different
labels but the same filter string.  Usually this is because
of copy/paste.

Quite a few similar bugs still exist, will address in a future commit.
2020-09-27 18:40:13 +00:00
Aurelien Aptel 3d94644dc8 SMB2: add new pattern_v1 decompression support
Simple decompression algorithm that encodes a single byte and the
number of times it is repeated.

This algorithm can only be used in chained compression packets.
2020-09-26 02:23:23 +00:00
Aurelien Aptel b0f5b2c174 SMB2: handle chained compression
The compression header "reserved" field is now a flags field.
If the flags have the CHAINED bit, the meaning of the offset field
changes and becomes a length field.

	  "old" compressed method:

	  [COMPRESS_TRANSFORM_HEADER with Flags=0]
	    [OPTIONAL UNCOMPRESSED DATA]
	    [COMPRESSED DATA]

	  new "chained" compressed method:

	  [fist 8 bytes of COMPRESS_TRANSFORM_HEADER with Flags=CHAINED]
	    [ sequence of
               [ COMPRESSION_PAYLOAD_HEADER ]
               [ COMPRESSED PAYLOAD ]
2020-09-26 02:23:23 +00:00
Aurelien Aptel b2fd5bcfb9 SMB2: stick the compress header items under the header tree
This makes it behave like the other headers.
2020-09-26 02:23:23 +00:00
Aurelien Aptel fed08cfd45 SMB2: label decompressed data as such and mark as generated 2020-09-26 02:23:23 +00:00
Martin Mathieson 6f49de2e65 SDAP: Show presence in configuration, and summary in root. 2020-09-25 13:22:37 +00:00
João Valverde ca43dace10 IPv6: Update SRH dissection to RFC8754
Implements [1]. Some code was intentionally simplified from the previous draft
implementation, pending some real-world motivation.

[1]https://datatracker.ietf.org/doc/rfc8754/
2020-09-24 18:08:01 +00:00
Martin Mathieson fc64ba242a More dissector spelling fixes. 2020-09-24 16:40:51 +00:00
Martin Mathieson b00a76d36b SDAP: Add some long help, and fix filter name. 2020-09-24 16:16:33 +01:00
Pascal Quantin 04873cc5ef NAS EPS: fix dissection of IPv6 PDN address
Closes #16870
2020-09-24 11:30:19 +00:00
Xu c92ab1158e MAC-NR:for drb the lcid range is 4-32,lcid=3 corresponding srb3 2020-09-24 05:58:53 +00:00
Gerald Combs dcc8bbaf9b BLIP: Update an expert item.
Generalize the decompression error field name and description.
2020-09-23 12:44:30 -07:00
Jim Borden 4a94842710 BLIP: Fix decompression buffer bug
Until now, mistakenly, the buffer for decompressing compressed BLIP messages
has been statically allocated as 16 Kb, but that is not valid behavior.
16 Kb is the maximum size of a _compressed_ frame.  In theory, due to the
ability to zipbomb, there is virtually no upper bound on what the maximum
size of an uncompressed frame could be.  However, to keep sanity, it has
been made into a preference with a reasonable default that is not likely to
be exceeded (64 Kb).  The behavior before for this was that wireshark would
crash because the dissector would return NULL for a decompressed buffer due
to error and then try to deference it later.  A null check has been added,
so that the behavior is now that the packet will show
'<Error decompressing message>' instead, and log why it couldn't handle the
compressed message.  Closes #16866.
2020-09-23 19:36:10 +00:00
Alexis La Goutte b2380385a3 DHCP: Update Captive-Portal to RFC8910
now using code 114 (some conflict with code 160 and Polycom device)
2020-09-23 06:29:38 +00:00
Tom Yan 6387fd7729 X2AP : fix id-Target-SgNB-ID registered to wrong type 2020-09-23 05:55:21 +00:00
Gerald Combs 103d9140ae Kafka: Check returned offsets.
dissect_kafka_regular_bytes might return -1, so handle that in
dissect_kafka_message_old. Closes #16784.
2020-09-23 05:13:16 +00:00
Guy Harris 99f6ac1969 ncp: fix handling of NDS List requests and replies.
In requests:

There appear to be 2 bytes of unknown data (typically 0) after the
2-byte Request Flags field (are they just 2 bytes of additional flags?).
Skip past them before dissecting the iterator.

If there are no bytes remaining in the packet after the parent ID, stop
dissecting; some packets seem to stop there.  For those requests, assume
that the response will contain :

	entry ID;
	entry flags;
	subordinate count;
	modification time;
	base class;
	relative distinguished name;

although the last of those might be something else (it appears to be of
the form "CN={name}").

In replies:

For each returned entry, if the requested field flags in the request had
the DSI_OUTPUT_FIELDS bit set, fetch the returned field flags and use
that to determine what fields are present; otherwise, use the requested
field flags.
2020-09-22 19:57:52 -07:00
Guy Harris e487575362 ncp: fix setting elements of an ncp_record structure.
In dissect_nds_request():

Fill in fieds of the ncp_record structure only on the first pass; once
the first pass is complete, the structure's fully filled in.

That fixes cases where NDS replies aren't fully dissected because the
NDS verb isn't added to the ncp_record structure when the request is
dissected.

Fill in elements as soon as we have the value needed to fill it in, so
that it's filled in even if we throw an exception later, and so that
it's filled in only if we have the value in the packet, so that a valid
value isn't overwritten by a later packet that doesn't have the value.

This fixes cases where, in the second pass, NDS replies aren't fully
dissected because the NDS verb is overwritten in the ncp_record
structure when a continuation of the request is dissected.

Note that we should perhaps make the object_name field a pointer to a
wmem-allocated string, so that NULL can indicate "not set, hence not
known".
2020-09-22 10:47:43 -07:00
Alexis La Goutte 8201285759 EAP: Avoid to inscrement offset on proto_tree_add_item function 2020-09-22 11:20:09 +00:00
Tom Yan b746222896 X2AP : fix a typo 2020-09-22 10:26:00 +00:00
Ameya Deshpande 3ec16de87b USBLL: Code commenting and alignment
Following changes in the file:
1. Explain usbll_address_t and usbll_data_t.
2. Grouping header fields belonging to the same type of packets.
3. Removed unnecessary condition check for usbll_data pointer
   in dissect_usbll_data function.
4. Brief comments on the Macros.
5. Correct code indentation at a few places.

Signed-off-by: Ameya Deshpande <ameyanrd@outlook.com>
2020-09-22 07:30:11 +00:00
Gerald Combs ddd3910709 IPv6: Fix the bit lengths of top-level items.
Fix the bit lengths of the Version, Traffic Class, and Flow Label fields
so that they display correctly in the packet diagram.
2020-09-22 05:51:16 +00:00
Gerald Combs 1e2e32f8ab MySQL: Fixup connection data initialization.
Just use wmem_new0 instead of trying to initialize struct members
by hand. Closes #16854.
2020-09-22 05:32:52 +00:00
Gerald Combs 2b3e666a16 SSH: Fix some warnings.
Set a maximum key length and make sure we don't exceed it. Make sure
we're checking the prefixes of valid strings. Closes #16794.
2020-09-22 05:12:18 +00:00
Guy Harris af83d476dc ncp: add some XXX comments. 2020-09-21 23:20:33 +00:00
Guy Harris dde6261626 nds: use DSI_ #defines in case statement.
Use the DSI_ defines, rather than the raw hex values for bits, to make
it clearer what's being tested.

Make all of the DSI_ #defines, rather than just some of them, unsigned.
2020-09-21 14:27:15 -07:00
Aurelien Aptel 2af134ad2e SMB2: dissect new signing capability negotiate context
Dissect still-undocumented new context used by latest Windows Server
builds, as explained by MSFT engineers during SDC 2020 plugfest.
2020-09-21 22:06:16 +02:00
Mikael Kanstrup 2a3f9d2789 Add a few EAP dissectors 2020-09-21 15:05:05 +00:00
Martin Kaiser 41e6b2f2ae ecmp: fix dissection of file_info request
Playing with the sample capture from bugzilla bug 10562, dissection of
packet 491 (ecmp file_info request) brought up an expert info about a
malformed packet.

The request contains a list of requested attributes. For each attribute,
only the attribute ID is part of the request. The current code tries to
dissect each attribute, this fails when we only have a list of
attribute IDs...

Add a subtree for the list of IDs (and the length of that list).

While at it, remove some unnecessary variable initializers.
2020-09-21 05:20:58 +00:00
Jeff Widman bf0a6c8bd9 typo: replaceing--> replacing 2020-09-20 15:07:21 -07:00
Guy Harris a734de58a6 ncp: put the information flags and entry flags in the right place.
Everything else is put into a subtree; put them in the subtree as well.
2020-09-20 14:34:55 -07:00
Nardi Ivan 1b0e691157 QUIC: add support for MVFST EXPERIMENTAL version 2020-09-20 19:05:09 +00:00
Nardi Ivan 51adcbf255 STUN: improve heuristic to detect TURN ChannelData
Commit 873d5980cd improved STUN heuristic to match TURN ChannelData messages.
It was based on the assumption that, looking at the "stun.type.method" field,
it should be trivial to determine if the current packet carries a TURN message
or not. However, at least one STUN/TURN implementation (Facetime) uses
unknown/custom TURN methods to set up a Channel Data. Fortunately, standard
TURN attributes are still used in the replies.
Improve such heuristic taking into account specific TURN attributes, too.
The list attributes have been taken from RFC5766.
2020-09-20 18:25:24 +00:00
Nardi Ivan 3c08f06be6 RTP, DTLS: add heuristic over CLASSICSTUN 2020-09-20 18:07:21 +00:00
nickvsnetworking 9086af5e25 GSM-SIM - Added support for additional EFs, INS and ADFs 2020-09-20 19:42:52 +10:00
Martin Mathieson ae6bbff3d5 AMQP: fix the bitmask of an item.
I think this is right, but bit order from spec is confusing to me.
2020-09-20 06:20:40 +00:00
Martin Mathieson f0e7a98e96 NRUP: Add Assistance Information Data message.
Don't have a capture of this message type yet, so untested.
2020-09-19 20:58:38 +01:00
Stig Bjørlykke 888a8178f5 lwm2mtlv: Create element items
Create hf entries for element items ObjectInstance, ResourceInstance,
ResourceArray and Resource.

Remove camel case for correlating ett variables.
2020-09-18 06:52:02 +00:00
Maxim Kropp 1f6bf70505 sample_size check readded 2020-09-17 19:55:52 +00:00
Maxim Kropp a1f6dc4fad New dissector: ILDA Digital Network (IDN) Protocol
Stream Specification: https://www.ilda.com/resources/StandardsDocs/ILDA_IDN-Stream_rev001.pdf

The stream specification only defines IDN messages. The other packet commands
like ping request, ping response, etc. (see line 25 - 31 in packet-idn.c)
are part of the hello specification which is not released yet. We were still
able to implement some hello packets since we received a preliminary version
of the hello specification, because we need the hello packets for our work.

related to #16707
2020-09-17 19:55:52 +00:00
Maxim Kropp e5921672f8 New dissector: ILDA Digital Network (IDN) Protocol
Stream Specification: https://www.ilda.com/resources/StandardsDocs/ILDA_IDN-Stream_rev001.pdf

The stream specification only defines IDN messages. The other packet commands
like ping request, ping response, etc. (see line 25 - 31 in packet-idn.c)
are part of the hello specification which is not released yet. We were still
able to implement some hello packets since we received a preliminary version
of the hello specification, because we need the hello packets for our work.

related to #16707
2020-09-17 19:55:52 +00:00
Anders Broman 45188b673d Diameter make use of OctetStringOrUTF8
Use the new feature rather than coding it
2020-09-17 08:52:35 +02:00
robionekenobi 187b1f05bc packet-mq: Improve MultiSegment dissect and display
Dissect and display correctly Multi Segment for
ASYNC_MESSAGE
MQGET
MQPUT
MQPUT1
2020-09-17 05:04:39 +00:00
Ronnie Sahlberg 9f3a42f0d5 sflow: fix dissection of sysuptime
This is sent in units of ms not s.
Issue #16849

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-09-16 21:19:10 +00:00
Nardi Ivan ee8ee3e3ad STUN: add some missing attributes
These attribute have been found on Google webrtc implementation and on MS
TURN specifications
2020-09-16 20:57:58 +00:00
Christian Kreibich c5d5023654 A Community ID implementation for Wireshark.
This adds a protocol post-dissector for Community ID support to
Wireshark/tshark: https://github.com/corelight/community-id-spec

The protocol is disabled by default. It establishes one new filter
value, "communityid".

Includes test cases and baselines to verify correct Community ID
strings based on similar testsuites in the existing Zeek and Python
implementations.
2020-09-16 09:25:38 -07:00
Anders Broman 0d179f114c Diameter:Define a new type-name type-name="OctetStringOrUTF8"
Define a bew type name type-name="OctetStringOrUTF8" type-parent="OctetString"
to be used with OctetStrings that CAN be strings. This is a Wireshark
unique addition to the xml dixtionarys and makes use of BASE_SHOW_ASCII_PRINTABLE.
2020-09-16 13:25:38 +00:00
Martin Kaiser 11adf2d019 afs: use a simpler way to read a time field
If a time field uses a standard enconding, we can call proto_tree_add_item()
to add it to the tree. There's no need to parse the time field ourselves.

Update two places in the afs dissector where the manual parsing can
easily be replaced with a proto_tree_add_item() call.
2020-09-16 11:19:18 +00:00
Ronnie Sahlberg d02ddfb9b1 mysql: initilize is_mariadb_client
This resolves issue 16850

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-09-16 04:18:04 +00:00
Aurelien Aptel 53ebca9b34 SMB2: add posix extensions
Remove the old posix_v1 code which no clients ever implemented and add
code to dissect current version of the POSIX extensions as implemented
by the Linux kernel client (cifs.ko).
2020-09-15 22:21:33 +00:00
George Hopkins 0c373d648a IEC104: add dissection of CP24Time2a time tags 2020-09-15 16:19:50 +02:00
Guy Harris 3417380d65 ncp: fix display of DS_FULL_CLASS_DEFS.
The last item in the reply information is an ACL.  Display it as such.
2020-09-15 04:04:33 -07:00
Alexander Couzens c1889e3cd5 gsm_a_rr: move TARGET PCID into the correct subtree 2020-09-15 10:30:08 +00:00
Guy Harris c5a6fccb30 ncp: pass the NDS class definition type to process_multivalues().
Pass the value of the NDS class definition type to process_multivalues()
as the vflags, rather than the NDS flags, as that's what the
MVTYPE_CLASS_NAMES case in process_multivalues() is expecting.

That way, the class definitions will be dissected correctly.
2020-09-15 03:01:06 -07:00
Ronnie Sahlberg e75969fb71 quic: show encapsulated protocols as top level trees
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-09-15 04:36:54 +00:00
Anders Broman 9f7a06ff88 http: Put the Digest parameters in a subtree. 2020-09-14 14:30:23 +02:00
Nardi Ivan 25d10e68a8 GQUIC: fix dissection of ACK frame 2020-09-14 11:10:43 +02:00
Alexis La Goutte 3f171542ac gQUIC: Add MAD0 Tag (Max Ack Delay) 2020-09-14 05:50:25 +00:00
Nardi Ivan c38c83c38f GQUIC: add support for Q046
Even if Q046 is an old version, it is still used by the current QUICHE
implementation.
In this way, the latest Wireshark is able to dissect all GQUIC versions
supported by recent Chrome (Q043,46,50 and T050,51), i.e. all GQUIC versions
that you can find in live traffic right now.
Pcap examples are available in #15984 and in the attachment.
Some Q046 information are available in:
https://docs.google.com/document/d/1FcpCJGTDEMblAs-Bm5TYuqhHyUqeWpqrItw2vkMFsdY/edit#heading=h.32qkkficm7za

Close #15984
2020-09-14 03:44:44 +00:00
Gerald Combs 84deceaf1c DVB-S2-TABLE: Another spelling fix.
Fix

I: libwireshark0: spelling-error-in-binary usr/lib/x86_64-linux-gnu/libwireshark.so.0.0.0 Continous Continuous

found by lintian.
2020-09-14 01:29:05 +00:00
Gerald Combs bd9554543c DVB-S2-TABLE: Fix spelling.
Fix

I: libwireshark0: spelling-error-in-binary usr/lib/x86_64-linux-gnu/libwireshark.so.0.0.0 adress address

found by linitian.
2020-09-14 00:45:20 +00:00
Gerald Combs cc3c195a32 WASSP: Fix spelling.
Fix

I: libwireshark0: spelling-error-in-binary usr/lib/x86_64-linux-gnu/libwireshark.so.0.0.0 Mangement Management

found by lintian.
2020-09-14 00:04:45 +00:00
Guy Harris 2260fabbdb ncp: fix indentation. 2020-09-13 14:18:47 -07:00
Thiyagarajan P 78466d1046 Support to dissect beacon timing element
Added support for dissecting the beacon timing element.
IEEE80211-2016, section 9.4.2.105.
2020-09-13 20:16:07 +00:00
Gerald Combs 951837a644 A615a: Fix spelling.
Fix

I: libwireshark0: spelling-error-in-binary usr/lib/x86_64-linux-gnu/libwireshark.so.0.0.0 Ammendment Amendment

found by lintian.
2020-09-13 18:01:01 +00:00
Nardi Ivan 46456dcf1a TLS: add missing parameters in QUIC Transport Parameters 2020-09-13 13:07:46 +00:00
Martin Mathieson 82827278f7 More dissector string spelling fixes.
Finally, it is becoming difficult to find more.
2020-09-13 09:03:08 +01:00
Alexis La Goutte 2f89b8d62c SMB/NBT: Add support of SMB over QUIC
Using ALPN smb

Issue: #13881

Thanks to Graham for help to use directly nbt dissector
2020-09-13 06:15:29 +00:00
Guy Harris 272502790b Add FT_STRINGZTRUNC.
FT_STRINGZPAD is for null-*padded* strings, where the field is in an
area of specified length, and, if the string is shorter than that
length, all bytes past the end of the string are NULs.

FT_STRINGZTRUNC is for null-*truncated* strings, where the field is in
an area of specified length and, if the string is shorter than that
length, there's a null character (which might be more than one byte, for
UCS-2, UTF-16, or UTF-32), and anything after that is not guaranteed to
have any particular value.

Use IS_FT_STRING() in some places rather than enumerating all the string
types, so that those places get automatically changed if the set of
string types changes.
2020-09-12 14:16:12 -07:00
Pascal Quantin 7811c06272 PFCP: fix dissection of C-TAG and S-TAG IEs 2020-09-12 20:29:16 +00:00
Alexis La Goutte 889dd0cbfb QUIC: Update to draft-30
Update value_string version (0x000e)
Add AEAD_LIMIT_REACHED (0xf) Error (with conflict fix : https://github.com/quicwg/base-drafts/pull/4088)

Issue #13881
2020-09-12 09:26:33 +00:00
Ronnie Sahlberg 9182bb9c48 smb2: add NegotiateContext/Compression flags field
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-09-12 07:39:58 +00:00
Guy Harris 1a410ef0b0 ncp: fix a copy-and-pasteo.
In process_multivalues(), we create a protocol item for the attribute
syntax, but we don't fetch its value, and don't pass it to
print_nds_values() as the syntax argument; instead, we pass a variable
that wee initialize to 0, but never set.  (One of the disadvantages of
preemptively initializing local variables is that data flow analyzers in
compilers and static analyzers can't point out that you didn't set the
variables in question to *useful* values.)

This fixes the dissection of NDS Read replies.
2020-09-11 23:23:47 -07:00
Harald Welte 13ac47ad4e Q.933: Fix decoding of PVC Status field
This field is actually a bitmask of four bits.  It's somewhat odd
to decode it using a value_string.  In any case, the values were
plain wrong (shifted to the left by '1').

See Figure A.3 of ITU-T Q.933

A related pcap file can be found at
https://people.osmocom.org/laforge/pcap/gsmtap-fr-q933-pvc_status.pcap
2020-09-11 23:42:00 +02:00
Harald Welte ee292b11a7 Q,933: Fix display of 'active' bit in PVC Status
The mask applied to the final octet of the PVC Status IE must be 0x0E,
not 0x0A.  The current code masks out the active bit, printing a '.'
instead of it.

See Figure A.3 of ITU-T Q.933

A related pcap file can be found at
https://people.osmocom.org/laforge/pcap/gsmtap-fr-q933-pvc_status.pcapc
2020-09-11 22:40:33 +02:00
Odysseus Yang 726e0ccb0a MBIM: dissect the commands of MBIM extended version 2.0
MBIM_CID_VERSION
MBIM_CID_REGISTER_STATE
MBIM_CID_PACKET_SERVICE
MBIM_CID_SIGNAL_STATE
2020-09-11 17:10:58 +00:00
robionekenobi 83b45f0c2e packet-mq: Improve Structure Display
FCNO Improve field display
FOPA Improve field display
FCMI Support new structure
GMO  Support version 4
LPOO Improve field display
ID   Initial Data Improve field display
PMO  Improve QName display in COL_INFO
CONN Improve field display
2020-09-11 08:12:24 +00:00
Guy Harris e32d2c7a7a gvsp: fix type of GenDC signature.
To quote the GenDC 1.1 specification, section 2.2.2 "GenDC Container
Header Description":

	Unique signature identifying a GenDC Container: a FourCC code
	encoded as 4 ASCII characters not null terminated ...

so it's FT_STRING, not FT_STRINGZ.

Give the URL for a page pointing to all GenICam standards, including the
GenDC standards, version 1.0 and 1.1.
2020-09-10 23:35:09 -07:00
Pascal Quantin cb810e7003 proto.c: add support for BASE_SPECIAL_VALS to fill_label_number64()
This is similar to what is done in fill_label_number()
2020-09-11 03:12:07 +00:00
Guy Harris b340dc8de8 SAP: make the Server Name field FT_STRINGZPAD.
According to the Novell IPX Router Specification, Chapter 4 "Service
Advertising Protocol (SAP)":

	Server Name

	This field contains the 48 byte character string name that is
	assigned to a server.  The Server Name, in combination with the
	Service Type, uniquely identifies a server on an internetwork.
	Although SAP response packets always include the full 48 bytes
	for this field, typical server names are usually less than 48
	characters long and are ASCII NULL terminated.  The contents of
	the unused bytes which follow the NULL terminator are undefined.

which seems to indicate that a full 48-byte name will not have a null
termintor.  It also indicates that the field isn't null-padded, just
"null-terminated if it's not terminated by the end of the field's fixed
length"; perhaps we need to distinguish between the former and the
latter, although it's not clear what would be a good short name for the
latter.

In any case, it sounds as if it's not guaranteed to be null-terminated.
2020-09-10 18:32:35 -07:00
Guy Harris 3fa8f42c76 bpdu: fix some string types.
As per IEEE Std 802.1Q-2016, section 13.8 "MST Configuration Identifier
(MCID)",

	The Configuration Name, a variable length text string encoded
	within a fixed field of 32 octets, conforming to IETF RFC 2271's
	definition of SnmpAdminString.  If the Configuration Name is
	less than 32 characters, the text string should be terminated by
	the NUL character, with the remainder of the 32-octet field
	filled with NUL characters.  Otherwise, the text string is
	encoded with no terminating NUL character.

so it's not FT_STRINGZ, it's FT_STRINGZPAD.

This applies to other configuration names as well.
2020-09-10 16:20:09 -07:00
Alexander Couzens f33e1c13fa gsm_a_rr: correct spare bits of Channel Description
ETSI 44.018: 10.5.2.5: spare bits are 3+4 and not 5+6. The counting
in the spec might be confusing, because bits start at 8 not at 1.
2020-09-10 22:37:41 +00:00
Guy Harris 5e1a302d9e afp: treat passwords as null-padded.
They're sent over the wire as an 8-octet field, with passwords shorter
than 8 octets padded with NULs.

Update some URLs while we're at it.
2020-09-10 14:28:29 -07:00
Aurelien Aptel fd922bc806 SMB2: add new RDMA transport negotiate context
From [MS-SMB2] version 61.
2020-09-10 20:26:22 +02:00
Aurelien Aptel 51a1765698 SMB2: add new transport negotiate context
From [MS-SMB2] version 61.
2020-09-10 20:26:22 +02:00
Aurelien Aptel 76229da61d SMB2: add new compression algorithm in negotiate context
From [MS-SMB2] version 61.
2020-09-10 20:26:22 +02:00
Nardi Ivan bb563317a1 GQUIC: fix endianess for Q050, T050 and T051 2020-09-10 15:02:19 +00:00
Alexis La Goutte b801e7c4a9 gQUIC: fix wrong encoding for client timestamp (ctim)
Closes #16839
2020-09-10 14:01:41 +00:00
robionekenobi 8893a0f311 packet-mq: code reformating
Reformat some code part to remove unneeeded spaces
2020-09-10 11:51:40 +00:00
Martin Mathieson a2a3e38fdb Fix some more dissector spellings. 2020-09-10 11:26:16 +00:00
Guy Harris b446e36471 aeron: the Error String in an Error Header is not null-terminated.
The Aeron specification says nothing about it being null-terminated, and
in at least some captures, it's not null terminated.

Make it an FT_STRING, rather than an FT_STRINGZ.

Clean up a comment so that more of the URL is visible in a narrower
window.
2020-09-10 11:02:22 +00:00
atul358 1b5be9bcba Issue 16683 - SIP - Dissection of Logme Marker in the Session ID header of the sip packet 2020-09-10 10:18:26 +00:00
Anders Broman c0f6f7a7c1 SDP: Handle fmpt:MCVideo
The dissector expect a numeral(PT) after fmtp: exept for listed strings,
add MCVideo to those strings.
2020-09-10 08:36:58 +00:00
RobiOne (Robert Grange) 106e686e45 packet_mq: Support V9.2, improve MultiSegment, improve some struct display
MQ V9.2 support
Improve disscetion for multi-segment MQGET_REPLY, MQPUT, MQPUT1, ASYNCH_GET
Improve display for some structure (ID, CONN) Some fixes
2020-09-10 07:41:25 +00:00
Alexis La Goutte a4319f3254 ieee80211: fix Wmissing-prototypes
no previous prototype for function 'add_ff_action_public_fields' [-Wmissing-prototypes]

Change-Id: I8be64454a21187cf60a04c903acfbb18f2a12095
2020-09-09 06:06:29 +00:00
Alexis La Goutte f75281cdd0 QUIC: Fix missing bit shift from KP (Key Phase) 2020-09-09 03:43:54 +00:00
Gerald Combs 08b5061733 Release notes: Miscellaneous cleanup.
Update a dissector name.
2020-09-08 22:01:14 +00:00
Georg Richter 2f1cf93174 MySQL: Added support for MariaDB protocol
MariaDB and MySQL are not longer drop-in compatible, they differ in very
different directions
for protocol and api. This patch contains support for MariaDB specific
commands and extensions:

- MariaDB specific character sets and collations (also updated MySQL
collations)
- MariaDB extended capabilities in greeting and login packets
- Support for MARIADB_STMT_BULK_EXECUTE command
- Removal of "5.5.5-" prefix in the version string.
2020-09-08 09:02:02 +02:00
Nardi Ivan 8bcf6783a5 TLS: add missing parameters in quic_transport_parameters extension
These parameters are used by latest GQUIC versions.
Pcap examples are available in #16825

I noticed that gquic::dissect_gquic_tag() and gquic::dissect_gquic_tags()
don't really need the gquic_info parameter: remove it
2020-09-08 03:37:58 +00:00
Pau Espin 5a874c5796 BSSMAP: Fix malformed packet exception on correct packet
Both osmocom and TTCN3 Titan are parsing Handover Request with an IPv6
Transport layer Address just fine, but wireshark was showing it as
malformed. Parsing the address similar to what is done in IPv4 fixes the
issue.
2020-09-07 18:48:15 +00:00
Pau Espin 28faecec7a BSSMAP: Fix used param marked as unused 2020-09-07 18:48:15 +00:00
Martin Mathieson d461bf3025 Yet more spelling fixes.
Includes small updates to the script and wireshark dictionary.
Probably the last spelling fixes from me for a while.
2020-09-07 16:35:13 +01:00
Alexis La Goutte 9fb13aaa9a SMB2: add missing cipher type for SMB2_ENCRYPTION_CAPABILITIES
From https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/16693be7-2b27-4d3b-804b-f605bde5bcdd
2020-09-05 19:59:33 +00:00
Pascal Quantin d541071dae E1AP: upgrade dissector to v16.2.0 2020-09-05 18:00:48 +02:00
Pascal Quantin dfabf33dfd proto.c: increase PROTO_PRE_ALLOC_HF_FIELDS_MEM 2020-09-05 18:00:48 +02:00
Pascal Quantin 291c836392 F1AP: upgrade dissector to v16.2.0 2020-09-05 13:32:33 +02:00
Pascal Quantin 87521e8bf5 NGAP: fix a comment in the header file and add it to CMakeLists.txt 2020-09-05 11:52:37 +02:00
Gerald Combs 7ab6440416 Tools: Clean up checkAPI and add ui/qt.
Remove the --check-addtext and --build flags. They were used for
checkAddTextCalls, which was removed in e2735ecfdd.

Add the sources in ui/qt except for qcustomplot.{cpp,h}. Fix issues in
main.cpp, rtp_audio_stream.cpp, and wireshark_zip_helper.cpp.

Rename "index"es in packet-usb-hid.c.
2020-09-05 07:41:29 +00:00
Nardi Ivan a46b62fcab (G)QUIC: improve dissection capabilities (Q050, T050 and T051)
Fix support for Q050 and add support for T050 and T051.
For these 3 versions, add dissection of (at least) Initial Packets.

For salts and other info, see:
"A Guide to Parsing QUIC Client Hellos for Network Middlebox Vendors"
https://docs.google.com/document/d/1GV2j-PGl7YGFqmWbYvzu7-UNVIpFdbprtmN9tt6USG8/preview

Note these versions are actively used by Chrome right now.
Based on https://code.wireshark.org/review/#/c/37492/ done by @alagoutte
2020-09-05 07:02:04 +00:00
Martin Mathieson 51cbb47e1f Fix some detected spelling errors in ASN1 dissectors.
Done by scanning the asan1 template files. If there are spelling
mistakes in the specifications, we should ignore.  Note that for z3950, I had
already found and accidentally fixed the same errors in the generated
file (before I taught my script to ignore gnerated dissector files).
2020-09-05 00:51:48 +00:00
Pascal Quantin fa9f718692 S1AP: fix a field mask 2020-09-04 21:47:32 +00:00
Pascal Quantin 6f68f86f28 X2AP: fix a field mask 2020-09-04 21:29:14 +00:00
Pascal Quantin 5024bbed65 XnAP: dissect a few more fields 2020-09-04 23:07:43 +02:00
Martin Mathieson ef1c388acd GTP NR RAN Extension Header: Update to latest spec.
Type 2 (Assistance Information Data) is still missing.
2020-09-04 20:29:45 +01:00
John Thacker 645716fb6d FCOE: Autodetect Ethernet FCS by examining EOF
In the T11 version of FCOE, the length field was removed. If the last
four reported bytes don't look like the EOF plus padding, but the four
bytes before that do, then the Ethernet FCS is almost surely present so
treat it that way. Closes the other case of #4594
2020-09-04 11:23:56 +00:00
Pascal Quantin f68719bd8a RTP: always add rtp.payload field but hide it if a subdissector is found
This is useful to dump the RTP payload using tshark without the need to
deactivate the sub dissector
2020-09-04 10:51:14 +00:00
Chuck Craft eb626aa650 Query #define was being used in reply processor. 2020-09-04 06:21:39 +00:00
Anders Broman 0e6551336d Diameter 3GPP: Pretify dissection of 3GPP AVP 524 Codec-Data 2020-09-04 06:04:50 +00:00
Pascal Quantin c09cb5c343 GTPv2: fix dissection of Target Identification IE
Closes #16822
2020-09-03 21:54:18 +02:00
Pascal Quantin 09c9b87c8c XnAP: upgrade dissector to v16.2.0 2020-09-03 12:22:26 +02:00
Gerald Combs 10204490d7 USB HID: Avoid allocating a huge amount of memory.
Make sure we don't pass a huge number to wmem_array_grow. Closes #16809.
2020-09-02 21:19:32 +00:00
Gerald Combs 898e390c2c Fix the Windows build.
Fetch time zone names using _tzname.
2020-09-02 12:36:53 -07:00
George Hopkins 2411eae9ed multipart: fix deallocation of invalid parts
Fixes #16741
2020-09-02 11:38:56 +00:00
Juanjo Martin 83050495a7 RTPS: Fixing typo in a mask, it should be app_id instead of host_id 2020-09-02 10:05:28 +00:00
Guy Harris a1762dcbb0 get_zonename(): don't convert _tzname[] values to UTF-8.
Now that we're setting the C-language locale to use the UTF-8 code page,
they're already *in* UTF-8; g_locale_to_utf8() doesn't treat the
C-language locale's code page as the "locale" code page, it uses the
system code page, so it reads a UTF-8 string as being in some local code
page's encoding and proceeds to mangle it in the process of converting
it to UTF-8.

Closes #16811 (closed)
2020-09-01 23:52:35 -07:00
Gerald Combs c702b44a01 USB HID: Fix a double free.
Make sure we allocate a new field.usages array for
USBHID_MAINITEM_TAG_OUTPUT as we do for USBHID_MAINITEM_TAG_INPUT.
Closes #16818.
2020-09-01 22:01:46 +00:00
Martin Mathieson 218881dd13 Fix some spelling errors detected in epan/prefs.c
Ignored "st_sort_casesensitve", as it will not normally be seen by users,
and changing it would lose the previous setting (if set).
2020-09-01 20:43:42 +00:00