Commit Graph

37152 Commits

Author SHA1 Message Date
Joakim Karlsson bf8577b88c pfcp: change to utilize proto_tree_add_bitmask_list 2022-07-14 12:46:09 +00:00
Alexis La Goutte b97556fabf ebhscr: Fix conflict
'ebhscr.lin.wakeup' exists multiple times with incompatible types: FT_UINT64 and FT_BOOLEAN
2022-07-14 11:13:54 +00:00
Alexis La Goutte f70e58a2eb erldp: fix conflict
'erldp.big_ext_str' exists multiple times with incompatible types: FT_BYTES and FT_STRING
2022-07-14 11:13:54 +00:00
Alexis La Goutte 204916c390 gsm_file: fix duplicate entry
Field 'File ID' (gsm_sim.file_id) has a conflicting entry in its value_string: 24380 is at indices 72 (DF.MExE) and 78 (DF.MexE)
Field 'File ID' (gsm_sim.file_id) has a conflicting entry in its value_string: 24384 is at indices 73 (DF.EIA/TIA-533) and 80 (DF.WLAN)
Field 'File ID' (gsm_sim.file_id) has a conflicting entry in its value_string: 20233 is at indices 194 (EF.EFSUPI_NAI) and 198 (EF.PBC)
Field 'File ID' (gsm_sim.file_id) has a conflicting entry in its value_string: 20234 is at indices 195 (EF.Routing_Indicator) and 199 (EF.PBC1)
2022-07-14 11:13:54 +00:00
Alexis La Goutte 19bc326f1b erldp: Fix duplicate entry
Field 'Tag' (erldp.etf_tag) has a conflicting entry in its value_string: 70 is at indices 12 (NEW_FLOAT_EXT) and 29 (DIST_FRAG_CONT)
2022-07-14 11:13:54 +00:00
Alexis La Goutte 1ff01f18bb ieee802154: fix duplicate entry
Field 'Id' (wpan.header_ie.id) has a conflicting entry in its value_string: 29 is at indices 2 (RendezVous Time IE) and 5 (Rendezvous Time IE)
2022-07-14 11:13:54 +00:00
Kaige Ye a89696dc2d MySQL: support CLIENT_QUERY_ATTRIBUTES capability 2022-07-14 10:32:29 +00:00
Joakim Karlsson edab806981 pfcp: correction of UP Function Features IE 2022-07-14 09:32:07 +02:00
Alexis La Goutte 32a4a08683 lapd: Fix Clang Analyzer warning
Access to field 'state' results in a dereference of a null pointer (loaded from variable 'ptr')
2022-07-13 20:55:49 +00:00
Alexis La Goutte 69ea1930a7 BGP: fix typo for EVPN Router's MAC (RFC9135)
Reported by Joe Neville => https://twitter.com/joeneville_/status/1544020405530279938
2022-07-13 18:59:56 +00:00
Anders Broman 4ea0e5de83 IPv6: Configurable IPv6 NAT64 prefixes 2022-07-13 18:24:36 +00:00
Dirk Römmen 5a3b7488d9 BACnet: Added new vendor ID's, fixed BACnet SC decodings.
New vendor ID's up to june 22, 2022 have been added.
Decoding of the optional description field in BACnet SC BVLC's has been fixed.
Decoding of the exteded event parameters has been fixed.
2022-07-12 17:13:58 +00:00
Adrian Granados 3c29458a46 ieee80211: Update VHT channel width interpretation as in IEEE Std 802.11-2020 2022-07-12 16:42:23 +00:00
Uli Heilmeier 0a6eae4df1 X509if: Increase MAX_RDN_STR_LEN to 128
Fixes: #18183
2022-07-11 15:07:09 +00:00
Gerald Combs d10253ebea [Automatic update for 2022-07-10]
Update manuf, services enterprise numbers, translations, and other items.
2022-07-10 18:42:22 +00:00
Dr. Lars Völker 298a46446a SOME/IP: Make uats much more robust against faulty configs (BUGFIX)
This patch improves the uat config checking for SOME/IP:
- detecting simple endless loops
- better error output on faulty configs
- using uat resets to fix crash on faulty configs
2022-07-10 11:38:04 +00:00
Dr. Lars Völker cbe62539b2 TECMP: Update Control Message IDs
This patch updates the Control Message IDs to TECMP 1.6/1.7. Since
some of the IDs are up to the user to configure, a UAT was added.
2022-07-09 17:31:36 +00:00
Dr. Lars Völker fad4d7f608 SOME/IP, Signal-PDU, IPduM: Harmonize uat comments 2022-07-08 21:59:51 +00:00
Emmanuel Pauchard 79afe8e202 IEEE 802.15.4: CSL: Add dissector for RendezVousTime IE (#18182)
The dissector enables support for CSL Wake Up Frames.
2022-07-08 11:00:51 +00:00
Andreas Schultz ccbc0d5fe9 pfcp: add TP IPFIX and Trace IEs 2022-07-08 01:08:33 +00:00
Andreas Schultz d7720667d9 pfcp: add TP packet measurement IE 2022-07-08 01:08:33 +00:00
Andreas Schultz 70b7a42f73 pfcp: add TP Created NAT Binding 2022-07-08 01:08:33 +00:00
Guy Harris abe8798b78 nhrp: clean up extension parsing.
For the top-level item for an extension, initially create it with a
length of "to the end of the packet" and, when we finish dissecting it,
set the length appropriately.  That way, if the length is too large, we
don't throw an immediate exception, making it a little clearer what's
happending.

When dissecting an authentication extension, construct the text of the
top-level item as we dissect it, and initially create it with a length
of "to the end of the packet" and, when we're finished dissecting it,
set the length appropriately.  That way, we don't throw an exception
before doing any dissection if the data for the item isn't all there, we
only throw an exception when we run out of data, and we also don't try
to add the data unless there is at least one byte of data.

The latter of those fixes #18181.
2022-07-07 02:26:27 -07:00
Martin Mathieson eab62aa768 Fix some spellings. 2022-07-06 09:02:37 +01:00
David Perry 51315cf37c Fix AUTOSAR heuristic label 2022-07-05 19:19:56 +00:00
Deepthi Mary dfa160832d Adding 9 zbee zcl frames 2022-07-05 07:25:46 +00:00
Gerald Combs ff36056573 [Automatic update for 2022-07-03]
Update manuf, services enterprise numbers, translations, and other items.
2022-07-04 21:30:14 +00:00
Joakim Karlsson 2fe99d640f pfcp: Update to 3GPP TS 29.244 V17.5.0 2022-07-04 19:57:09 +00:00
Anders Broman fed641fc27 http: Add path components to tree 2022-07-04 17:45:08 +00:00
Uli Heilmeier 1489ea8fe6 SMPP: Initialize tvb_msg to NULL
Fixes: wireshark/wireshark#18170
2022-07-04 18:12:03 +02:00
Guy Harris 1018e39ea3 eap: add a comment asking why dissect_eap_identity_wlan() exists?
Must identity strings in EAP be dissected differently over different
protocols?
2022-07-03 23:27:40 -07:00
John Thacker 50a3ac0c18 diameter: Strengthen heuristic slightly
The Diameter message length must be a multiple of 4, something
implicitly true in RFC 3588 and make explicit in RFC 6733.
2022-07-03 21:25:57 -04:00
John Thacker d5c81ba9d8 ath: Add heuristics
Port 45564 is not IANA registered for Apache. The heartbeat
messages all start with the same 8 character ASCII delimiter
string, so use that for heuristics.
2022-07-03 14:54:56 -04:00
John Thacker d065e9ac50 Diameter: Add a heuristic dissector over TCP
Add a heuristic dissector for Diameter over TCP, disabled by default.
We shouldn't need one for Diameter over SCTP, the PPID should take
care of it.
2022-07-03 12:36:31 -04:00
John Thacker c88107f632 diameter: Register the [D]TLS port
Port 5868 is IANA registered for Diameter over TLS/TCP and
DTLS/SCTP. Register the diameter TCP handle by name so that
it can be registered to tls.
2022-07-02 12:18:28 +00:00
John Thacker f30062b9d5 egd: Do some simple heuristics
GE Fanuc's Ethernet Global Data uses a unassigned UDP port.
Add some simple heuristics, based on the fixed first two bytes
of the message.
2022-07-02 11:25:40 +00:00
Stig Bjørlykke 190404d66b dtls: Support Connection ID when using Block Ciphers
Add support for DTLS Connection ID when using Block Ciphers,
the MAC algorithm is different.
2022-07-01 21:31:51 +00:00
Guy Harris 0257b41167 iec104: dissect the control field as a 4-octet little-endian field.
Treat all 4 octets of the control field as a single little-endian value
divided into bitfields.  We already showed *some* subfields as
bitfields; this means we show *all* of them that way.

That makes the display more clearly show which bits in those octets
correspond to which fields.

It also fixes the dissection of the type field; we have separate
bitfields for I frames (1-bit bitfield) and S and U frames (2-bit
bitfield).

Use proto_tree_add_item_ret_uint() to fetch the values other than the
frame type value.

Fixes #18167.
2022-06-30 23:35:52 -07:00
Odysseus Yang b250224c45 MBIM: dissect SAR commands
MBIM_CID_MS_SAR_CONFIG
MBIM_CID_MS_TRANSMISSION_STATUS
2022-06-30 17:21:15 +00:00
Roland Knall b165f31cd3 gtp: Fix copy-paste error 2022-06-30 16:38:05 +02:00
John Thacker 774a7f0eee dcp-etsi: Strengthen heuristic, add for Decode As
Strengthen the DCP-ETSI (TS 102 821) heuristic from matching
two bytes to matching four bytes. Split the heuristic and
non-heuristic dissector pieces, and add the non-heuristic
dissector for Decode As.
2022-06-30 07:29:46 -04:00
Dr. Lars Völker 4a26993ec0 SOME/IP: code cleanup to reduce memory leaks 2022-06-30 04:34:22 +00:00
Moshe Kaplan 96c4c9063f packet-gtp.c: Fix copy-paste error (Coverity 1506627)
Use guaranteed uplink bitrate,
instead of max uplink bitrate, when
calculating guaranteed uplink bitrate.
Fixes Coverity 1506627 and #18164.
2022-06-30 03:03:24 +00:00
John Thacker 37d3c7add2 STUN: Check the Fingerprint (CRC32) 2022-06-29 21:57:10 -04:00
John Thacker 7f5089ba40 knxip: Add a port range preference
KNX/IP has an IANA registered port, 3671, and some other ports commonly
used but unregistered (or registered to other services). It also has
no heuristics. Add a port range preference defaulting to the registered
port.
2022-06-29 21:41:25 -04:00
John Thacker 6c16cd7cbb tplink-smarthome: Add a brief heuristic
tplink-smarthome uses a port registered by IANA to another application.
At least add a heuristic; since the message is always JSON, we
can decode and test the first two characters.
2022-06-29 19:29:22 -04:00
Tomasz Moń 88c8bb19e5
USBLL: Dissect speed specific linktypes
USB 2.0/1.1/1.0 devices (or 3.x and newer when connected to hosts that
are not Super-Speed capable) operate at one of three speeds:
  * Low-Speed (1.5 Mbps)
  * Full-Speed (12 Mbps)
  * High-Speed (480 Mbps)

Supporting speed specific linktypes allows speed specific dissection
without the need for user to manually set the speed.
2022-06-29 05:56:03 +02:00
John Thacker d41127602a STUN: Set conversation dissector after any STUN packet
After implementing RFC 7983, the STUN dissector will reject
DTLS and [S]RTP packets even in non-heuristic mode. Since
the dissector is more discriminating, it is safe to set
the conversation dissector after receiving any valid STUN
packet, not just specifically a TURN packet.

This makes dissection work better on some captures that have
some TURN ChannelData messages along with STUN packets in
the other direction, but lack the packets that set up the
TURN Channel. In turn, that allows the Decode As setting to
be configured for RTP, which has a weaker heuristic dissector
than STUN. Fix #18148.
2022-06-28 21:51:29 -04:00
Dr. Lars Völker 487165dd50 DoIP: Support UAT for User defined payload types
This patch allows user defined payload types to have names.
2022-06-28 18:38:53 +00:00
Martin Mathieson 33031c8955 Make some variables in packet-grebonding.c static. 2022-06-28 16:51:35 +01:00
Dr. Lars Völker d562cc3033 PTP: Improved robustness on wrong 2-step flag and 1-step
This code adds more robust handling of smaller issues with PTP messages,
like a missing 2-step flag of a not quite correct implementation of
802.1AS and improves 1-step support.

Changes:
- Handle 1-step syncs in analysis.
- Handle missing 2-step flag on pDelay more robust and warn in analysis.
- Handle missing F'up TLV in 802.1AS Sync more robust and warn.
2022-06-27 13:23:27 +00:00
John Thacker 26b0a0a8d3 stun: Tighten heuristic by rejecting restricted values
Reject the previous reserved and unassigned TURN channels and
STUN methods restricted by RFC 5764 and RFC 7983 to allow
multiplexing of STUN with DTLS-SRTP (and ZRTP) on the same
addresses and ports. (As an exception, allow the special MS
Multiplex TURN channel value.) Earlier versions of the specs
had these as unassigned (or did not support TURN Channels), and
no implementation has used them.

This prevents the STUN dissector from claiming RTP packets
going to the same port as set for STUN by Decode As, and should
allow us to set the STUN dissector as the dissector for a conversation
on UDP if we see any STUN message, not just a TURN message type.
2022-06-27 08:56:44 -04:00
Jo-Philipp Wich 1433104479 IEEE1905: fix IPv6 type TLV parsing
- Declare a separate type for the IPv6 TLV MAC address, otherwise its
   filter key is `ieee1905.ipv4_type.mac_addres` instead of the expected
   `ieee1905.ipv6_type.mac_addres` one which is confusing

 - Fix label for `hf_ieee1905_ipv6_type_count` to read "IPv6 address count"
   instead of the wrong "IPv4 address count"

 - Parse the IPv6 link local address which appears between the EUI-48 and
   the IPv6 address count in IPv6 type TLVs, without that, valid IPv6 TLVs
   are wrongly parsed and reported as malformed

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-06-27 11:47:57 +00:00
Dr. Lars Völker 2c9675b759 TECMP: fix typo 2022-06-27 11:31:35 +00:00
John Thacker dda4af1fc5 STUN: Update some comments 2022-06-26 15:03:23 -04:00
Gerald Combs b5e1e63dd0 [Automatic update for 2022-06-26]
Update manuf, services enterprise numbers, translations, and other items.
2022-06-26 17:40:36 +00:00
John Thacker cc52ef4d12 STUN: Fix MS-IMPLEMENTATION-VERSION value string
MS-IMPLEMENTATION-VERSION is not a duplicate of MS-VERSION, and
has a different interpretation. MS-VERSION is the version number
of MS-TURN, its values described in 2.2.2.17 of its spec, and
MS-IMPLEMENTATION-VERSION is the version of MS-ICE2, its values
described in section 3.1.5.2 of its spec.

The latter indicates whether the STUN message format must be that of
Internet-Draft behave-rfc3489bis-02 (that is, roughly the final
form of classic STUN, also used in MS-TURN) or whether that of
RFC 5389 is also supported.
2022-06-25 23:01:26 -04:00
John Thacker e49a69f361 HTTP: Add chunks as items instead of calling data dissector
HTTP chunked transfer encoding can have lots of chunks, and calling
the data dissector for each individual chunk adds a large number of
layers to the frame and doesn't really make sense. (As opposed to
calling the data dissector on the reassembled data if we can't handle
the content type, which does make sense.) In particular, this can
cause a failed assertion by adding more layers than
PINFO_LAYER_MAX_RECURSION_DEPTH.

Just add each data chunk as a FT_BYTES item. Fix #18130.
2022-06-25 20:28:10 +00:00
João Valverde 229dad6a75 X509IF: Fix duplicate filter name
Fixes #18155.
2022-06-24 21:10:45 +00:00
João Valverde f1902c643e Regenerate ASN.1 dissectors 2022-06-24 21:10:45 +00:00
Jim Young a9bcbaf738 DNS: Note and dissect any extraneous payload bytes 2022-06-24 08:04:40 +00:00
Eelco Chaudron e79630f1d9 Frame: Fix segmentation dump when parsing packet_verdict
This change fixes a segmentation fault core dump in tshark/Wireshark
when loading a pcapng file that contains the packet verdict option.

This problem got introduced in the commit mentioned below.

Fixes: 030b06ba3c ("pcapng: write packet and Netflix custom blocks the same as other blocks.")
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
2022-06-24 00:02:29 +00:00
Thomas Vogt 95b01dc4bf GREbond: Add support for Huawei's GRE bonding (RFC8157) control protocol
This dissector is for the control messages of the GRE bonding protocol by
Huawei. These messages are encapsulated in GRE and can appear on both/all
bonding links.

During development, I made heavy use of traffic for Deutsche Telekom Hybrid
service. There fore, it also supports the first version which did not have an
IEEE assigned ethertype.
2022-06-23 19:40:25 +00:00
Dr. Lars Völker 181a7c7d7d Signal-PDU: Fix performance degradation on config switch
By adding signal aggregation the time to change profiles changed
dramatically. This is due to unregistering header fields being a very
slow operation and for aggregation each signal line did not lead to 2
but to 5 hfs.

Unregistering header fields for 150k signal example config (debug build):
- 3.6: 	 50s
- 3.7: 	592s (9:52!!!)

This patch brings the time back to 50s, if no aggregation is configured.
2022-06-23 19:24:17 +00:00
João Valverde d7322e757e epan: Use host byte order with AT_NUMERIC
Use host byte-order with AT_NUMERIC to make it more generic
and practical.

Change openSAFETY to pass addresses in host byte-order (the
previous code assumed they were in little-endian).

Plus a few cleanups.
2022-06-23 16:58:07 +01:00
Roland Knall 0079058837 openSAFETY: Define broadcast address globaly 2022-06-23 16:34:07 +02:00
Joerg Mayer 342af4727d Cisco Mis-Cabling Protocol: Support strict mode PDUs
Content of the new Type is still to be determined.
Also hack around an unsolved "mystery".
2022-06-23 12:09:10 +02:00
Pau Espin 4c22ff6bdb GTP: Several fixes and improvements to QoS IE GBR & MBR fields
The previous output was missing some fields under some conditions, and
some output text was wrong. This ended up in big confusion when looking
at the fields. Let's add the missing fields, fix the existing ones and
provide better formatting of the strings to understand which exact field
provides the info.
2022-06-21 18:35:30 +00:00
João Valverde 47348ae598 dfilter: Add support for literal strings with null bytes
Before:
    Filter: frame matches "abc\x00def"
    dftest: \x00 (NUL byte) cannot be used with a regular string.
    	frame matches "abc\x00def"
    	                  ^~~~
    Filter: _ws.ftypes.string == "a string with a \0 byte"
    dftest: \0 (NUL byte) cannot be used with a regular string.
    	_ws.ftypes.string == "a string with a \0 byte"
    	                                      ^~

After:
    Filter: frame matches "abc\x00def"

    Syntax tree:
     0 TEST_MATCHES:
       1 FIELD(frame)
       1 PCRE(abc\0def)

    Instructions:
    00000 READ_TREE		frame -> reg#0
    00001 IF_FALSE_GOTO	3
    00002 ANY_MATCHES	reg#0 matches abc\0def
    00003 RETURN

    Filter: _ws.ftypes.string == "a string with a \0 byte"

    Syntax tree:
     0 TEST_ANY_EQ:
       1 FIELD(_ws.ftypes.string)
       1 FVALUE("a string with a \0 byte" <FT_STRING>)

    Instructions:
    00000 READ_TREE		_ws.ftypes.string -> reg#0
    00001 IF_FALSE_GOTO	3
    00002 ANY_EQ		reg#0 == "a string with a \0 byte" <FT_STRING>
    00003 RETURN

Fixes issue #16156.
2022-06-21 15:10:08 +00:00
João Valverde 0615ba6317 ftypes: Make accessor functions type safe 2022-06-20 17:29:57 +00:00
Andoni Diaz de Cerio 0cadfff04a MCPTT: Fix dissection of FC Reject Phase field
ETSI TS 24.380 section 8.2.3.4 specifies that:
"The <Reject Phrase> value is a text string encoded the text string
in the SDES item CNAME as specified in IETF RFC 3550."

This does not mean that SDES tipe and length files are necessary,
only applies in the enconding of the text string.
2022-06-20 15:24:00 +00:00
Martin Mathieson 17f5e15fcc DCT2000: call dissectors for R16 RRC 2022-06-20 11:16:18 +00:00
Orgad Shaneh 0bc756c2c0 TPNCP: Simplify size tracking
This also fixes a crash when tpncp.dat is missing the events part.
2022-06-19 17:26:40 +00:00
Gerald Combs 058fe0dd09 [Automatic update for 2022-06-19]
Update manuf, services enterprise numbers, translations, and other items.
2022-06-19 16:40:16 +00:00
John Thacker 41cd2fed9c BSSGP: Correct BBSGP -> BSSGP in a few places 2022-06-17 22:03:49 -04:00
John Thacker 9319394af1 MEGACO: Reset bracket counters after a Topology Descriptor
After parsing a Topology Descriptor at the start of a request
or reply command, reset the left and right bracket counters
before going back to the top of the loop to parse the next
command, just like how done at the end of the while loop with
a normal command.

Prevents marking as malformed packets which have a Topology Descriptor
followed by a single command (e.g. Move) without any trailing
descriptors, and hence no more left brackets.
2022-06-17 12:52:13 +00:00
Roland Knall 972a7950f2 openSAFETY: Adding conversation handler code 2022-06-17 13:23:52 +02:00
Pascal Quantin 1bd24bb95d RTCP: ensure that at least two bytes are captured for heuristic checks
Fixes #18136
2022-06-16 03:28:31 +00:00
Dr. Lars Völker a159fe125e SIGNAL-PDU: Fixing memory leak in Signal List UAT 2022-06-16 02:59:10 +00:00
Gtker 60efc1a1c0 woww: Change SMSG_AUTH_RESPONSE result field size from 4 to 1
I somehow mistook the size of this field for a u32 instead of a u8
earlier.

vmangos clearly shows that it's a u8:
cd896d4371/src/game/World.cpp (L322)

and cmangos:
98a53ea30d/src/game/Server/WorldSession.cpp (L947)
2022-06-16 02:42:52 +00:00
Jeremy McCormick 9b08b02d8e a615a: don't parse exception timer if A1
Trying to parse LUS and LNS files if the protocol version
was "A1" led to them being marked as a malformed packets.
THis is because protocol version A1 LUS and LNS files do
not have the exception timer field. So to fix it, we check if
the protocol version is not A1, and only if it isn't do we try to
parse the exception timer field.
2022-06-16 02:29:37 +00:00
Gerald Combs 572e6b0c10 Docs: Add some protocols to the release notes. 2022-06-15 11:49:40 -07:00
Adrian Granados a664d29978 ieee80211: Update reason codes as in IEEE Std 802.11-2020 and 802.11ax-2021 2022-06-15 07:06:35 +00:00
Chuck Craft 208cf56b75 ip: ip.flags field are 3 high bits not full byte
See https://ask.wireshark.org/question/27546/0x01-flag-on-last-of-fragmented-packets/
2022-06-14 20:28:17 +00:00
John Thacker f1cbc6b662 epan: Remove fragment_get_reassembled()
Because completed reassemblies are hashed in the reassembled_table for
all the frame numbers that contributed fragments,
fragment_get_reassembled_id() works wherever fragment_get_reassembled()
does, and also works where the fragment id is not the frame number.

However, since the reassembled_table hash key only depends on the
fragment id and the frame number, it only allows a frame to have
one reassembly with a given fragment id. Some protocols can have
more than one reassembly with a given fragment id (that differ on
addresses or other keys), such as GSM SMS, and the wrong reassembly
is retrieved on the second pass in those cases.

For this reason, we might want to add additional key elements to
reassembled_table, such as layer number. fragment_get_reassembled_id
already takes packet_info as a parameter and can accommodate that
without further changes, but fragment_get_reassembled cannot, so
remove the latter in favor of the former.
2022-06-14 00:59:34 +00:00
John Thacker 47c418d419 tftp: Handle TFTP servers that don't switch ports
If we get into the dissect_tftp call, we must have either matched
a WRQ/RRQ at some point and created a wildcarded UDP conversation,
or we matched the TFTP port. While it is contrary to the spirit
of RFC 1350 for the server not to switch ports, it basically works
and the port is IANA assigned, so it doesn't do harm to process these.
In the heuristic dissector, of course, we don't do this.

The conversation code doesn't automatically fill in wildcarded
ports for UDP (since it's connectionless), and the wildcarded
find_conversation call in the TFTP dissector was twisted around
so it didn't actually fill in the second port before anyway.
Filling in the server port would make sense, but then the necessary
logic to find the right conversations would be more complicated.
(The default find_conversation logic prefers any conversation with
both ports to a wildcarded conversation, but the TFTP dissector would
then want the most recent conversation, whether wildcarded or with
both ports.)

These packets were handled prior to the 3.6 changes. Fix #18122
2022-06-14 00:36:27 +00:00
Andoni Diaz de Cerio 1ec1422318 MCPTT: Fix dissection of Track Info field
Unlike most of the FC fields, Track info participant type string file
padding is not considered in the dissector. This causes that all the FC
message dissection fails the string contains padding.

According to ETSI TS 24.380 Section 8.2.3.13:
If the length of the <Participant Type> value is not a multiple
of 4 bytes, the <Participant Type> value is padded to a
multiple of 4 bytes. The value of the padding bytes is set to zero.
The padding bytes are ignored by the receiver.
2022-06-13 19:08:07 +00:00
John Thacker 16af26dcc2 gsm_sms: Display reassembled unpacked 7-bit GSM SM with that encoding
Use the proper encoding instead of ENC_ASCII when displaying the
individual parts of a reassembled unpacked 7-bit GSM alphabet
SM, just as when displaying each fragment.
2022-06-13 12:50:41 +00:00
John Thacker 1301c033b4 SMPP: Handle decoding packed 7-bit GSM with UDH correctly
SMPP only has the number of octets of the message payload, but
with packed 7-bit GSM with a UDH, there are fill bits after the
UDH before the message (to align the message start with a septet
boundary), and we need to calculate the number of septets.
2022-06-13 12:27:36 +00:00
John Thacker 01f9dcbb7b tftp: Fix spelling 2022-06-12 14:37:40 +00:00
John Thacker 4277d24fa1 smpp: Handle TLV and UDH parameters for text and subdissection
Handle UDH-like information (ports and fragmentation info) that is sent
in TLVs instead of in a UDH, passing to to the gsm_sms_ud dissector.
Allow message_payload TLV to substitute for short_message when allowed.
Warn with expert info when both fields are present.
Skip over a UDH, if present, when converting the short message to text
using the encoding.
Fix #2161.

Use protocol data to reduce the amount of parameters passed back and
forth.

replace_sm can have a TLV (message_payload) (at least in 5.0), so
check for that.
2022-06-12 14:19:19 +00:00
DarienSpencer65 58ee7bf6ee AT: Implement CMGL command (binary mode) 2022-06-12 09:29:33 +00:00
Triton Circonflexe 1e8beaa245 Add support for UUID type in Thrift
Closes #18125
2022-06-12 08:56:25 +00:00
John Thacker 1d09a9a4fb gsm_sms: Don't let header be included twice 2022-06-11 09:31:50 -04:00
John Thacker 6df11bde44 gsm_sms_ud: Use the UDH function from the GSM SMS dissector
The UDH parsing in the gsm_sms dissector is much more complete
than the one in gsm_sms_ud, so use that one and get rid of the
redundant fields. Add in the option to pass in the UDH field
data to the dissector instead, since there is an option to transmit
the ports and fragment information as TLVs in SMPP.
2022-06-10 23:01:38 -04:00
Dylan Ulis c758e9d9c0 LLDP: Add CIP TLVs 2022-06-11 00:18:11 +00:00
John Thacker fa1d908f9e gsm_sms: Use character_set enum when decoding DCS and TP-UD
Rather than using three mutually exclusive booleans for the
encoding, use the existing enum, adding entries to distinguish
UCS2 from 8 bit binary and to support GSM 7-bit unpacked in a
more natural way.
2022-06-10 12:58:31 +00:00
Roland Knall 0640b711ea tap: Mark filtered packets instead of dropping them
Allows packets to be filtered but marked and not removed from the
tap listing. Additionally a total is calculated for all rx/tx frames
and bytes
2022-06-10 09:17:52 +02:00
Roland Knall 2cf938cfa8 tap: Adding flags for tap_packet
This allows flags to be passed by the registering listener
to the collection of information
2022-06-10 05:46:15 +00:00
John Thacker 8b1d140c49 smpp: Decode message_payload field as text
Decode the message_payload field using the data_coding value sent
when it is present instead of the short_message field. Fix #15900.
2022-06-10 00:44:04 +00:00
John Thacker 5a2bd62cd3 gsm_sms: Add Language IEIs
Update the list of possible UDH IEs. Include some rudimentary decoding
of the Language Shift IEs, though actually implementing the different
encodings is an entirely different beast.
2022-06-09 12:17:48 +00:00
John Thacker a530d45c20 SMPP: Fix DCS decoding
The DCS in SMPP has many reserved values, and only can take a few
possiblities from the GSM DCS (and cannot be interpreted as Cell
Broadcast DCS.) Remove unused DCS fields and add others that are
missing.

Determine the proper text encoding for the values from 3GPP TS 23.038
DCS with the high two bits set.

Add support for EUC-KR. Add a preference for GSM 7-bit alphabet packed
versus unpacked for the DCS values that unambiguously indicate the
7 bit alphabet (unlike DCS 0).
2022-06-09 02:53:49 +00:00
John Thacker 7394527038 roon_discovery: Include stdlib.h
Looks like the Windows build needs to include stdlib.h in order to
get bsearch()
2022-06-08 22:25:11 -04:00
Aaron Turner b89a195b4c Add Roon Discovery dissector
Add support for Roon/roonlabs.com discovery running
on UDP/9003.
2022-06-08 20:02:00 +00:00
Dr. Lars Völker 0b48a284b6 SOME/IP-SD: Make option parsing a bit more robust
If the SOME/IP-SD message is broken, it could have happend that the
parsing stopped on the option and did not go back to the entry parsing.
This patch makes this code more robust.
2022-06-08 19:18:02 +00:00
Stig Bjørlykke 604cb2a7a3 t38: Use correct conversation_new() options
Fix conversation_new() options after they was changed/improved
in commit 709593ee.
2022-06-07 22:09:28 +00:00
Stig Bjørlykke 86fdbe2ea9 fcels: Use correct find_conversation() options
Fix find_conversation() options after they was changed/improved
in commit 709593ee.
2022-06-07 17:25:36 +00:00
Stig Bjørlykke c5739dcded umts_fp: Use correct find_conversation() and conversation_new() options
Fix find_conversation() and conversation_new() options after they
was changed/improved in commit 709593ee.
2022-06-07 17:09:21 +00:00
Stig Bjørlykke e329582f1d rtp: Use correct find_conversation() options
Fix find_conversation() options after they was changed/improved
in commit 709593ee.
2022-06-07 16:52:25 +00:00
Stig Bjørlykke ad7905e8da coap: Use correct conversation_new() options
Fix conversation_new() options after they was changed/improved
in commit 709593ee.
2022-06-07 16:35:58 +00:00
Stig Bjørlykke 4829f8c04e jxta: Use correct conversation_new() options
Fix conversation_new() options after they was changed/improved
in commit 709593ee.
2022-06-07 17:29:38 +02:00
Martin Mathieson 0b6bb6949e DCT2000: Fix format of string with PDCP-NR keys 2022-06-06 17:58:07 +01:00
Gerald Combs 729b4d3b69 [Automatic update for 2022-06-05]
Update manuf, services enterprise numbers, translations, and other items.
2022-06-05 16:40:02 +00:00
Stig Bjørlykke b05678b40e nvme: Fix uint32 to pointer conversion
Use GUINT_TO_POINTER to convert guint32 to pointer, and
GPOINTER_TO_UINT to convert pointer to guint32.
2022-06-05 14:10:36 +00:00
Darien Spencer 8fd9d1d274 AT: Implementing a session context
Some AT commands and responses need context to be parsed correctly.
For example AT+CGMI's and AT+CGSN's responses are arbitrary strings
without "AT+" or "+" prefix (So saving the command is needed).
Another use case is when a command/response is followed by its data in
the following line, like AT+CGML (SMS content's listed in the line after
the "+CGML" line).

The implementation utilizes the USB conversation of the session to
pass information between packets.
Every new packets takes a 'snapshot' of the data stored in the conversation
before starting to parse and re-uses it when parsing & re-parsing of
that packet occurs.
2022-06-03 21:49:48 +00:00
Stefan Metzmacher 9ec5208873 IWARP_DDP_RDMAP: reassemble fragmented iWarp RDMA Send messages
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2022-06-02 18:20:08 +00:00
Stefan Metzmacher b18646baca IWARP_DDP_RDMAP: make use of wmem_new(wmem_packet_scope(), rdmap_request_t)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2022-06-02 18:20:08 +00:00
Dylan Ulis 3aae474c49 CIP: Minor updates
1. Improve code documentation
2. Expose common variables,functions to let other dissectors to use them
2022-06-02 17:43:24 +00:00
Gerald Combs e8dc20899f epan: Remove conversation_create_endpoint options.
The "options" paramameter was never used, so remove it.
2022-05-29 18:00:09 -07:00
Gerald Combs 48ff21b573 [Automatic update for 2022-05-29]
Update manuf, services enterprise numbers, translations, and other items.
2022-05-29 17:20:25 +00:00
John Thacker 6fd1c08a3a TCP: Don't add [TCP segment of a reassembled PDU] to the second PDU
When desegmenting, don't add [TCP segment of a reassembled PDU] to
the INFO column if we've already dissected a complete PDU in this
frame. This is for the same reasons that we set a fence in the INFO
column and set the PROTOCOL column to be not writable. It's not
of particular interest that this frame also contains the start of
a new PDU when the INFO column has information about a complete
higher level PDU. The information about the other PDU is contained
in the tcp tree elements.

Fix #15494
2022-05-29 11:42:17 -04:00
John Thacker ec12d0c530 TCP: Report reassembled in for more PDUs where we know it
In the case where the beginning of a TCP segment does not continue
a higher-level PDU, but the end of the segment is the beginning of
another PDU, we don't need to create the MSP for the second PDU
after the first time we visit the packet. However, we do want to
retrieve that MSP for determining in which frame the second PDU
was reassembled.

Make "Reassembled PDU in frame:" messages be added in that case
like it already is for other frames with MSPs.
2022-05-29 10:59:55 -04:00
John Thacker 717e4c47ee TCP: reset addresses and ports after each segment
TCP can contain multiple PDUs of the next layer protocol, and the
subdissector (or further subdissectors called from it) can change
the addresses and ports. However, the addresses and ports are used
for the desegmentation tables at the TCP level, as well as for
various purposes in encapsulated protocols.

Restore the addresses and ports values of packet_info before each PDU,
and in desegment_tcp after returning from a subdissector. When leaving
desegment_tcp ensure that the addresses and ports are set to whatever
they were after the last subdissector call that successfully
desegmented a PDU.

Fix #2345. Fix #9782.
2022-05-28 20:41:52 -04:00
John Thacker 95ba1151df TCP: Handle additional data requested with ooo reassembly
The test for "old_len" with a reassembled MSP has never been accurate
for out of order reassembly, where it caused additional data requested
to be taken from the end of the current frame instead of from the
correct portion of the reassembled MSP, which could be from an
out of order frame (later in sequence, but arrived earlier.)

The test is unnecessary - the other case, where we need more data
but there's more in the current frame is already handled by looping again.

This fixes reassembly where TCP is out of order and those out of order
segments don't align on PDU boundaries. Fix #13317.

Also fix a minor issue in the same situation where the length of the
current segment was indicated incorrectly for out of order frames
contributing to multiple MSPs.
2022-05-28 21:40:19 +00:00
Martin Mathieson 17322b0cc2 Make a couple of functions static. 2022-05-28 20:35:58 +01:00
Dana Sy cba61d08f8 Zigbee: Touchlink typo
Fixed typo for Touchlink command filter name
2022-05-28 09:09:43 +00:00
Dana Sy 7df725a119 Zigbee: Touchlink missing info field
Added in the profile interop bit for the Touhlink information field.
2022-05-28 09:09:43 +00:00
Uli Heilmeier 083c6828f5 EOBI: Disable dissector by default
The EOBI dissector has no heuristic and is using several nonstandardized
high ports. Therefore disabling it by default.

Fixes #18103
2022-05-27 19:04:59 +00:00
Uli Heilmeier 9fa0d711f6 O-RAN: Fix offset extension 10 and beam vector list
Increment offset and use numPortc for number of beam vector list items

Fixes: #18116
2022-05-27 18:47:49 +00:00
John Thacker 7ab343e7d6 tcp: Split MSPs in out of order processing
When processing segments out of order in TCP, it is possible to
get new segments that fill a sequence gap and be able to dissect
at least one PDU but need more data for additional PDUs (that have
data from the contiguous stream bytes.) We can only determine this
after passing the reassembled segments to the subdissector first.

To keep dissection and layer numbers consistent between passes,
split the multisegment PDU, keeping the already dissect PDU(s) in
the current reassembly and creating a new MSP for the parts not yet
dissected.

Update the dissection test to enable the currently skipped test that
require MSP splitting and remove test_tcp_out_of_order_twopass_with_bug
2022-05-26 00:49:16 +00:00
Tomasz Moń 1a60de0b76
USB: Sanitize USB 2.0 endpoint max packet size
Introduce Wireshark specific enum to facilitate USB speed specific
dissection. Any similarity of actual enum values with any protocol
is coincidence and should not be relied upon.

Rename speed defines in USBIP dissector to not collide with Wireshark
USB speed enum. The values used in USBIP are implementation specific.

Allow user to set capture speed in USBLL dissector preferences. Use the
selected speed in USB dissector to sanitize endpoint maximum packet size
value based on speed specfic requirements from USB 2.0 specification.

Close #18062
2022-05-25 20:26:24 +02:00
Joakim Karlsson 7a59f8a22c gprscdr: Update to 3GPP TS 32.298 V17.2.0
Only documentation changes, no new c file is generated
2022-05-25 13:56:21 +02:00
Martin Mathieson 0188c9a1da ORAN FH-CUS: Section type 5 has ef field. 2022-05-25 07:19:53 +00:00
Gerald Combs 865feb2bf8 epan: Switch some _by_id conversation routines to elements.
Switch the non-endpoint *_by_id conversation routines to use element
lists. Change the ID type from guint32 to guint64. None of them used the
address+port option flag arguments, so remove them.
2022-05-24 17:18:21 +00:00
Martin Mathieson f3db612fa1 PDCP-NR: Fix a test (flagged by coverity) 2022-05-24 16:59:29 +01:00
Anders Broman 8be21c7867 SIP: Add a filter for VIA parameter be-route 2022-05-24 14:41:42 +00:00
Anders Broman e6c4557c0b SIP: Handle short frame in dissect_sip_sec_mechanism() 2022-05-24 13:10:01 +02:00
Martin Mathieson 20b311e7a9 PDCP-NR: Add separate UL/DL expert info ei items for missing SNs 2022-05-24 08:07:10 +00:00
Dr. Lars Völker 96cf14ea01 TECMP: Renaming to Device and Interface for TECMP 1.7
The new TECMP release renames as follows:
- Capture Module -> Device
- Channel -> Interface

Header fields (incl. filters) and Config UATs are affected.
2022-05-23 17:07:03 +00:00
Martin Mathieson 87d0c6f492 Some check_typed_item_calls.py warning fixes. 2022-05-22 21:48:54 +00:00
Gerald Combs c8fc8de3d4 [Automatic update for 2022-05-22]
Update manuf, services enterprise numbers, translations, and other items.

services failed.
2022-05-22 16:37:34 +00:00
Dr. Lars Völker bc57219e46 TECMP: Update to TECMP 1.7 specification
This patch updates the TECMP dissector with 1.6 and 1.7 changes.

Changes:
- Multiple new flags for CAN, CAN-FD, FlexRay, LIN, Analog, etc.
- Reordering of flags
- Additional data units for Analog
- New Header CRC and Frame CRC for FlexRay (1.6 change)
- New CRCs for CAN and CAN-FD (1.6 change)
- Deprecated the removed Analog Threshold Undershot/Exceeded flags,
  since they were removed

This patch does not include the renaming to Device and Interface.
2022-05-22 08:54:02 +00:00
Alexis La Goutte bc7c41c820 smc: fix clang analyzer warning (Dead.Store)
packet-smc.c:722:4: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
packet-smc.c:887:4: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
2022-05-22 08:40:44 +00:00
Alexis La Goutte f6dda3c116 couchbase: fix clang analyzer warning (Dead.Store)
packet-couchbase.c:2685:17: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
2022-05-22 08:40:44 +00:00
Alexis La Goutte 406f5263c3 catapult-dct200: fix clang analyer warning (Dead.Store)
packet-catapult-dct2000.c:1099:13: warning: Value stored to 'tag' is never read [deadcode.DeadStores]
packet-catapult-dct2000.c:1100:13: warning: Value stored to 'len' is never read [deadcode.DeadStores]
packet-catapult-dct2000.c:3076:21: warning: Value stored to 'sub_dissector_result' is never read [deadcode.DeadStores]
2022-05-22 08:40:44 +00:00
Martin Mathieson aad47c8438 RLC-NR: When have NACK Range, clearly show which SNs were lost 2022-05-20 16:17:04 +01:00
Brian Sipos e47ab95e46 BPv7 and TCPCL: Update references to published RFCs 2022-05-19 20:15:59 -04:00
lindnerp 7079d881fa Update bpv7 and bpsec dissectors to resolve ticket 17727 2022-05-18 12:48:41 -04:00
easonweii 148f5905af SDP: Minor Refactoring by Extract Method
Extract Method for multiple message of SDP Media Attribute to simplify things and Make processes clearer.
dissect_sdp_media_attribute_rtpmap
dissect_sdp_media_attribute_fmtp
dissect_sdp_media_attribute_path
dissect_sdp_media_attribute_h248_item
dissect_sdp_media_attribute_crypto
The original function remain unchanged.
2022-05-18 08:29:37 +00:00
Jason Cohen 44433d3c9c f5ethtrailer: Decode TLS 1.3 trailer info on some versions 2022-05-18 08:28:57 +00:00
Nardi Ivan fc89ddcdcf ISUP: avoid parameter summary text duplication
Parameter name should be appended only once to the tree, when handling
national extensions.

Close #18094
2022-05-17 07:57:27 +00:00
Gerald Combs d5f99ef126 [Automatic update for 2022-05-15]
Update manuf, services enterprise numbers, translations, and other items.
2022-05-15 16:59:34 +00:00
Gerald Combs 8020aea27a epan: Fix our conversation flags
Make sure we pass NO_ADDR2 and NO_PORT2 to conversation_new and
NO_ADDR_B and NO_PORT_B to find_conversation.
2022-05-15 16:36:43 +00:00
Gerald Combs 909280ce82 MySQL: Initialize a variable.
Fix

*** CID 1504408:  Uninitialized variables  (UNINIT)
/builds/wireshark/wireshark/epan/dissectors/packet-mysql.c: 2683 in mysql_dissect_ok_packet()
2677     				}
2678     			}
2679     		}
2680     	} else {
2681     		/* optional: message string */
2682     		if (tvb_reported_length_remaining(tvb, offset) > 0) {
>>>     CID 1504408:  Uninitialized variables  (UNINIT)
>>>     Using uninitialized value "lenstr".
2683     			if(lenstr > (guint64)tvb_reported_length_remaining(tvb, offset))
2684     				lenstr = tvb_reported_length_remaining(tvb, offset);
2685     			proto_tree_add_item(tree, hf_mysql_message, tvb, offset, (gint)lenstr, ENC_ASCII);
2686     			offset += (int)lenstr;
2687     		}
2688     	}
2022-05-12 17:05:56 +00:00
Jaap Keuter 8c9480214b Remove execute flag on source files 2022-05-12 13:41:47 +02:00
Jérôme HAMM aa8b2b9f1c ssh: fixing warnings. 2022-05-12 09:43:57 +00:00
Jérôme HAMM 3e81d98499 ssh: fixing MAC IV derivation. 2022-05-12 09:43:57 +00:00
Jérôme HAMM a036c4dd09 ssh: switching consistently from g_debug to ws_debug 2022-05-12 09:43:57 +00:00
Jérôme HAMM 797486fa18 ssh: Diffie-Hellman
diffie-hellman-group1-sha1
diffie-hellman-group14-sha1
diffie-hellman-group14-sha256
diffie-hellman-group16-sha512
diffie-hellman-group18-sha512
2022-05-12 09:43:57 +00:00
Jérôme HAMM 967107fb8e ssh: Diffie-Hellman group exchange. 2022-05-12 09:43:57 +00:00
Jérôme HAMM 51087141c8 ssh: aes-ctr 2022-05-12 09:43:57 +00:00
Jérôme HAMM e1ca35c7a6 ssh: aes-cbc 2022-05-12 09:43:57 +00:00
Jérôme HAMM f3c61d7638 ssh: aes-gcm 2022-05-12 09:43:57 +00:00
Min Wang 4e41383aad MySQL: fix bug for mysql response message length. 2022-05-12 15:55:43 +08:00
Min Wang f265c5869b MySQL: fix bug for mysql response message length. 2022-05-12 15:29:38 +08:00
Min Wang dab59caf38 MySQL: fix bug for mysql response message length. 2022-05-12 14:06:09 +08:00
easonweii eedf82cd97 SIP: Refactoring too many if-else branches by table-driven method
When there are a lot of if-else branch judgments, the table-driven method can be used to optimize to facilitate subsequent maintenance.
The original function remain unchanged.
2022-05-11 16:42:40 +00:00
John Thacker c4f6914aa6 DVB-S2: Only add the rolloff value once
DVB-S2X has two possible meanings of the rolloff factor, with
different value strings. Only add the correct one as part of the bitmask,
instead of always adding it twice, once with the low value string and once
with the appropriate value string.
2022-05-10 22:11:06 -04:00
Piotr Winiarczyk d5a0d390e8 btmesh: More information displayed
In some cases the available information on packets were not displayed.
This change displays this information. Some code formatting and
variable renaming was also done.
2022-05-09 18:44:23 +00:00
Alexander Clouter fdf55aaa51 eap: support tunneled TLS decoding
Using a similar strategy to ce087027ef we
group conversation and pdata use by the layer depth we are decoding.

This now decodes EAP-TLS within TEAP (and should work for TTLS and PEAP)
2022-05-09 18:28:27 +00:00
Yu Gao 6739d0397b Fix the pfm-sd default case 2022-05-08 18:02:38 -04:00
Alexander Clouter 6b4b9f614b EAP: fix stride when decoding TEAP TLVs and tree alignment 2022-05-08 18:58:07 +00:00
Gerald Combs c69045c04f [Automatic update for 2022-05-08]
Update manuf, services enterprise numbers, translations, and other items.
2022-05-08 16:40:00 +00:00
Guy Harris 8f1cf0176c USBLL: create the top-level item using the regitered protocol. 2022-05-07 18:50:44 -07:00
Odysseus Yang 8f4d38b776 MBIM: Fix the offset to RSRP and SNR buffer of MBIM_SIGNAL_STATE_INFO_V2 2022-05-06 17:53:24 +00:00
Pascal Quantin d9ec48a759 NAS 5GS: add a UDP framing format
Similar to what was done for NAS EPS in 51165cf
2022-05-06 16:05:22 +02:00
Dr. Lars Völker 0f5025eae4 SOME/IP: Adding string fields for easier filtering 2022-05-05 05:48:35 +00:00
Martin Mathieson 000e4ec75e PDCP-LTE: Allow updated keys to be found by frame number 2022-05-03 22:02:23 +00:00
Dylan Ulis 7261eb0f09 CIP Safety: Fix SERCOS III attributes 2022-05-03 20:30:55 +00:00
Dylan Ulis a14e35a440 CIP Safety: Detect Cancel Propose/Apply TUNID 2022-05-03 20:13:55 +00:00
Karsten Graul 0ab1cbdb40 SMC: show translated MTU and buffer size
Additionally append the translated/uncompressed MTU and
buffer size.

Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
2022-05-03 19:12:18 +00:00
Karsten Graul 341e625249 SMC: support for SMC-Rv2 LLC messages
Add the support for SMC-Rv2 Link Level Control (LLC) messages which
flow over Infiniband.

Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
2022-05-03 19:12:18 +00:00
Karsten Graul 7c70af016f SMC: improve SMC-Rv2 CLC message support
More fine tuning of the SMC-Rv2 support, and add the support to show
the GID list in a CLC proposal message.

Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
2022-05-03 19:12:18 +00:00
Guvenc Gulce b66b07a786 SMC: Add support for SMCRv2
Add SMCRv2 clc proposal/accept/confirm and decline support.
Proposal and decline parsing routines are used by SMC-R(v2) and SMC-D(v2).

Enhance the existing SMC protocol dissector in such
a generic way that it supports both SMC-R(v2) and SMC-D(v2)
protocols. These two protocols are similar to each other.
SMC-D and SMC-R has a version 1 and version 2.

Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com>
2022-05-03 19:12:18 +00:00
Dylan Ulis edfef021e7 CIP Safety: Increase error detection diagnostics to PI_ERROR 2022-05-03 15:06:50 +00:00
Alexander Clouter e75f6800ca EAP: fix packet leak caused by ce087027ef
Caught and flagged in https://gitlab.com/wireshark/wireshark/-/merge_requests/6838#note_932484809
2022-05-02 17:12:24 +01:00
Gerald Combs 2f31c09045 [Automatic update for 2022-05-01]
Update manuf, services enterprise numbers, translations, and other items.
2022-05-01 17:26:48 +00:00
Martin Mathieson 7fbfea9d68 IEEE80211: Fix a couple of filters 2022-04-30 21:56:21 +00:00
Alexander Clouter ce087027ef EAP: massage pinfo for EAPOL so the TLS decoder does not get lost 2022-04-30 13:30:20 +00:00
Alexander Clouter 6843ca2463 EAP: decode TEAP Outer-TLVs 2022-04-30 13:30:20 +00:00
Alexander Clouter 914d8bc756 EAP: add PEAP decoder
The existing PEAP support does not decode the inner attributes, this
commit adds that support by introducing packet-peap.c which recreates
a 'pseudo' EAP header before looping the TVB back into the EAP dissector.
2022-04-30 13:30:20 +00:00
Alexander Clouter 49c730cc23 EAP: use enum for pdata instead of magic numbers
Later for packet-peap.c, need to use pdata to pick into the parent
dissector so here we set up packet-eap.c to use enum.
2022-04-30 13:30:20 +00:00
Alexander Clouter b9681002c5 EAP: add MSAUTH-TLV decoder 2022-04-30 13:30:20 +00:00
Alexander Clouter f694e70771 EAP: improve EAP-TLS flag decoding
Decode TEAP's O-flag.

We also update the diagram and references as PEAPv0 has a different view
of how the flags are used compared to the RFCs and drafts.
2022-04-30 13:30:20 +00:00
Joakim Karlsson b244db8f3c pfcp: Update to 3GPP TS 29.244 V17.4.0 2022-04-29 11:29:19 +00:00
Dylan Ulis 482794ff2e CIP Safety: Fix TBD bytes expert info 2022-04-29 11:28:01 +00:00
Jonas Falkevik 7284ee091f Diameter: Decode GMLC-Number AVP
Add decoding of the GMLC-Number AVP.
3GPP TS 29.272 GMLC-Number
Encoded as a TBCD-string.
2022-04-27 09:15:45 +00:00
Jonas Falkevik bfdb4c558e epan: refactor dissector E.164 MSISDN number name
Prepare for adding reusing code where only descriptive name differs.
But the numbers are encoded using the same rules.
"E.164 number (MSISDN)" & "E.164 number (ISDN)" for example.
2022-04-27 09:15:45 +00:00
Joakim Karlsson c2444370f4 GTP': correction of Release Identifier Extension 2022-04-26 19:40:28 +00:00
easonweii b72b4cf512 LLDP: Fix malformed packets when EndOfLLDPDU TLV missing
The End of LLDPDU TLV is optional, should not as malformed even if missing.
Resolve it by checking whether the total length of each TLV reaches the total length of TVB.
Close #18029
2022-04-26 19:27:15 +00:00
Joakim Karlsson 74fd19fb10 NAS-5GS: correction of Configuration update command, IE 5GS registration result 2022-04-26 13:54:48 +00:00
Pedro Jose Marron 095043f74b Update Wi-SUN FAN dissector to the last version of the specification
- The latest version of the Wi-SUN FAN specification has added
  a number of Information Elements that need to be supported by
  the dissector.
- Following changes and additions have been included:
  - New Header IEs: LUTT, LBT, NR, LUS, FLUS, LBS, LND, LTO, PANID
    and RT.
  - New Payload IEs: POM, LCP, LFNVER and LGTKHASH
  - New frame types: LFN PAN Advertisements, Solicits and time
    synchronization frame types.
  - Update to the channel spacing names to incorporate the new
    ones defined in FAN 1.1
2022-04-26 13:24:06 +02:00
Peter Wu 62100da7f4 TLS: fix RSA decryption with EMS and renegotiation
The handshake hash is used to derive TLS decryption keys when the
Extended Master Secret (EMS) extension is in use.
ssl_calculate_handshake_hash updates this hash only when the master
secret has not been determined yet.

During TLS renegotiation, there are two master secrets: one before, and
one after. Before this fix, the second calculated master secret is
wrong because the second Client Hello is missing in the handshake hash.
It was missing because the handshake hash was not being updated since
the master secret for the first handshake was still present, and the
decryption state was only reset after that hash update.

To fix this, make sure to clear the SSL_MASTER_SECRET flag before
updating the handshake hash when needed. Additionally, clear the
handshake hash when processing the Client Hello just to make sure that
any previous state is gone.

Fixes #18059
2022-04-25 12:03:32 +00:00
Alexis La Goutte 19dc602fe3 802.11: fix TWT Setup dissection
Duplicate Dialog Token field

Fix #18050
2022-04-24 20:48:04 +00:00
Gerald Combs cfcfbbdd60 [Automatic update for 2022-04-24]
Update manuf, services enterprise numbers, translations, and other items.
2022-04-24 16:39:41 +00:00
John Thacker 91987dc0ab nghttp2: Implement minimum required version 1.11.0
All currently supported Linux distributions have a version greater
than 1.11.0 (and our macOS and Windows versions are also much greater),
and this allows us to use nghttp2_hd_inflate_hd2(), which replaced the
deprecated nghttp2_hd_inflate_hd()
2022-04-24 10:24:11 -04:00
Dylan Ulis e5e78d5da9 CIP Safety: Update more naming/units to match spec 2022-04-24 09:04:12 +00:00
Ben Huddleston 71b3fe0f4b couchbase: Add timestamp to DcpSnapshotMarker encoding
Timestamp is an optional part of the DcpSnapshotMarker value.
2022-04-24 07:54:36 +00:00
Guy Harris 1ee8ead845 Provide the section number for blocks, and show it.
Add a "section number" field to wtap_rec, with a presence flag, and
provide the section number (0-based) for pcapng files.

Display it (1-based) if present.
2022-04-22 18:14:29 -07:00
Gerald Combs 7286e2982a Move the idl directory to epan/dissectors/corba-idl. 2022-04-22 20:36:57 +00:00
easonweii a1e0c34c30 GTP: Minor reconstruction
Extract Method for multiple message parsing for tpdus to simplify things for future bug fixes and to make the code logic clearer.
Encapsulate the following functions:
dissect_gtp_tpdu_by_handle
dissect_gtp_tpdu_as_pdcp_lte_info
dissect_gtp_tpsu_as_pdcp_nr_info
Note: The original code function is not changed.
2022-04-21 17:30:25 +00:00
Gerald Combs 51f5bdc287 FPP: Add null pointer checks.
Add a couple of null pointer checks. Followup to #18043.
2022-04-21 16:49:22 +00:00
Dario Lombardo f067e40166 fpp: check conversation pointer before use.
Fix: #18043.
2022-04-21 16:05:08 +00:00
Yu Gao 49ec7da90e fix pipeline issue 2022-04-21 15:20:34 +00:00
Dylan Ulis 2f41595382 CIP Safety: Fix CRC logic when timestamp rolls over to zero 2022-04-21 15:02:25 +00:00
John Thacker 45da161430 libgcrypt: Remove HAVE_GCRYPT_AEAD , _CHACHA20
Libgcrypt 1.8.0 is required now, so these are always defined.
2022-04-21 07:11:32 -04:00
John Thacker b80cdaa243 libgcrypt: Require version 1.8.0
Libgcrypt 1.8.x is required for a large amount of decryption
support and is the current LTS version of libgcrypt. The 1.6 and
1.7 series have been end-of-life since 2017-06-30 and 2019-06-30,
respectively.

The Linux distributions that have versions of libgcrypt before 1.8.0
are nearing or at end of support (RHEL7, SLES 12, Debian stretch,
Ubuntu 16.04LTS) and can be supported by the Wireshark 3.6 LTS release
series.

Remove an enormous amount of ifdefs based on libgcrypt versions
1.6.0, 1.7.0, and 1.8.0. There will be a second pass for the
commons defines HAVE_LIBGCRYPT_AEAD, HAVE_LIBGCRYPT_CHACHA20, and
HAVE_LIBGCRYPT_CHACHA20_POLY1305, which are now always defined.

The ISAKMP dissector has some comments noting that some workarounds
were used for libgcrypt 1.6 that aren't needed with 1.7; perhaps
that could be updated now.
2022-04-20 21:30:21 -04:00
Andoni Diaz de Cerio 373280bc65 MIKEY: Register the application/mikey MIME type 2022-04-20 08:30:13 +00:00
Vahap Emin Agaogullari b51c70ae11 LLDP: Profinet TSN TLV Dissection
Profinet TSN TLV Dissection implemented
2022-04-20 07:44:57 +00:00
Alexis La Goutte 26be00e320 ieee80211: Fix clang analyzer warning (Dead.Store)
also indent
2022-04-20 07:25:17 +00:00
Dario Lombardo 33dca395b1 aprs: NULL-terminate a string.
CID: 1495842
2022-04-19 20:45:24 +00:00
Dario Lombardo 6c3e4c7304 enip: init address on declaration.
CID: 1499496
2022-04-19 20:45:24 +00:00
Dario Lombardo 7cbb6e9a76 dissectors: init memory before use.
CID: 52571445-27
2022-04-19 20:45:24 +00:00
Alexis La Goutte e4c46563fb QUIC: Add IMMEDIATE_ACK from ACK Frequency Draft
https://datatracker.ietf.org/doc/html/draft-ietf-quic-ack-frequency#section-6
2022-04-19 18:45:43 +00:00
Alexis La Goutte 69637a731d QUIC: Update to last ACK Frequency draft(-01) 2022-04-19 18:45:42 +00:00
Martin Mathieson 58821b50b5 PDCP-NR: changes to make security keys work better 2022-04-19 15:13:51 +00:00
John Thacker 371b52120b ipp: Use proto_tree_get_parent
It's a little cleaner to use the API to do the same thing, in case
something changes internally.
2022-04-19 13:19:39 +00:00
Andoni Diaz de Cerio d2335dd414 XML: Adding new 3GPP Mission Critical XML media types
Some 3GPP MCS XML media types were not decoded correctly as XML
2022-04-19 12:52:47 +00:00
Pascal Quantin 43828765c3 NR RRC: upgrade dissector to v16.8.0 2022-04-19 12:39:03 +02:00
Pascal Quantin 58af12cac7 LTE RRC: upgrade dissector to v16.8.0 2022-04-19 09:22:58 +00:00
Pascal Quantin 5c7c723feb LPP: upgrade dissector to v16.8.0 2022-04-19 10:05:41 +02:00
Richard Sharpe 8889d8c78b ieee80211: Implement more KDEs from ieee802.11-2016 and on.
I have picked up more KDEs from ieee802.11-2016 and Draft P802.11REVmd_D5.0
and Draft P802.11be_D1.4.
2022-04-17 23:59:26 +00:00
Gerald Combs bce8825df8 [Automatic update for 2022-04-17]
Update manuf, services enterprise numbers, translations, and other items.
2022-04-17 16:37:54 +00:00
Ahmet Alperen Bulut d66c29ab07 IEEE1905: Fix CAC Termination Request's offset calculation
Fixes #18042
2022-04-17 08:49:59 +00:00
Andrii Vladyka f4c7bd9c75 DOCSIS: Fixed RNG-RSP Commanded Power Sub-TLVs dissection 2022-04-16 20:22:53 +00:00
Benedikt Heumüller 90c784bd97 fpp: Fix mCRC calculation
Conversations start at SMD-S and are continued with SMD-C frames
Added CRC information to proto_data of conversation for mCRC calculation
Continue checksum calculation for faulty fragments
Reassembly information added to info column
Reworked packet_direction
2022-04-16 18:46:05 +00:00
Arne Schwabe c2c20a6f2d Implement parsing of OpenVPN tls-crypt packets
This implements parsing the packets in tls-crypt mode. Parsing is very
limited since tls-crypt encrypts the packets. Since detecting tls-crypt
is not easy apart from two tls-crypt-v2 specific opcodes, it is preference
that needs explicitly set.
2022-04-16 13:40:15 +00:00
Dylan Ulis 88719f0884 CIP Safety: Minor Refactoring, Part 2 2022-04-16 06:57:13 +00:00
easonweii b4a15f8be3 BER: Add the length check of dissecting BER integers, int64, and booleans
Add the length check of dissecting BER integers, int64, and booleans, the expert info is added for bad lengths, includes the name of the field and actual length.
Related to #18005
2022-04-15 11:56:17 +00:00
Chuck Craft 98793186b9 CQL: format timestamp as microseconds (ENC_TIME_USECS)
Closes #18038
2022-04-14 19:08:55 +00:00
Gerald Combs b51a635bce BACapp: Fix a recusion check.
Make sure fAbstractSyntaxNType() always decrements its proto_depth on
exit. Fixes #18039.

Remove a no-longer-needed p_add_proto_data() call.
2022-04-14 18:16:42 +00:00
Dylan Ulis 943c38d606 CIP Safety: Minor Refactoring, Part 1 2022-04-13 20:48:41 +00:00
Dylan Ulis 3c25b69ff6 CIP: Correct DATE, DATE_AND_TIME type handling, Part 2 2022-04-13 20:22:29 +00:00
Dylan Ulis 234db3b48f CIP Safety: Display human readable timestamps 2022-04-13 20:04:40 +00:00
Pascal Quantin 50ada3d65c NGAP: workaround a gcc 10.2.1 compilation issue
Fixes #17858
2022-04-13 16:58:54 +02:00
John Thacker 01239eb59d whois: Assume UTF-8, add an expert info
Move the assumption for WHOIS responses to UTF-8 (which is backwards
compatible with ASCII), and add an expert info regarding that
assumption. There is no indication for encoding in the protocol.
Using Show Packet Bytes is sufficient for most purposes, but someone
could add a preference if desired.
2022-04-13 12:29:12 +00:00
Gerald Combs ca04f4c8cb Qt: Update our dynamic menu groups.
Add log-specific statistics groups, and use them to limit the dynamic
menu items in Wireshark and Logwolf.
2022-04-12 12:14:03 -07:00
John Thacker 4c7865c81b whois, finger: Dissect at FIN (or after) on first pass
The WHOIS and finger dissectors wait to dissect at FIN, but they
need to actually dissect at FIN (or at reassembled out of order
segments after FIN) on the first pass instead of returning without
dissecting.

Only add data reassembled at FIN to the tree if it was actually
reassembled at the FIN frame; if it was reassembled in the first pass
at a later frame due to out of order segments, it will be added there.

In addition to fixing first pass dissection, this also fixes the
case where the FIN segment is the first segment with data. Fix #18037.
2022-04-12 08:29:48 -04:00
Chuck Craft 3aee6ce9d6 ACN/rdmnet: add protocol check to TCP heuristic 2022-04-12 09:29:47 +00:00
Anders Broman 096947337e PER:Add function to add "PER encoded lable" to the tree. 2022-04-12 08:33:36 +02:00