Commit Graph

83712 Commits

Author SHA1 Message Date
Sake Blok be915d7374 epan: Allow nested dependent packets
Save all dependent frames when there are multiple levels
of reassembly.
2022-03-06 23:43:03 +00:00
Gerald Combs 1d2a8bff3c [Automatic update for 2022-03-06]
Update manuf, services enterprise numbers, translations, and other items.
2022-03-06 16:41:06 +00:00
Jaap Keuter 5ea49dbffb Drop old unused topic actions
Part of issue #17982
2022-03-06 15:10:19 +00:00
easonweii dad78d209a iWARP MPA: Resolved the problem that the iWARP Marker parses abnormally
Fix the wrong iWARP Marker value in version 3.6
Related to #17739
2022-03-06 14:59:43 +00:00
Gerald Combs c4f60981c1 GitLab CI: Copy our macOS dSYM .dmgs. 2022-03-05 17:04:36 -08:00
Gerald Combs 1b8d2bcf37 Debian: Update our symbols. 2022-03-05 16:05:09 -08:00
Gerald Combs 93d9b799b7 macOS: Fix our dSYM bundle name. 2022-03-05 15:49:01 -08:00
Gerald Combs 1677e0a8f9 Packaging: Ship macOS dSYMs in their own .dmg.
Create a Wireshark.dSYM bundle for our debugging symbols. Create a
separate .dmg for the dSYM bundle, similar to what we do for Windows.
`dwarfdump --uuid run/Wireshark.dSYM` returns what app

This reduces the size of the application bundle and .dmg quite a bit
(sizes measured with `du -sm`):

51	Wireshark 3.7.0 Intel 64.dmg
81	Wireshark dSYM 3.7.0 Intel 64.dmg
182	Wireshark.app
262	Wireshark.dSYM
2022-03-05 14:32:53 -08:00
João Valverde df0fc8b517 dfilter: Try to be more flexible with leading colons
For an expression starting with a colon (a literal) try to parse
the value with and without colon. This avoids excluding some
valid representations like the IPv6 address "::1".
2022-03-05 11:10:54 +00:00
João Valverde bd48f947b0 dfilter: Require a field-like value on the LHS
Comparisons require a field-like value on one of the sides,
or both. Change this to require on the LHS or both. There is
realy no reason that I can see to allow the relation to commute,
and it allows removing a lot of unnecessary code and extra tests.
2022-03-05 11:10:54 +00:00
João Valverde a68b408a9f dfilter: Add RHS bias for literal values
For unparsed values on the RHS of a comparison try
to parse them first as a literal and only then as
a protocol. This is more complicated in code but
should be a use case a lot more common and useful in
practice.

It removes some annoying special cases and applies this
rule consistently to any expression. Consistency is
important otherwise the special cases and exceptions
make the language confusing and difficult to learn.

For values on the LHS the rule remains to first try a
protocol value, then a literal.

Related with issue #17731.
2022-03-05 11:10:54 +00:00
João Valverde c4f9d8abda dfilter: Rename "unparsed" to "literal"
A literal value is a value that cannot be interpreted as a
registered protocol. An unparsed value can be a literal or
an identifier (protocol/field) according to context and the
current disambiguation rules.

Strictly literal here is to be understood to  mean "numeric
literal, including numeric arrays, but not strings or character
constants".
2022-03-05 11:10:54 +00:00
João Valverde 6d520addd1 dfilter: Add special syntax for literals and names
The syntax for protocols and some literals like numbers
and bytes/addresses can be  ambiguous. Some protocols can
be parsed as a literal, for example the protocol "fc"
(Fibre Channel) can be parsed as 0xFC.

If a numeric protocol is registered that will also take
precedence over any literal, according to the current
rules, thereby breaking numerical comparisons to that
number. The same for an hypothetical protocol named "true",
etc.

To allow the user to disambiguate this meaning introduce
new syntax.

Any value prefixed with ':' or enclosed in <,> will be treated
as a literal value only. The value :fc or <fc> will always
mean 0xFC, under any context. Never a protocol whose filter
name is "fc".

Likewise any value prefixed with a dot will always be parsed
as an identifier (protocol or protocol field) in the language.
Never any literal value parsed from the token "fc".

This allows the user to be explicit about the meaning,
and between the two explicit methods plus the ambiguous one
it doesn't completely break any one meaning.

The difference can be seen in the following two programs:

    Filter: frame == fc

    Constants:

    Instructions:
    00000 READ_TREE		frame -> reg#0
    00001 IF-FALSE-GOTO	5
    00002 READ_TREE		fc -> reg#1
    00003 IF-FALSE-GOTO	5
    00004 ANY_EQ		reg#0 == reg#1
    00005 RETURN

    --------

    Filter: frame == :fc

    Constants:
    00000 PUT_FVALUE	fc <FT_PROTOCOL> -> reg#1

    Instructions:
    00000 READ_TREE		frame -> reg#0
    00001 IF-FALSE-GOTO	3
    00002 ANY_EQ		reg#0 == reg#1
    00003 RETURN

The filter "frame == fc" is the same as "filter == .fc",
according to the current heuristic, except the first form
will try to parse it as a literal if the name does not
correspond to any registered protocol.

By treating a leading dot as a name in the language we
necessarily disallow writing floats with a leading dot. We
will also disallow writing with an ending dot when using
unparsed values. This is a backward incompatibility but has
the happy side effect of making the expression {1...2}
unambiguous.

This could either mean "1 .. .2" or "1. .. 2". If we require
a leading and ending digit then the meaning is clear:
    1.0..0.2 -> 1.0 .. 0.2

Fixes #17731.
2022-03-05 11:10:54 +00:00
Guy Harris 64d95a2808 pcap: fix the handling of the reserved field.
Don't commit to it being a "class" field.

Fix the bitfield for it.
2022-03-04 17:49:15 -08:00
Guy Harris e999b0a4d2 pcap: process the subfields of the link-layer-type-plus-stuff field.
Extract the FCS length information from that field, and reject captures
that have a non-zero "class" field (the 10-bit reserved field that was
once intended to allow other "classes" of link layer type, with class 0
being "LINKTYPE_ values", but the original use case doesn't appear ever
to have been used).
2022-03-04 16:23:02 -08:00
Martin Mathieson 5db8d0930a NVME: Make an array of hf items static. 2022-03-04 20:19:56 +00:00
John Thacker f43ce70fd9 HTTP2: Don't add a proto item before seeing if we'll dissect anything
Behave like other protcols that call tcp_dissect_pdus and don't set
COL_PROTOCOL or add a proto item before the call to tcp_dissect_pdus.

This avoids adding an empty tree in cases where there isn't enough
of the PDU to actually dissect anything. This makes the protocol
tree the same in the first pass (and thus tshark output), as in later
passes where the HTTP2 dissector won't get called.
2022-03-04 14:26:15 +00:00
Oke Hargens f461e33a41 column-utils: Add missing check for frame_data::has_ts
Adds check for frame_data::has_ts in col_set_delta_time before calling
set_time_seconds. This is the same check that is done in multiple other
methods in column-utils.c. Because frame_data::tsprec might not be
initialized if has_ts is false, this resulted in a failed assertion in
set_time_seconds if the user created a column with "Delta time".

Also adds an assertion for frame_data::has_ts in set_time_seconds.
2022-03-04 12:03:36 +00:00
Huang Qiangxiong 0d0c1ceead Protobuf: Support to display JSON mapping for Protobuf message
Add option display_json_mapping, that make a new JSON view of
this protobuf message displayed.

close #17797
2022-03-03 14:47:32 +00:00
Huang Qiangxiong 8a9cb14aec json_dumper: Adding support to dump JSON to GString 2022-03-03 14:47:32 +00:00
John Thacker 3846d35529 TLS: Don't add to the info column if the msp ends in the same frame
If a multisegment TLS pdu begins and ends in the same frame, don't
add "[TLS segment of a reassembled PDU]" to the info column.
2022-03-03 07:09:55 -05:00
Stig Bjørlykke db85804e92 cbor: Use common fields for uint and tag
Use the same field name for 8/16/32/64 bits uint and tag to align
with nint and length fields.
2022-03-03 08:19:54 +01:00
Stig Bjørlykke c12a41e970 cbor: Add items for header fields
Add items for major type, additional information and lengths.
Create an entry for each element which contains the header details.

Change error handling from returning a proto_item to return a boolean.
Change naming to Indefinite length instead of Undefined length.
Dissect "break" using dissect_cbor_float_simple_data().
2022-03-03 08:19:54 +01:00
Moshe Kaplan fd8a1e6f4a packet-ftp: Add support for exporting objects
Add supports for exporting objects transferred
over FTP. The max size for files to be
exported can be configured via preferences,
and is unlimited (0) by default.
2022-03-03 02:45:42 +00:00
Gerald Combs 041b9d6ade MySQL: Fix a buffer overrun.
Fixes #17976.
2022-03-02 13:37:56 -08:00
Constantine Gavrilov b32659a5bc NVMe: decode Get Features transfers. 2022-03-02 16:04:56 +00:00
Constantine Gavrilov a97fc26d9d NVMe: decode Get Features CQE. 2022-03-02 16:04:56 +00:00
Constantine Gavrilov d06781ee9b NVMe: fix decoding of bad CQE status. 2022-03-02 16:04:56 +00:00
Trond Norbye 6977bc18ec Couchbase: Add support for server push messages
The server may push the following messages to the client:

ClustermapChangeNotification - If the client asked for it via
a hello flag the server will push out notifications to the
client when the topology changed

There are also a few "internal" messages which are used
between various components on the server:

Authenticate - Try to authenticate the externally defined user

ActiveExternalUsers -  Push the list of active externally
                       defined users.

GetAuthorization - Request the authorization profile for the
                   given user.
2022-03-02 11:46:06 +00:00
Martin Mathieson e9aca17038 ORAN FH-CUS: Getting ready to add modulation compression 2022-03-02 09:48:53 +00:00
Constantine Gavrilov 0760bfd1f5 NVMe: decode partial transfers
* Add support for partial transfers decoding for Connect command.
2022-03-02 05:10:12 +00:00
Constantine Gavrilov dc1c251310 NVMe: decode partial transfers
* Add support for partial transfers decoding for GetLogPage command.
2022-03-02 05:10:12 +00:00
Constantine Gavrilov 2126920200 NVMe: decode partial transfers
* Add support for partial transfers decoding for SetFeatures command.
2022-03-02 05:10:12 +00:00
Constantine Gavrilov ff298c9876 NVMe: decode partial transfers
* Add support for partial transfers decoding for Identify command
2022-03-02 05:10:12 +00:00
Constantine Gavrilov dc4c32ebda NVMe: decode partial transfers
* link multiple transfers to commands
* link multiple transfers to transfer requests
* link multiple transfers to each other (prev and next)
* track offset of each transfer
* display offset of each transfer.
2022-03-02 05:10:12 +00:00
Gerald Combs 17ddf0e247 MySQL: Add a cast.
Try to fix

```
epan\dissectors\packet-mysql.c(2793,35): error C2220: the following warning is treated as an error [build\epan\dissectors\dissectors.vcxproj]
epan\dissectors\packet-mysql.c(2793,35): error C2220: 		field_metas->flags = (guint16 *)wmem_alloc0_array(wmem_file_scope(), guint16, num_fields); [build\epan\dissectors\dissectors.vcxproj]
epan\dissectors\packet-mysql.c(2793,35): error C2220: 		                                ^ [build\epan\dissectors\dissectors.vcxproj]
epan\dissectors\packet-mysql.c(2793,35): warning C4244: 'function': conversion from 'guint64' to 'const size_t', possible loss of data [build\epan\dissectors\dissectors.vcxproj]
epan\dissectors\packet-mysql.c(2793,35): warning C4244: 		field_metas->flags = (guint16 *)wmem_alloc0_array(wmem_file_scope(), guint16, num_fields); [build\epan\dissectors\dissectors.vcxproj]
epan\dissectors\packet-mysql.c(2793,35): warning C4244: 		                                ^ [build\epan\dissectors\dissectors.vcxproj]
epan\dissectors\packet-mysql.c(2794,34): warning C4244: 'function': conversion from 'guint64' to 'const size_t', possible loss of data [build\epan\dissectors\dissectors.vcxproj]
epan\dissectors\packet-mysql.c(2794,34): warning C4244: 		field_metas->types = (guint8 *)wmem_alloc0_array(wmem_file_scope(), guint8, num_fields); [build\epan\dissectors\dissectors.vcxproj]
epan\dissectors\packet-mysql.c(2794,34): warning C4244: 		                               ^ [build\epan\dissectors\dissectors.vcxproj]
```
2022-03-01 16:01:47 -08:00
Developer Alexander 4a3ae916d6 SOMEIP: Dissect payload by default
Dissection of payload is enabled by default. If it is disabled the user gets a
hint.

Corrected some typos.

Intention: It is very confusing for non expert users of wireshark when some
major protocol features are disabled by default.
2022-03-01 20:43:56 +00:00
Gerald Combs 31c71e94aa MySQL: Allocate enough memory for our metadata.
Use wmem_alloc0_array instead of trying to manually calculate and zero
memory. Fixes #17967.
2022-03-01 10:31:15 -08:00
Huang Qiangxiong c3dea0b98e GRPC: Add support for gRPC-Web
Supporting both application/grpc-web and application/grpc-web-text.
Add test case for grpc-web(-text).

close #17939
2022-03-01 10:19:47 +00:00
John Thacker 90ddcc44ed TCP: check the layer number of the last segment as well
When desegmenting TCP, we only want to call subdissectors when processing
the last segment. With encapsulation, TCP might appear at more than one
layer in the frame, so check that the layer number of the last segment
matches the current layer number too, just like in
process_reassembled_data()
2022-03-01 01:12:47 +00:00
John Thacker 636c797627 MP2T: Only call subdissectors on the last fragment
When there is more than one TSP in a frame, the fragment at the
end of one TSP and the first fragment in the next have the same
layer number as well as frame number. So use other information
about whether we have the last fragment to avoid calling subdissectors
extra times (which can interfere with retrieving the packet analysis
proto data on the subsequent passes.)
2022-03-01 00:59:21 +00:00
diego dupin 6105d652f3 MariaDB/MySQL protocol improvement 2022-02-28 20:04:52 +00:00
Chuck Craft 8176303d9d tshark: -G plugins - add codecs to output 2022-02-28 17:32:29 +00:00
Jaap Keuter 6ac2123953 CFM: clean up proto_item encoding, white space and some comments. 2022-02-28 12:29:04 +00:00
Guy Harris 118271631c packetlogger: clean up the dissector code a bit.
Just have a single switch for all packetlogger packet types, with a
routine doing the common code for all packets treated as Bluetooth H1
interface packets.

This means that unknown types are never handed off to the Bluetooth H1
interface dissector; it is probably best not to hand it to that
dissector, as the packet might not be a Bluetooth H1 interface packet.

This also fixes the setting of bthci.sent, which is a gboolean that
should be TRUE for sent packets and FALSE for received packets, which
means it should *NOT* be set to P2P_DIR_SENT for sent packets and
P2P_DIR_RECV for received packets - P2P_DIR_SENT is 0, meaning it looks
like FALSE, not TRUE. and P2P_DIR_RECV is 1, meaning it looks like TRUE,
not FALSE.  (In practice, this doesn't appear to matter, as the only
places that look at bthci.sent look it it *before* the packetlogger
dissector is called, but it's better to do it correctly, in case
anything else *does* end up looking at that field after the packetlogger
dissector is called.)
2022-02-28 03:00:02 -08:00
Stig Bjørlykke 71cb58df22 packetlogger: Handle SCO data packets
Add handling of sent and received SCO data packets.

Fixes #17964.
2022-02-28 10:04:50 +01:00
João Valverde 1278e36152 dfilter: Add more debug code 2022-02-27 23:35:57 +00:00
João Valverde 70301ba54c dfilter: Fix dfvm dump display
Fix operators to reflect their true meaning.
2022-02-27 19:12:02 +00:00
Gerald Combs b9651ba7b0 [Automatic update for 2022-02-27]
Update manuf, services enterprise numbers, translations, and other items.
2022-02-27 16:38:33 +00:00
John Thacker 1f88507591 LI5G: Use a dissector table
Use a dissector table instead of manually managing an array of dissector
handles with a hardcoded size. This also prevents a buffer over-read
from unexpected payload format values (either in a later version of
the protocol or just malformed data.)
2022-02-27 03:41:18 -05:00