Commit Graph

39962 Commits

Author SHA1 Message Date
Martin Mathieson 80ced3ccb5 ERF: ignore a non-contigous mask 2024-02-02 12:11:10 +00:00
Pau Espin ad5439e064 gsup: PDP Address IE: Update naming and improve dissecting
This IE has been recently renamed in GSUP protocol spec [1] and main
implementation (libosmocore) [2] from "PDP Type" to "PDP Address",
update it here too.
While at it, properly dissect the type_org, type_nr and address buffers.

[1] 602fabc6d5
[2] 74ee02420a
2024-02-02 07:26:51 +00:00
John Thacker 546d8763e9 GTPv2: Handle EPS Security Context long EAR data
Similar to the UMTS MM Context, when the Extended Access
Restriction Data length is greater than 1, handle the length
but indicate that we don't dissect it yet.

Also fix two of the UMTS MM Context expert infos being added to
the wrong tree.

Fix #19630
2024-02-02 07:20:33 +00:00
Stephen Donnelly 15c4bccee1 Updated to use new PI_RECEIVE and PI_INTERFACE extert Info categories 2024-02-02 07:18:00 +00:00
Stephen Donnelly 1e0e261b23 Separate ERF Expert Info fields
Separate out distinct expert info fields
Remove obsolete if(tree) tests
2024-02-02 07:18:00 +00:00
Stephen Donnelly 5e74e92934 ERF Interface Id Extension
Move common #defines to erf_record.h
Add macro for erf_interface_id_from_flags()
Fix duplicate proto fields
Replace int with gboolean
2024-02-02 07:18:00 +00:00
Stephen Donnelly adfa18fe50 Endace ERF Interface Id extension
The Endace ERF format has extended the 'Interface Id' from 2 bits (interface 0-3) to 3 bits (interface 0-7).
The Interface Id high order bit is not adjacent in the flags field.

Extend wtap handling for ERF records.
Extend epan dissection and display of ERF format.
The existing erf.flags.cap field is retained and extended to 0-7.
A new erf.flags.if_raw field is added for the unformatted value.

Note proto_tree_add_split_bits_item_ret_val() cannot be used here because it only supports input from the tvb and not from a non-tvb value.
2024-02-02 07:18:00 +00:00
Darius Davis 0db3d8e012 const-ify proto/handoff/tap registration data.
This moves 54 kBytes of data to a read-only data section.
2024-02-02 12:23:15 +10:00
Gerald Combs f3b0bf4a7e Sysdig event: Dissect parameters only when we have some 2024-02-01 12:42:39 -08:00
Martin Mathieson 3d49e841a6 check_dissector: check spelling of comments for chosen dissector 2024-02-01 16:44:57 +00:00
Sektor van Skijlen 7bbaba61c0 SRT: Added handling for more handshake extensions 2024-02-01 14:22:03 +00:00
John Thacker 132847b6a4 epan: Pass in a 64 bit integer to proto_tree_add_boolean functions
Some of the functions in proto.c when handling a FT_BOOLEAN field
allow it to be part of a 64 bit unsigned integer with a 64 bit
bitmask. Other functions do not. Some of the functions start out
allowing a 64 bit bitmask and then switch to casting the value to
a 32 bit unsigned integer (but others don't.) Consistently allow
a boolean to be extracted using a 64 bit bitmask by changing the
various proto_tree_add_boolean functions to allow a 64 bit unsigned
integer value parameter.

There was only one function adding a boolean that already took
a 64 bit value, proto_tree_add_boolean_bits_format_value64, a
counterpart of proto_tree_add_boolean_bits_format_value. It was
never used anywhere and not WS_DLL_PUBLIC, so it is safe to remove
in favor of having the latter take a uint64_t.

Note that _proto_tree_add_bits_format_value, as a comment says:
"does not receive an actual value but a dimensionless pointer to that value.
For this reason, the type of the header field is examined in order to determine
what kind of value we should read from this address.
The caller of this function must make sure that for the specific header field
type the address of a compatible value is provided."

Both proto_tree_add_boolean_bits_format_value and
proto_tree_add_boolean_bits_format_value64 called that function, one
passing a pointer to a guint32 as a void*, the other passing a
pointer to a guint64. In both cases it was cast to a guint32*, which
was less than ideal in the value64 case. Fix that.

This is related to #19552, as it is necessary in order to add support
for passing a UInt64 value to a boolean field (as oppposed to extracting
it directly from the tvb.)
2024-02-01 09:18:14 +00:00
Filip Thyssen e476661bde DOCSIS: Common MultiPart handling for MMM v5 and up 2024-02-01 09:16:13 +00:00
Filip Thyssen ee1afcfe61 DOCSIS: Hardware Friendly Resource Block Assignment (DOCSIS 4.0) 2024-02-01 09:16:13 +00:00
Filip Thyssen 90e94555aa DOCSIS: MAC Frame Control Type 0b01 becomes Special Use MAC Header (DOCSIS 4.0) 2024-02-01 09:16:13 +00:00
Pascal Quantin ee90fb0f41 GTP: improve dissection of PDU session container 2024-02-01 09:09:41 +00:00
Martin Mathieson 8cea8e7120 Fix more spellings - mostly comments 2024-01-31 22:14:22 +00:00
Dr. Lars Völker 6cc1ff055a ASAM CMP: Fix Vendor Data limit and missing UDP Encapsulation
Vendor Data for the Status Message CM and the Status Message Interface
are not required to have a multiple of 2 as length.

Also ASAM CMP UDP encapsulation was missing.

Closes: #19626
2024-01-31 18:58:54 +00:00
John Thacker 5b6454aacf RTP: Add the extended timestamp to the tree
As a generated field, as already done with extended sequence no
2024-01-31 08:26:33 -05:00
Joakim Karlsson bf5ec983ab pfcp: small spelling correction 2024-01-31 10:55:13 +00:00
Martin Mathieson 9eec8a12eb Fix some spelling errors 2024-01-31 10:46:38 +00:00
Martin Mathieson f241cd6208 SANE: Improve the way opcode is remembered for resps 2024-01-30 16:41:51 +00:00
John Thacker 81d094d47f RTMPT: Convert to ws_log system
Use the ws_log system instead of a special #define for RTMPT.
If Wireshark isn't compiled for the Debug target, the compiler
will optimize away all these calls.

Ping #19519
2024-01-30 08:43:54 -05:00
zhilei zhang 24669a5ab4 ISAKMP: add parse auth_method and proto for China IPSec VPN specification
China IPSec VPN specification use value 10 for auth_method and value 128 for pyload type
2024-01-30 12:55:56 +00:00
John Thacker 4e987dc451 epan: Remove layers when a dissector consumes no bytes via fragmentation
We remove layers when a dissector rejects a packet and returns 0.
When a dissector handles desegmentation, it can accept a packet
(return a non zero length) but actually consume zero bytes by
setting desegment_len to a different value and desegment_offset to 0.
That indicates that no bytes were actually consumed because a
future segment is needed.

In such a case, nothing should be added to the tree anyway. On the
next pass the dissector shouldn't be called again (or should have
the same behavior again). The layer needs to be removed on the first
pass in case there are additional PDUs still to be processed in the
frame, so that those PDUs get the same layer number on the first
pass that they'll get in subsequent passes, which affects reassembly
and other various file scoped structures that use the layer number.

Fix #19609
2024-01-30 10:31:01 +00:00
John Thacker df24178150 RTCP: Implement Profile Specific Extensions as a payload table
RFC 3550 does not define the structure of Profile-Specific
Extensions for RTCP at all. As the name implies, they are
supposed to be defined by a profile, with the understanding that
different applications would use different profile names.

In practice, those few standards that use Profile-Specific
Extensions all claim to use the standard "RTP/AVP" profile
from RFC 3551, which does not define any RTCP SR/RR profile-
specific extension, and add a proprietary extension. The ones
we know about so far as MS-RTP and IPMX, which unfortunately
use different values for the length (bytes vs the common RTP
practice of "number of 32-bits words minus 1"), but do use
a 16 bit type field.

Use a FT_UINT16 dissector table and register the known MS-RTP
types to that, instead of dissecting all profile-specific
extensions as MS-RTP and calling packets malformed.

Fix #19393
2024-01-30 10:26:53 +00:00
John Thacker 3383ac2d32 TLS: Explain legacy_version more
Add information about legacy version to the blurbs for client_version
and server_version.

Scan ClientHellos and ServerHellos for the supported_versions extension.
If we find it, add a PI_CHAT (usual workflow) expert info to the now
legacy_version field indicating that it MUST be ignored and that
the supported_versions extension MUST be used instead.

Add a server version expert info, similar to the one for the client
version, if the legacy version field specifies 1.3, because that's
not allowed in [D]TLS 1.3 because of middleboxes.

Related to #19624
2024-01-30 10:24:33 +00:00
Alexis La Goutte fc6a511997 x50ce: addic Dissection of IPv4/IPv6
when lenght is 8 (IPv4) or 32 (IPv6) (+mask)

FIX #19626
2024-01-29 21:09:59 +01:00
Alexis La Goutte fbd408cb58 x509ce: Display unknown IP Address (DATA) when it is not 4 or 16
enhance #19625
2024-01-29 21:09:59 +01:00
Martin Mathieson a8aebe5cf4 Check for item long text being 0 - prefer NULL 2024-01-29 11:30:41 +00:00
Joakim Karlsson da8c8fc1cf NGAP: append SMF PDU in column info
This change will append PDUs from TS38.413 ch9.3.4 to column info
2024-01-29 10:07:44 +00:00
Martin Mathieson fde6865fe9 PLDM: make a function static 2024-01-29 09:34:30 +00:00
Martin Mathieson c6fee3ab52 Fix some more item warnings 2024-01-28 22:11:33 +00:00
Jaap Keuter 4a948ad57a SANE: Quality improvements and correction 2024-01-28 21:41:12 +00:00
Gerald Combs 76909e44d2 [Automatic update for 2024-01-28]
Update manuf, services enterprise numbers, translations, and other items.
2024-01-28 20:04:44 +00:00
John Thacker 57bfe3d4a3 COSE: Fix a leak
Fix #19623
2024-01-28 12:09:44 -05:00
John Thacker 2d22fa26ba XMPP: Fix some leaks on malformed data 2024-01-27 19:57:07 -05:00
John Thacker 859e70fbb3 WOW: Fix use of unitialized memory
tvb_get_raw_bytes_as_string doesn't check lengths, because it's
used elsewhere when the length is unknown. If we use
tvb_get_string_enc, that checks the offsets and throws an
exception as appropriate, but then we have to use g_utf8_strreverse
due to the possibility of UTF-8 REPLACEMENT CHARACTERs.

To handle embedded nulls properly, we need to be using counted
strings (like wmem_strbuf_t) in more places.

Fix #19621
2024-01-27 19:18:41 -05:00
John Thacker c77448d793 GTP, GTPv2: stat taps can't be wmem_file_scope
Stat tap windows can be opened by the GUI (e.g., a
ServiceResponseTimeDialog) when no file is open, and persist
past a file being closed, i.e. outside of wmem_file_scope().

Items concerning the taps should not be created in wmem_file_scope().
This fails an assert, which crashes when built for a Debug target.

To use wmem, we would need to create a scope appropriate for the lifetime
of the ServiceReponseTimeDialog or other Tap dialog (or else add a
callback mechanism to srt table to free items created in epan scope.)

Partially revert 47b310da47
(the part where the stat taps are concerned.)

Related to #19620
2024-01-27 13:32:03 -05:00
Martin Mathieson 5dc8c6d5fb Check valid display value set for ipv4 fields 2024-01-27 18:13:44 +00:00
Martin Mathieson 73c7fcab1e Check that string items have display set to BASE_NONE 2024-01-27 17:12:59 +00:00
Martin Mathieson 7b58f82228 Set BASE_NONE for FT_BOOLEAN items with zero mask 2024-01-27 16:42:17 +00:00
Martin Mathieson 25f8695771 Be careful with scope of strings used for columns in SRT table 2024-01-27 15:21:25 +00:00
Uli Heilmeier 0103e8f9d7 DNS: add queried names to DNS statistics
Queried DNS names can be enabled for DNS staticstics with a preference.
Due to performance reason this is disabled by default.

Kind of related to #16728 and #16173
2024-01-27 11:35:51 +00:00
Dirk Römmen 989002841e BACnet:Fixed dissector for authentication related properties.
Fixed dissector for authentication related properties (open/close
tags were skipped)
Added new vendor id's as of january 24, 2024.
2024-01-27 11:25:56 +00:00
Sergio de Paula dd846520f4 [Zigbee GP] Fixed move and step cmd dissectors
* Move up/down command should not consider the rate field mandatory
* Step up/down command should not consider the transition time field mandatory
2024-01-27 09:19:49 +00:00
Fabian Bäumer d424f4b330 feat(ssh): Add support for ping@openssh.com message dissection 2024-01-27 00:12:33 +00:00
Fabian Bäumer a335e10838 feat(ssh): Add SSH dissection support for proprietary extensions 2024-01-27 00:12:33 +00:00
Fabian Bäumer c85c4dcfef feat(ssh): Add SSH_MSG_NEWCOMPRESS message value 2024-01-27 00:12:33 +00:00
Fabian Bäumer 7039e85f8e feat(ssh): Add SSH dissection support for RFC8308 extensions 2024-01-27 00:12:33 +00:00
Fabian Bäumer 19ddbcaaae feat(ssh): Add SSH extension dissection support (RFC8308) 2024-01-27 00:12:33 +00:00
Thibaut Vandervelden a3900a5d5e change display order of IEEE802154 address fields
This patch changes the display order of the IEEE802154 address fields
only for the IEEE802154 tree root. The order of the address fields
for the other trees is not changed. The order is now source address
first. This is not the same as the order in the frame, where the
destination address is first. However, reading it from left to right
makes more sense when the source address is first.
2024-01-26 14:12:47 +00:00
Uli Heilmeier 08956f6d13 DNS: Add expert info for missing response 2024-01-26 14:04:30 +00:00
Maxim Sharabayko 864c212b51 SRT: Parse the Group HS extension
Added parsing of the Group handshake extension of the SRT protocol.

Internet-Draft: https://haivision.github.io/srt-rfc/draft-sharabayko-srt.html#section-3.2.1.4
2024-01-26 08:19:47 +00:00
Riya Dixit 1e3a1d7118 Adding PLDM dissector for Platform Specification
This commit implemements PLDM dissector
for the Platform specification of the protocol
which is done following DMTF guideline
documentation -
https://www.dmtf.org/sites/default/files/standards/documents/DSP0248_1.2.0.pdf

Testing : For verification of dissector
pcap file collected during host poweron
is used as well as used custom pcaps.

Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>
2024-01-26 07:19:53 +00:00
Martin Mathieson 4571d9f194 Fix more FT_BOOLEAN items with no mask - set len to BASE_NONE 2024-01-25 22:01:03 +00:00
Martin Mathieson fa84f7541e Check that FT_BOOLEAN items with zero-mask use BASE_NONE 2024-01-25 19:32:47 +00:00
Antonio Vázquez Blanco bf30e483c0 bthci_vendor: Add broadcom read mem and refactor writemem 2024-01-25 11:40:21 +01:00
John Thacker 5a28b01e86 rtmpt: Don't allow chunk_size to be zero or negative
There's a number of variables that are lengths that should probably
be unsigned, but at least make sure negative values don't get assigned
to the chunk size, which can lead to an infinite loop. (It's read from
the packet as an unsigned 32 bit integer, but it should never in
practice have a value in the top half of that range.)

Fix #19617
2024-01-24 23:10:37 -05:00
Anders Broman 4d6a8c85b5 Fix base for FT_BOOLEAN without bitmask(BASE_NONE) 2024-01-24 21:58:02 +01:00
Anders Broman cf74fae3d9 HTTP2: Heuristicly detect application/json 2024-01-24 11:44:08 +00:00
Timo Warns 5c972dd075 GNSS: fix formatting of SBAS MT25 velocities
Fix the formatting of SBAS MT25 velocities: Cast constant to int64 type
to ensure that arithmetics for formatting are performed using int64.
2024-01-23 21:40:38 +00:00
Chaitanya Tata 72e83ae49a ieee80211: Add decode as Wi-Fi for UDP payload
If Wi-Fi packet is encapsulated in an UDP payload (IPIP tunneling),
then we can use this functionality to decode it as 802.11.

This is intended primarily for [1].

[1] - https://docs.zephyrproject.org/latest/samples/net/capture/README.html

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-01-23 20:18:41 +00:00
Anders Broman 457764fce3 HTTP2: Heuristically detect multipart/mixed
For dissection purposes I think all the multipart types in rfc1341
https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html can be treated
as multipart/mixed.
ping #19424
2024-01-23 15:23:25 +00:00
Christian Krump 808d9d39f7 openSAFETY: adapted verification of ID fields in sub frames
The verification of the ID fields fails if the address field in sub frame 2 takes more than 8 bit
2024-01-23 15:32:51 +01:00
Martin Mathieson b6a9c48eb5 E2AP CCC: Clarify that V1 has been added 2024-01-23 14:12:21 +00:00
pespin.shar@gmail.com de98508497 gsup: Fix decoding of empty IEs 2024-01-23 11:01:04 +00:00
Cole Wu 0926a98b30 Zigbee ZDP dissector field parsing fix
Fixed dissector cannot parse `zbee_zdp.assoc_device_count`
field error. Thanks to Mohammed Suhel mhs@exegin.com for
original implementation.

Change-Id: I3f65aee3d5cc156b8512b3e877746522439b823b
2024-01-22 20:45:52 -08:00
Alexis La Goutte 4a27b7e3e8 someip: Fix Dead Store found by Clang Analyzer 2024-01-22 16:52:06 +00:00
Gerald Combs 6e474d1af1 [Automatic update for 2024-01-21]
Update manuf, services enterprise numbers, translations, and other items.

services failed.
2024-01-21 18:05:20 +00:00
John Thacker c3e98efd5b http2: Use our own process_reassembled_data
This avoids a problem with the layer number being unstable

Fix #19609
2024-01-20 13:34:14 +00:00
Jie Han 9a97bf2216 Add support for attributes defined in NAN Spec R4
Add support for DCEA, NIRA, and NPBA
2024-01-19 14:40:48 +00:00
Martin Mathieson d0bb6b3dfe Dissectors: remove accidental double-colons 2024-01-19 10:38:41 +00:00
Chloe Pelling 1058293e78 X11: ConfigureWindow: Fix 'window' and bitmask fields.
Only 1 of the 4 bytes comprising the window field was actually
being read, causing the value to be incorrect. The offset pointer
was correctly increased by 4 on the following line, so this is
clearly just an oversight.

The configure-window-mask field was being dissected using the
"window value mask" bitmasks. It was interpreted correctly when
dissecting the actual fields, though, so this is clearly just
another minor oversight.

Before:

  window: 0x00000001
  configure-window-mask: 0x0003, background-pixmap, background-pixel
  x: 448
  y: 156

After:

  window: 0x03800001
  configure-window-mask: 0x0003, x, y
  x: 448
  y: 156
2024-01-19 10:03:03 +00:00
John Thacker 87f06bfd58 netflow: Handle variable length fields with zero length
If a variable length field has length zero, skip to the next field.

Fix #19605
2024-01-18 20:00:00 +00:00
Nico 256c9bebac Adding dissecator version 4 for GICI protocol 2024-01-18 19:33:11 +00:00
Gerald Combs f67b74550b ISUP: Add recursion checks 2024-01-18 16:41:24 +00:00
John Thacker 0cca51a61b UCP: Handle alphanumeric OAdC
This is a little annoying because the OTOA field that determines the
encoding is many fields after the OAdC field. Also annoying because
the encoding is faintly absurd, and not the same as the other
"IRAString" encoding; that one is also a hex string, but uses
*unpacked* GSM 7 bit encoding. Here we have a hex string encoding of
a SMS-like "number of used semi-octets" followed by packed GSM 7 bit
encoding.

Fix #19599
2024-01-18 16:40:01 +00:00
Vadim Yanitskiy 577d8313fc GSM A DTAP: use proper tree for spare bits in de_bearer_cap() 2024-01-18 21:35:49 +07:00
Martin Mathieson 2640465545 tools/check_val_to_str.py: add option to test generated files 2024-01-18 13:20:24 +00:00
Martin Mathieson b411905eb9 NRPPA: trivial cleanups 2024-01-18 13:19:45 +00:00
Martin Mathieson 2d6310f4f8 SMB2: make a function static 2024-01-18 10:22:36 +00:00
John Thacker 79c6e9db9d HTTP3: Huffman decoding
Add Huffman decoding from libngttp2 library (MIT licensed),
and use it in HTTP/3 to display the decoded QPACK bytes.
(HTTP/2 and HTTP/3 use the same Huffman encoding.) These
files are not part of the public libnghttp2 library but
normally internal.

Note that libnghttp3 does not supply a function to inflate
headers like nghttp2_hd_inflate_h2.

Related to #16761
2024-01-18 09:46:24 +00:00
Adedeji Adeloye c3c0fb7263 SMB2: dissect FSCTL, Query info, and Server notification
Add dissection for FSCTL_SET_INTEGRITY_INFORMATION_EX control code
Add dissection for SMB2 SERVER_TO_CLIENT notification
Update QueryInfo flags for FileFullEaInformation query code
Update file_info_levels list.
2024-01-18 06:27:35 +00:00
Yaniv Kaul 73ece5e8c8 epan/dissectors/packet-cql.c: fix few typos
Signed-off-by: Yaniv Kaul <yaniv.kaul@scylladb.com>
2024-01-17 16:37:37 +00:00
Martin Mathieson 84cf907fcb WSMP: Set correct length of N and T headers 2024-01-17 13:49:53 +00:00
Joakim Karlsson 05e1338d61 GTPv2: correction of IE Monitoring Event Information
Correcting offset miss in !13077
Due to offset for octet 4 is skipped earlier, the remaining lenght becomes wrongly.
To correct the fault, offset for octet 4 is need to be added after IE has been decoded
2024-01-17 13:26:12 +00:00
Pascal Quantin 524621ca21 NRPPa: upgrade dissector to v17.6.0 2024-01-17 08:43:10 +00:00
David Perry bf909bf93e Add descriptions for heur dissector tables
Build on !13975 to add human-readable descriptions for all heuristic
dissector tables in Wireshark.

Chosen names are meant to give some info on when a heuristic dissector
lookup will be made. Terms like 'fallback' are used when the heuristic
is only consulted if other checks do not result in dissection, for
example.

People with more intimate knowledge of the protocols and dissectors
involved are encouraged to suggest or implement better descriptions.
2024-01-17 08:35:43 +00:00
Gerald Combs 9703cf23a8 TLS: Update the follow tap name to match other dissectors 2024-01-17 08:33:55 +00:00
Timo Warns 7983d70203 GNSS: SBAS dissection improvements 2024-01-17 08:33:08 +00:00
John Thacker 75d79e5d7d rdpudp: Fix leak
The cloned tvbs stored for reassembly purposes need to be freed
when the file scoped trees holding them are freed.

Fix #19598
2024-01-16 23:41:24 +00:00
James Ring 85aeaf1f34 Adds a dissector for SANE (Scanner Access Now Easy). 2024-01-16 21:13:50 +00:00
Pascal Quantin d302ff5b42 F1AP: upgrade dissector to v17.7.0 2024-01-16 17:33:54 +01:00
David Perry 893a68e6d9 [#19585] Add description for heur dissector tables
Add a field to `struct heur_dissector_list` to hold a human-readable
description of the heuristic dissector list. The field is named
`ui_name` to parallel `struct dissector_table`.

Add `register_heur_dissector_list_with_description()` to register a new heuristic
dissector list with a description as well as a name. Change
`register_heur_dissector_list()` to be a thin wrapper which passes a
null description.

Add `heur_dissector_list_get_description()` to get the description from
a `heur_dissector_list_t` (which is an opaque type).

Modify the Qt user interface so that heuristic tables listed in *View →
Internals → Dissector Tables* show the description in the left column
and the short name in the right column, as is the case for other
dissector table types. For heuristic dissector lists which do not have a
description, repeat the short name in the left column to resemble how
the dialog was presented before this change.

Revise function name based on feedback
2024-01-16 15:53:55 +00:00
Pascal Quantin 7919c374d7 E1AP: upgrade dissector to v17.7.0 2024-01-16 16:19:16 +01:00
Pascal Quantin 1295d416ed XnAP: upgrade dissector to v17.7.0 2024-01-16 16:05:56 +01:00
Pascal Quantin e31f805c81 NGAP: upgrade dissector to v17.7.0 2024-01-16 15:49:20 +01:00
Pascal Quantin 28c7e0cce3 NR RRC: upgrade dissector to v17.7.0 2024-01-16 15:36:15 +01:00
Pascal Quantin feff9a8b80 LTE RRC: upgrade dissector to v17.7.0 2024-01-16 15:22:26 +01:00
Pascal Quantin 87dfdbb915 LPP: upgrade dissector to v17.7.0 2024-01-16 15:00:36 +01:00
Guy Harris e0811c1aa0 x75: don't register for WTAP_ENCAP_LAPB.
X.75 is not the same thing as LAPB, and we already *have* a LAPB
dissector that registers for WTAP_ENCAP_LAPB.  Two dissectors
registering for a value in the wtap_encap table means one of them will
lose, so it does not work; in this case, the LAPB dissector loses.

Fixes #19595.
2024-01-15 16:37:05 -08:00
John Thacker eeb818f5e7 TLS: Display minimum supported version when version unknown in Client Hello
If the supported_versions extension is provided in the Client Hello,
display the mimimum supported version given in the extension in the
Protocol column if the session TLS version is unknown. Use the minimum
version because we don't know what the server will agree to, but it
must be at least this version.

This only affects when the Server Hello or other authoritative
messages haven't been seen, so in first-pass dissection (live
capture or one pass tshark) or a capture that doesn't contain
authoritative messages at all.

Fix #16114
2024-01-15 08:03:36 +00:00
John Thacker 91e75f3e46 NBSS: Handle short packets
If we have a packet that isn't long enough to fit an entire header,
but the first byte does look like a message type, and we can do
reassembly, ask for reassembly.

Fix #19593
2024-01-14 11:25:12 -05:00
Jaap Keuter f5615dd9f9 IPv4/v6: fix field offset calculation for GeoIP entries 2024-01-14 15:00:11 +00:00
John Thacker c413d81967 rtmpt: Add a default chunksize preference
For RTMP connections where we get the handshake, continue to use
the initial value of 128 as done in the protocol; we should get
any Set Chunk Size messages.

For connections where we don't get the initial handshake, i.e.
the connection is already in progress when the capture is started,
allow setting a different default chunksize. Note that both too
large and too small values will cause problems, but the since the
initial bytes of chunks can have any value, it's very difficult
to do this heuristically.

Fix #12403 (by setting the preference to a large value, e.g. 60000,
everything is dissected correctly in that capture.)
2024-01-14 00:51:10 +00:00
Martin Mathieson 664b858d44 SOMEIP-SD: call val_to_str_const() 2024-01-12 12:59:26 +00:00
John Thacker 2c9b66d14a RTP: Use the same extended seqno / timestamp cycle for a new setup msg
Some systems repeatedly send out SDP setup information for the same
RTP conversation. We end up setting up multiple conversations
(it's not clear we need to, since most of the information we copy
to per-packet info for subsequent passes.)

When doing so, copy the per-SSRC number space information that
determines what cycle number we're on for extended sequence numbers
and timestamps (since those fields can and do wrap.)

This doesn't hurt at all if the setup information is for different
conversations, even ones using the same SSRC; it aligns the cycle
number but that's fine. It helps a lot in cases where the RTP
sequence number has already overflowed and then we get a duplicate
SETUP message; we need to stay on the same cycle.

Fix #19592
2024-01-12 21:56:30 -05:00
Zackhardtoname 6c26a3c7dc Fix uintptr_t not found error 2024-01-12 23:42:33 +00:00
Anders Broman 490d0514d9 Parlay: Retire the dissector.
Removing the generated Parlay dissecor on the assumtion it is now
obsolete. Leaving the IDL files in the repo for a while longer.
https://en.m.wikipedia.org/wiki/Parlay_Group
https://en.m.wikipedia.org/wiki/Parlay_X
2024-01-12 16:39:53 +00:00
John Thacker 846fae3141 rtmpt: Mark depended upon frames
RTMPT doesn't use the native reassembly API, so store the frames that
are involved in reassembly of a packet and mark the depended upon
frames itself so that exporting selected packets doesn't omit them.
2024-01-12 09:33:27 -05:00
Timo Warns 73e5eeae50 GNSS: add dissectors for further UBX messages 2024-01-12 09:20:13 +00:00
Guy Harris 2d04c10741 tftp: fix a typo.
The mode string for a Net-ASCII transfer is "netascii", not "netscii".

Fixes #19589.
2024-01-11 23:29:42 -08:00
Martin Mathieson 821fa78fee Fix some spelling errors 2024-01-11 19:32:32 +00:00
John Thacker 7ce05b9dd7 opcua: X.509 Certificate dissection
Dissect the X.509 v3 Certificates used in OPC UA.

Use proto_tree_add_bytes_with_length for adding NULL bytes to
the tree with a (0) length different than the length taken up
in the tvb. It's somewhat nicer than changing the item length later.
2024-01-11 10:30:30 -05:00
Gerald Combs 10a77d7b46 Parlay: Add a recursion check 2024-01-11 14:58:27 +00:00
Xiaofeng Wang 610e5f0543 Support enhanced-RTMP ExVideoTagHeader 2024-01-11 09:38:47 +00:00
Frostie314159 65c04f2886 Fill gaps in AWDL DataPathStateTLV. 2024-01-11 09:36:02 +00:00
Dr. Lars Völker 53e180491c SOME/IP-SD: Improve handling of ANY values and unknown entries 2024-01-11 09:30:33 +00:00
Joakim Karlsson 5d2bcdd377 pfcp: Update to 3GPP TS 29.244 V18.4.0 2024-01-11 09:29:36 +00:00
Martin Mathieson 9aff6a9314 netlink: show padding between short attributes 2024-01-11 09:24:41 +00:00
Dr. Lars Völker 27857b268e ISO15765: Cleanup and fix incomplete dissector warnings
Dissector is improved as follows:
- Code cleanup
- Added comments
- Offset calculations more obvious
- Segment data is put into segment hf instead of data dissector
- Padding is calculated and shown to fix incomplete dissector warnings
2024-01-11 09:20:13 +00:00
Martin Mathieson c8281ec58a netlink-netfilter: Show padding bytes 2024-01-10 20:07:44 +00:00
Jeff Dyer 885e638a03 NAS 5GS: set subdissector for SMS NAS messages in HTTP2 2024-01-10 12:58:54 -06:00
Yaniv Kaul 624ba9311c packet-cql.c: add support (partial) for custom payload result response
This add (partially) decoding of a custom payload result response

Signed-off-by: Yaniv Kaul <yaniv.kaul@scylladb.com>
2024-01-10 17:07:16 +00:00
Martin Mathieson 579aa4117c WMIO: Fix an infinite loop spotted by coverity 2024-01-10 13:41:37 +00:00
Martin Mayer 7eaf8bcba2 ATLDF: Remove unused macro 2024-01-10 09:49:09 +00:00
Martin Mathieson 66c607f118 Document discontinuities in OSPF and IRDA dissectors 2024-01-09 16:55:33 +00:00
Martin Mathieson ae3afe910b Infiniband: fix a couple of item offsets 2024-01-09 15:13:33 +00:00
Martin Mathieson a195204327 ORAN FH CUS: fix an offset and a length 2024-01-09 13:13:48 +00:00
Dr. Lars Völker 4b04c3fd05 ISO15765/UDS: Clean up of Address Handling
This patch does:
- clean up the address handling and limit to guint16 (see UDS)
- add address length to the data exchanged to UDS
- make UDS show the correct length in the protocol line instead of 2
- show address in UDS as generated as they are passed to UDS
2024-01-09 08:47:42 +00:00
Gerald Combs 218db31955 asn2wrs: Fix our recursion checks
Don't subtract our cycle size when resetting our proto depth.

Fixes #19580
2024-01-08 11:10:45 -08:00
Pascal Quantin b4c07ac165 NAS 5GS: upgrade dissector to v17.13.0 2024-01-08 10:55:00 +01:00
Sergio de Paula 0c923da588 [RF4CE] Fix for RF4CE NWK heuristics
RF4CE NWK heuristics should not attempt to verify the command ID from a command frame type when security is enabled, since in such case the command ID will be encrypted
2024-01-08 02:37:10 -03:00
Martin Mathieson e1efe33c0b WMIO: make a variable static 2024-01-07 22:10:40 +00:00
Evan Huus d52dc11ae4 cbor: add recursion depth check 2024-01-07 19:47:44 +00:00
Martin Mathieson 352ad96b57 Fix some spelling errors 2024-01-07 17:16:10 +00:00
Gerald Combs 1d6c7eecb0 [Automatic update for 2024-01-07]
Update manuf, services enterprise numbers, translations, and other items.
2024-01-07 17:14:06 +00:00
Hiddencodes Sec 5b87714ec8 Add parsing support for IWbemServices and WMIO 2024-01-07 16:48:40 +00:00
Dexter Gerig b8e7db6600 QUIC: Fix running dissectors on 0-RTT data 2024-01-07 14:11:18 +00:00
Dr. Lars Völker ec232d03d3 SOME/IP: Do not ignore messages with empty payload
Before stats would only get informed about SOME/IP messages only if a
payload would be present. This is fixed now.
2024-01-07 01:24:24 +00:00
John Thacker d3b5f367e9 T38: Fully initialize t38_conv struct, part 2
Same as d44e171cee but in
a different location.

Fix #19578
2024-01-06 19:43:43 -05:00
John Thacker 4232cb5575 rtmpt: Limit initial allocation size instead of max packet size
A problem with the RTMP dissector is that it allocates space up
front for messages based on a 24 bit message length field, and if
that length is bogus (e.g., fuzzed data), that can easily lead to
memory exhaustion. (#6898) However, the real value can be quite large,
and limiting the value with a preference causes real data to fail to
dissect and report as malformed (#3790).

An ideal solution would be to use the standard reassembly API, possibly
by having the TCP dissector do it via setting pinfo->desegment_offset
or pinfo->desegment_len, or possibly by having reassembly tables within
the dissector. Quirks about the protocol make this a bit difficult.

In the meantime, instead of allocating all the memory for a reassembled
packet upfront upon reading the message length, limit the initial
allocation size, and call wmem_realloc if needed. In the cases where
the length is bogus and we don't actually get message bytes later,
we don't allocate nearly as much memory, but in the cases where the
message really is that large, dissection will work without having to
fiddle with a preference.

Mark the preference as obsolete, because users shouldn't need to change it.
(We can reduce the initial max allocation size from this if need be
with little penalty, saving some memory when there's bogus values in
exchange for more reallocation for legitimate large messages.)

Fix #3790.
2024-01-06 19:44:25 +00:00
John Thacker 822a95d156 rtmpt: Fix iteration check
This check should be for when the maximum number of iterations
reaches zero, rather than declaring a loop the first time it is reached.
AMF dissection is being aborted and never succeeding.

Fixup 24403a9a35
2024-01-06 08:53:01 -05:00
John Thacker 1a81a7cacf RSVP: Support Capability Object
Support Capability Object (134) from RFC 5063 and RFC 8370.

Fix #19564
2024-01-05 15:46:18 +00:00
John Thacker 4f3b03b72a NTLMSSP: Zero out the session key at the start of creating a v1 key
A zeroed sessionkey is the failure state that is checked, but we
can return early from the function if there are problems with
the challenge response. Move the memset to the top of the function,
as is already done with v2.

Fix #19570
2024-01-05 08:59:54 -05:00
Martin Mathieson b1e900496c E2AP: Check whether table entry was found 2024-01-04 17:53:50 +00:00
John Thacker 75fa97e7f2 RSVP: Fix typo
The variable type is being passed for the encoding instead of
ENC_BIG_ENDIAN
2024-01-04 13:49:13 +00:00
Eugène Adell 75fc7e11e8 TCP: Duplicate ACKs hidden by Window Update and SACK presence 2024-01-04 13:48:49 +00:00
Giovanni Musto 25fb6c316c SocketCAN: Add hidden CAN item to protocol tree in case of CANFD 2024-01-04 09:42:06 +00:00
Simon Steinmann 8f7f7cd7de s4607: Add to "decode as"
Fix #19566
2024-01-04 02:17:38 +00:00
John Thacker ca02798714 RTPS: Don't leak in the guid hash
If hashing a newly created GBytes, unref the GBytes after computing
the hash (and before returning it.)

Fix #19558 (in combination with 45b929a1b6
and 6f17dcd67d)
2024-01-03 19:56:19 -05:00
pranay nag 69c9e06dae Thread: Update for Thread version 1.2 and 1.3 along with TREL 2024-01-03 15:41:47 +00:00
Jaap Keuter c550e9f26a SSH: don't hide signature types you don't dissect 2024-01-03 15:01:13 +00:00
Jaap Keuter 5816b3c75c SSH: We don't use Gerrit for a while now, remove its port from defaults 2024-01-03 15:01:13 +00:00
John Thacker 0e9ea401f7 TCP: Prefer full checksum over partial if the same
If the full checksum and partial checksum are the same (because
the contribution from the TCP payload doesn't change it), don't
call it a partial checksum.

This is already done in UDP.
2024-01-03 08:46:20 -05:00
Ismael Mendez Matamoros 6f17dcd67d RTPS: Fixed User Data Dissection feature
Function rtps_strlcpy broke the User Data dissection feature because it
overwites beyond the size of the string
2024-01-03 09:35:23 +00:00
John Thacker 329523afee TCPCL: Do not call g_int64_hash on a gint
Do not call g_int64_hash on a pointer to a gint (which might
be 32 bit). Call g_int_hash instead.

Fixes use of unitialized value.
2024-01-02 21:29:38 -05:00
Martin Mathieson 370e5db90a E2AP: check table pointers when adding ranFunction 2024-01-03 01:52:00 +00:00
John Thacker d44e171cee T38: Fully initialize t38_conv struct
Fix #19563
2024-01-03 00:37:47 +00:00
John Thacker 9f05d77cec sctp: Fully initialize tmpinfo struct 2024-01-02 19:02:05 -05:00
Gerald Combs 8f797db63c asn2wrs: Add recursion checks
Add a recursion depth check whenever we have cyclic dependencies.
Regenerate our dissectors.

Fixes #19501
2024-01-02 09:23:40 -08:00
John Thacker c9c40514d8 MLE: Don't call tvb_bytes_to_str with zero length
It causes an dissector bug assertion.

Related to #19557
2024-01-02 14:48:19 +00:00
John Thacker 1229ee0468 COSE: Fix some leaks in cose_header_context_t
If we're replacing the principal, unref the current one, if it
exists.

Push a cleanup function to free the principal and label in case
of hitting an exception dissecting the packet.

Related to #19557
2024-01-02 14:34:17 +00:00
Eugène Adell fdaba24262 Ethernet: Implementation of conversations with stream identifiers 2024-01-02 07:40:49 +00:00
John Thacker 77b0583568 DOCSIS: Extended EH Elements are not recursive
Extended EH Elements, which are still not defined as of DOCSIS 4.0
and must be ignored (CM-SP-MULPIv4.0-I08-231211), are not recursive
but instead have a full byte each for type and length instead of
a nibble, allowing specifying more than 15 extended header types or
extended header types with length longer than 15.

Increment the position for the first type/length byte to make the
logic more straightforward.

Part of #19557
2024-01-02 07:36:06 +00:00
Joakim Karlsson 7fcc15cb54 pfcp: Add Service Response Time statistics
Add a Service Response Time table for PFCP, similar to that
for GTPv2. Update the tshark docs to mention it.
2024-01-02 07:33:04 +00:00
Gerald Combs 45b929a1b6 RTPS: Fully initialize a struct
Make sure we fully initialize an endpoint_guid struct. Blind attempt
at fixing

```
==23447== Use of uninitialised value of size 8
==23447==    at 0xDAF0816: wmem_map_lookup (wsutil/wmem/wmem_map.c:264)
==23447==    by 0x7DE388C: get_domain_id_from_tcp_discovered_participants (epan/dissectors/packet-rtps.c:6518)
==23447==    by 0x7DE33AB: dissect_rtps (epan/dissectors/packet-rtps.c:13741)
```

in #19558.
2024-01-01 19:22:36 -08:00
John Thacker b67b86059e IAX2: Unknown HF is now 0, not -1
Update IAX2 handling for 2a9bc63325
and b61c0ac536.
Since a non-existent header field in the array is now 0 instead of -1,
change the test.

Fixes warnings like:

** (tshark:166575) 04:45:49.318472 [Epan WARNING] -- Dissector bug, protocol IAX2, in packet 4903: epan/proto.c:10972: failed assertion "n > 0 && (guint)n < gpa_hfinfo.len" (Unregistered hf!)

Related to #19557
2024-01-01 07:36:53 -05:00
Martin Mathieson 2bf14f5fe6 JSON-3GPP: fix a (presumed) typo 2023-12-31 20:28:19 +00:00
Tomasz Moń 4f46ed269f USB: Dissect protocol also at interface level
Try dissecting with usb.protocol both using device class triple and
interface class triple. This allows dissecting Bluetooth requests on
composite devices and/or when Device Descriptor class code is not one
of the Bluetooth codes.

Set URB transfer type in USB conversation info when handling control
requests. Set endpoint to magic NO_ENDPOINT8 value when control request
is directed to interface to prevent using whatever value was last stored
there (do not set endpoint to 0 to prevent clear_usb_conv_tmp_data()
from clearing interface class, subclass and protocol values).
2023-12-31 18:30:15 +00:00
Evan Huus c08e6e56fd Remove packet scope usage from a few dissectors
Mostly just passing pinfo around a little bit more, but in rf4ce-nwk we
weren't doing anything with the allocated value anyway, so just use the
regular proto_tree_add_item.
2023-12-31 10:42:11 -05:00
Stig Bjørlykke 17fcdb4735 pcap: Update link_type_vals 2023-12-31 12:58:33 +01:00
Martin Mathieson 1b9d95d6b5 Look into some cases where 1 value_string value is missing 2023-12-30 21:15:12 +00:00
Topi Miettinen ef2eb13350 netfilter: improve nftables dissection 2023-12-30 15:03:20 +00:00
Dr. Lars Völker af5a53efc0 ISO15765: clean up code and fix typo 2023-12-30 13:06:52 +00:00
Dr. Lars Völker fe3b55d85d ISO10681: Code Cleanup 2023-12-30 12:47:32 +00:00
Dr. Lars Völker 35fa4fa36d SOME/IP: remove empty line 2023-12-30 12:44:13 +00:00
John Thacker 97d59fc20f CFM: Fix check for Management Address [Domain] when Chassis ID Len is 0
According to IEEE 802.1Q 21.5.3.2, if the Chassis ID Length field is 0,
then the Chassis ID Subtype is not present. Thus the number of octets
used for the Chassis ID is 1 (the length field itself) if the length is
0, and 2 plus the length value if the length is > 0.

According to 21.5.3.6, the Management Address Length field should not
be present if the Management Address Domain Length has the value zero.
If it is present anyway (as in the file provided in #13720), handle it
but add an expert info.

Fix #13720
2023-12-29 19:55:44 -05:00
lizhengqiang 4e6484600d LLDP: fix return value of lldp dissector
Do not handle the return value of dissect_lldp_end_of_lldpdu() specially
to avoid the dissector returning an error value.
2023-12-29 09:19:00 +00:00
Timo Warns 42e85b29e1 GNSS: fix SBAS MT1 - MT5 field lengths
The length values given to proto_tree_add_item for SBAS MT1 - MT5
dissection did not always correctly match the bitmask in
hf_register_info causing a retrieval of wrong values. Align the length
values and bitmasks for a correct retrieval of field values.
2023-12-29 08:42:19 +00:00
Ferry Huberts 1ccbc482a0 packet-sv: fix the seqData validity
Update to the latest specification, which specifies the currently used
value for 'invalid' as 'backward compatible (do not use)'.

See
  IEC 61850-9-2 Edition 2.1 2020-02,
  Section 8.6 Definitions for basic data types – Presentation layer functionality,
  Table 21

Be aware that in the specification the bits are numbered in reverse (it
specifies the least significant bit as bit 31 instead of as bit 0)!

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
2023-12-29 08:19:15 +00:00
Giovanni Musto 84ddc8c446 LIN: Don't process payload if the frame has an error
Add error indication to the Info column
2023-12-28 16:04:23 +00:00
Jaap Keuter 1d6abf627c Bluetooth: update UUID and Company ID registry
Pull current values from the Bluetooth SIG registry, while keeping
old values around. Don't be afraid for UTF-8.
2023-12-28 15:54:18 +00:00
Timo Warns 9bb31318fe GNSS: add dissector for SBAS L1 MT24
Add dissector for SBAS L1 MT24 (mixed fast/long-term satellite error
correction message)
2023-12-28 09:48:30 +00:00
Jaap Keuter 64b9bad199 BTL2CAP: Switch to using more efficient bluetooth_uuid_vals_ext 2023-12-27 21:24:24 +00:00
Jaap Keuter 2dae7c2d79 BT_ATT: Adjust ranges for protocol registration
With the growth of the member registry they became part of the
protocol registrations for use with decode as.
Extend the code space reserved for member registrations, to
exclude these and new members for the foreseeable future.
2023-12-27 20:51:09 +01:00
Martin Mathieson 1243b49c49 tools/check_static.py: make script more readable 2023-12-27 01:03:28 +00:00
Gerald Combs bfad74780a [Automatic update for 2023-12-24]
Update manuf, services enterprise numbers, translations, and other items.
2023-12-25 08:38:26 +00:00
John Thacker 922d1f6219 SCTP: Use hashmaps for association indexing
Instead of storing all found SCTP associations in one linked list,
use maps.

Store associations where only one vtag is known in one map, hashed
by the ports. (This effectively is a list indexed by the ports.) Store
associations where both vtags are known in another map, hashed by the
vtags. After an association has been setup, most lookups should be
fast, using the vtags. This should be much faster than searching the
entire list of associations each time for captures with many
associations.

Assume vtag collisions are rare. When we have INIT ACK packets, the only
packets that have both vtags in a single packet, do not require that
addresses match. Otherwise, when matching two half associations into
a full association, require that addresses match as well as ports.
Requiring address matching for cases lacking INIT ACK packets (such as
a stream of DATA frames back and forth) prevents false positives
(especially in cases where ephemeral ports are not used and source and
destination ports are the same.)

Eventually we ought to track the additional addresses given in INIT,
INIT ACK, and ASCONF packets and use those as well.

Fix #19544
2023-12-23 08:33:04 +00:00
John Thacker 9b4c2ffb33 ICMPv4: Mark formally deprecated types
Mark with an expert info the ICMPv4 types formally deprecated
by RFCs 6633 and 6918
2023-12-23 08:29:59 +00:00
John Thacker 52c1ebb4e1 SCTP: Send sctp_info to the tap even if there's an exception
Always send the association information to the SCTP tap, if
we've filled in at least one tvb. Always add it to the tree
as well, by using the association index calculated for the
first chunk.

Note in a comment that we should only need to calculate the
association index for the first chunk of bundled chunks; while
there are some chunk types with exception verification tag
handling (RFC 9260 8.5.1), they shouldn't be bundled with other
chunk types. We should have an expert info for that situation.
(Previously, we were calculating the association index for all
chunks and using for the packet the last one calculated.)

Initialize the association index and direction when beginning
dissection, in case we throw an exception when getting the
chunk type to see if RFC 9260 8.5.1 applies.

Part of #19544
2023-12-23 00:08:36 +00:00
Dr. Lars Völker 87d749d2fe ISO15765: added a bit of documentation
- Added some information how the CAN ID Mappings work.
- Made formatting a bit more consistent.
2023-12-23 00:12:19 +01:00
Martin Mathieson f863b276c3 JSON-3GPP: Fix label for mapdu item 2023-12-22 13:12:26 +00:00
Martin Mathieson 5f870017f7 E2AP: fix range check while registering RAN-function dissectors 2023-12-22 11:13:11 +00:00
Martin Mathieson 5de1a339c4 Fix some spelling errors 2023-12-21 16:37:45 +00:00
John Thacker db28c15aeb DTLS: Initial support for adding DTLSv1.3 to the Protocol column
A minor piece of #18071, taken from !11408
2023-12-21 15:45:39 +00:00
Martin Mathieson 60dd24f701 E2AP: Add stats counter to Telephony menu 2023-12-21 15:35:41 +00:00
Joakim Karlsson af408571e5 JSON 3GPP: add TS 29.502 ch6.1.8 Feature negotiation support 2023-12-21 09:49:31 +01:00
John Thacker 50bf11fd8c IPv4: Mark deprecated option types
Mark the IPv4 option types deprecated by RFC 6814 as deprecated,
at least the ones that we support. (Many were never implemented.)
2023-12-20 17:09:02 -05:00