Commit Graph

45120 Commits

Author SHA1 Message Date
Gerald Combs a6b09b52b4 [Automatic update for 2022-07-17]
Update manuf, services enterprise numbers, translations, and other items.

services failed.
2022-07-17 16:38:11 +00:00
John Thacker 0749873c70 decode as: Add data dissector to all tables that support Decode As
Register the data dissector to all dissector tables that support
Decode As. This provides a way to disable decoding for table
entries that have a default dissector registered to a value.
It is particularly useful when a dissector is registered by default
to several values (e.g. HTTP), to be able to disable decoding
for one port without disabling the dissector in general.

It is also useful to prevent payloads from being handed off
to heuristic dissectors, and is thus distinguished from the
fallback to data when no dissector is set.  N.B.: that this has no
effect on dissectors that have a "Try heuristic sub-dissectors first"
preference set to TRUE.

It does not solve a second issue for table entries with a default
dissector - setting the dissector to "none" in order to force
payloads to be sent to heuristic dissectors without setting a
preference as above. (Note that in some cases one will wish to
send dissection on some ports to heuristics without enabling
heuristics first for _all_ ports.)

Fix #17518. Fix #15717. Related to #12098, which also needs the
last issue mentioned above addressed.
2022-07-16 16:02:36 -04:00
Tomasz Moń 22f7f56151 MaxMind DB: Significantly speed up stdout reader
Non-blocking reads were used to workaround Windows pipe handle leaks.
Now that the underlying issue is fixed (i.e. Wireshark no longer leaks
child process stdin/stdout/stderr handles), we can use blocking reads.

Using blocking reads is the main performance improvement. Reading more
than one byte at a time gives additional 15% performance improvement (on
top of enormous speedup due to blocking reads).

Avoid stdin and stdout file descriptor race conditions by closing the
descriptors only after the respective threads exit.
2022-07-16 14:55:22 +00:00
steve71 496dc0fcb3 TWAMP Test Frames: Adds dissection of PTP timestamps RFC8186
RFC8186 adds PTP timestamp option for TWAMP test frames. This small
change decodes these and the Z-bit which indicates their presence
2022-07-15 13:59:11 +00:00
Alexis La Goutte b9bc750fd8 conversation: fix -Wmissing-prototypes
conversation.c:339:1: warning: no previous prototype for function 'conversation_hash_element_list'
2022-07-15 13:45:52 +00:00
Alexis La Goutte b448b6a591 semcheck: fix -Wmissing-prototypes
semcheck.c:1110:1: warning: no previous prototype for function 'check_arithmetic_entity'
2022-07-15 13:45:52 +00:00
Alexis La Goutte bd28c19ad6 dvfm: Fix -Wmissing-prototypes
dfvm.c:206:1: warning: no previous prototype for function 'dfvm_value_tostr'
dfvm.c:550:1: warning: no previous prototype for function 'filter_finfo_fvalues'
dfvm.c:645:1: warning: no previous prototype for function 'filter_refs_fvalues'
2022-07-15 13:45:52 +00:00
Alexis La Goutte b68acb6bff pcre2: Fix -Wmissing-prototypes
lpcre2.c:506:13: warning: no previous prototype for function 'luaopen_rex_pcre2'
lpcre2_f.c:207:5: warning: no previous prototype for function 'Lpcre2_config'
lpcre2_f.c:234:5: warning: no previous prototype for function 'Lpcre2_get_flags'
2022-07-15 13:45:52 +00:00
Alexis La Goutte 1ca19b3c38 Fix -Wmissing-prototypes found by Clang
ftype-double.c:89:1: warning: no previous prototype for function 'val_unary_minus'
ftype-double.c:96:1: warning: no previous prototype for function 'val_add'
ftype-double.c:103:1: warning: no previous prototype for function 'val_subtract'
ftype-double.c:110:1: warning: no previous prototype for function 'val_multiply'
ftype-double.c:117:1: warning: no previous prototype for function 'val_divide'
ftype-integer.c:670:1: warning: no previous prototype for function 'uint_bitwise_and'
ftype-integer.c:677:1: warning: no previous prototype for function 'uint_is_zero'
ftype-integer.c:683:1: warning: no previous prototype for function 'uint_is_negative'
ftype-integer.c:689:1: warning: no previous prototype for function 'uint_unary_minus'
ftype-integer.c:704:1: warning: no previous prototype for function 'uint64_bitwise_and'
ftype-integer.c:711:1: warning: no previous prototype for function 'uint64_is_zero'
ftype-integer.c:717:1: warning: no previous prototype for function 'uint64_is_negative'
ftype-integer.c:723:1: warning: no previous prototype for function 'uint64_unary_minus'
ftype-integer.c:738:1: warning: no previous prototype for function 'sint_bitwise_and'
ftype-integer.c:745:1: warning: no previous prototype for function 'sint_is_zero'
ftype-integer.c:751:1: warning: no previous prototype for function 'sint_is_negative'
ftype-integer.c:757:1: warning: no previous prototype for function 'sint_unary_minus
ftype-integer.c:764:1: warning: no previous prototype for function 'sint64_bitwise_and'
ftype-integer.c:771:1: warning: no previous prototype for function 'sint64_is_zero'
ftype-integer.c:777:1: warning: no previous prototype for function 'sint64_is_negative'
ftype-integer.c:783:1: warning: no previous prototype for function 'sint64_unary_minus'
packet-bpv6.c:2182:1: warning: no previous prototype for function 'proto_register_bpv6'
packet-bpv6.c:2766:1: warning: no previous prototype for function 'proto_reg_handoff_bpv6'
packet-bpv7.c:1978:6: warning: no previous prototype for function 'proto_register_bpv7'
packet-bpv7.c:2037:6: warning: no previous prototype for function 'proto_reg_handoff_bpv7'
packet-realtek.c:349:1: warning: no previous prototype for function 'proto_register_realtek'
packet-realtek.c:436:1: warning: no previous prototype for function 'proto_reg_handoff_realtek'
packet-tcpcl.c:2147:1: warning: no previous prototype for function 'proto_register_tcpclv3'
packet-tcpcl.c:2211:1: warning: no previous prototype for function 'proto_reg_handoff_tcpclv3'
2022-07-15 13:45:52 +00:00
easonweii 52ddd86929 BGP: Fix dissector bug when BGP Update packets containing BGP Flowspec updates
Add support for BGP Update packets containing BGP Flowspec updates
Fixs #18198
2022-07-15 13:28:56 +00:00
Guy Harris f15b7b0ccc proto: fix proto_tree_add_bitmask_list_ret_uint64 to always return a value.
A "proto_tree_add..._ret_..." routine *must* return the value through
the pointer, even if no protocol tree is being built, as there's no
guarantee that a protocol tree will be built under all circumstances
(for example, if the dissection is only being done to generate the
column values, no column is a custom column, there are no coloring
rules, etc., so that none of the named field values are of interest, and
the protocol tree isn't going to be displayed, no protocol tree will be
built).

Fixes #18203.
2022-07-15 00:24:58 -07:00
João Valverde 4c975b770e dfilter: Improve compatibility of integer types
Before:

$ dftest '_ws.ftypes.int64 == _ws.ftypes.int8'
Filter: _ws.ftypes.int64 == _ws.ftypes.int8
dftest: _ws.ftypes.int64 and _ws.ftypes.int8 are not of compatible types.
	_ws.ftypes.int64 == _ws.ftypes.int8
	                    ^~~~~~~~~~~~~~~

After:

$ dftest '_ws.ftypes.int64 == _ws.ftypes.int8'
Filter: _ws.ftypes.int64 == _ws.ftypes.int8

Syntax tree:
 0 TEST_ANY_EQ:
   1 FIELD(_ws.ftypes.int64 <FT_INT64>)
   1 FIELD(_ws.ftypes.int8 <FT_INT8>)

Instructions:
00000 READ_TREE		_ws.ftypes.int64 <FT_INT64> -> reg#0
00001 IF_FALSE_GOTO	5
00002 READ_TREE		_ws.ftypes.int8 <FT_INT8> -> reg#1
00003 IF_FALSE_GOTO	5
00004 ANY_EQ		reg#0 === reg#1
00005 RETURN
2022-07-14 20:12:30 +00:00
msweant 53dcf53ae5 EAP: Encrypted IMSI Memory Bug
Added complete CertificateSerialNumber string match
logic to prevent malformed strings.  Added ASCII compliance
check prior to identity parsing and expert info warning.  Added
3GPP realm string matching logic to optional Realm token in Encr.
IMSI identities.

Closes #18129.
2022-07-14 19:18:45 +00:00
Aeneas Jaißle f5d997fd2d PPPoE: add TLV 0x90 value 0x03 "Double-tagged Ethernet", fix typo in "Encaps 2" 2022-07-14 16:07:45 +00:00
Alexis La Goutte 61f433406f thrift: Fix -Wdocumentation
packet-thrift.h:118:15: warning: parameter 'thrift_opt' not found in the function declaration
packet-thrift.h:119:15: warning: parameter 'is_field' not found in the function declaration
packet-thrift.h:121:15: warning: parameter 'field_id' not found in the function declaration
packet-thrift.h:122:15: warning: parameter 'hf_id' not found in the function declaration
packet-thrift.h:124:15: warning: parameter 'encoding' not found in the function declaration
packet-thrift.h:167:15: warning: parameter 'elt' not found in the function declaration
packet-thrift.h:169:15: warning: parameter 'seq' not found in the function declaration
2022-07-14 15:45:14 +00:00
Alexis La Goutte 134809fd80 bpv7: fix -Wdocumentation
packet-bpv7.c:483:11: warning: parameter 'obj' not found in the function declaration
2022-07-14 15:45:14 +00:00
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
João Valverde f68f172454 dfilter: Remove a debug message
Still too noisy even with noisy level.
2022-07-13 16:06:28 +00:00
João Valverde 6c8a8d7960 dfilter: Fix dfvm code string
All/any equal have their own symbols for operators so cannot
be handled in the same switch case.

Other comparisons don't have different symbols for any/all.
2022-07-13 00:37:12 +01: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
Chuck Craft e12954a637 epan: ws_debug log for heuristic that claims frame (len != 0)
It's possible for a dissector to claim a frame without adding to
the tree or being added to frame.protocols (see !6669)
Log a debug message showing the pinfo layers and the dissector that
claimed the tvb (frame/packet).
2022-07-12 14:15:33 +00:00
John Thacker 8ac995578c epan: Respect custom column resolved/unresolved status everywhere
Add a function to get the column text of the nth column, taking
into account whether the column is resolved or unresolved. Use
this function in the GUI, as well as in tshark, when writing
PSML, exporting dissection to PSML, etc., instead of accessing
col_data directly.

This removes the direct accesses of col_data from outside
column.c and column-utils.c

Fix #18168.
2022-07-12 00:22:11 +00:00
Dr. Lars Völker 868492fd2a Addr-Resolv: close vlans file on changing profile (BUGFIX)
Currently Wireshark does not close the vlans file on profile change.
This leads to major problems, when vlan resolution is turned on:
- Deleting a profile (not even selected) is not possible without exiting
  Wireshark.
- Switching from one profile with vlans to another with vlans, does
  not switch the resolution but stays on the names of the old profile!
2022-07-11 15:42:19 +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
John Thacker 02b00a8ee5 epan: Copy multifield custom column undecoded values correctly
When writing a custom column, some field types can't have a resolved
value, and just copy the label from the expression to the value.
Only copy information from the most recent field when doing so,
so that with multifield custom columns the entire unresolved value
doesn't get overwritten with the resolved value (if some fields
have resolved values and some don't.) This also reduces copying
from O(N^2) to O(N).

Fixes the display "unresolved" value for multifield custom columns
that are a mix of field types.
2022-07-08 09:54:54 -04: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
John Thacker 7a6ff3e5fe prefs: Remove custom column expression limit
Custom column expressions do not need to be limited to COL_MAX_LEN.
The size of the expression does not have any necessary relationship
to the size of the column contents, especially in the common case of
many semantically equivalent different fields from different protocols,
only one of which appears in any given frame.

The only place that actually does limit the length of custom
custom expressions is in reading the preferences. Use a GString
instead of allocating a buffer to COL_MAX_LEN when constructing
the string. In normal cases, this should decrease temporary
memory usage. Fix #16905
2022-07-07 12:52:19 +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
Gerald Combs 75efbb1ac4 Rename Logwolf to Logray
Switch to the name "Logray" for the log analyzer. Rays are biological
cousins of sharks and more people like the name "Logray" in a completely
unscientific survey here. Apologies for any inconvenience this might
cause.
2022-07-06 15:04:25 +00:00
Martin Mathieson eab62aa768 Fix some spellings. 2022-07-06 09:02:37 +01:00
John Thacker dd5e2f3b3f epan: Fix return value of prooto_strlcpy when not enough room
proto_strlcpy in normal situations returns the number of bytes
copied (because the return value of g_strlcpy is strlen of the
source buffer). It can copy no more than dest_size - 1, because
dest_size is the size of the buffer, including the null terminator.
(https://docs.gtk.org/glib/func.strlcpy.html)

Returning dest_size can cause offsets to get off by one and reach
the end of the buffer, and can cause subsequent calls to have
buffer overflows. (See #16905 for an example in the comments.)
2022-07-05 22:12:41 +00:00
John Thacker 5ef4da4d98 epan: Prevent buffer overflows in some built-in addr_to_str types
Several of the constant length string built in address types don't
check to see if the buf_len passed in is long enough to write
the string.

This can cause buffer overflows, e.g. with a custom column with
many FT_ETHER fields.
2022-07-05 21:56:54 +00:00