Commit graph

83692 commits

Author SHA1 Message Date
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
John Thacker
257225bf1d LI5G: Actually find an Ethernet dissector
There is no dissector handle called just "eth". ETSI TS 103 221-2
doesn't seem to have any guidance about an FCS; use eth_maybefcs
for now.
2022-02-27 03:00:59 -05:00
John Thacker
0a362d7daa LI5G: Add value strings
Add value strings and units as appropriate from ETSI TS 103 221-2
V1.1.1. (The dissector still needs to be updated to V1.4.1)
Also change the XID field to a FT_GUID, as it is a version 4
UUID per RFC 4122.
2022-02-26 14:43:42 -05:00
Gerald Combs
0bb4b44e2e TShark: Don't yell at the user. 2022-02-26 19:12:18 +00:00
John Thacker
2d06b63b14 LI5G: Fix spelling of "Format" 2022-02-26 13:22:45 -05:00
Chuck Craft
393c2ec9f2 tshark: -G only accepted as first option 2022-02-26 17:59:37 +00:00
John Thacker
7baded473f LI5G: Remove mixed tabs and spaces 2022-02-26 12:25:08 -05:00
Roman Volkov
4a478927fe mpeg descriptor: add FTA Content Management Descriptor (0x7E) 2022-02-26 12:58:04 +00:00
John Thacker
ab055c7e44 LI5G: Add support over UDP
Add support for decoding over UDP. Fix #17922
2022-02-26 12:43:42 +00:00
John Thacker
dd7fff4bce ieee80211: Handle UTF-8 SSIDs and unspecified charsets
IEEE 802.11 SSID fields are officially unspecified encoding but
probably UTF-8 (and likely ASCII, with which UTF-8 is backwards
compatible), unless the Extended Capabilities bit indicating that
it's *definitely* UTF-8 is set.

Get the SSID bytes as a raw byte string without any encoding
validation for sending to Dot11Decrypt, and add it to the tree
as a FT_BYTES with BASE_SHOW_UTF_8_PRINTABLE, which does the
right thing most of the time, and more often than now. In practice
this does most of #16208.

To really finish the job, the Extended Capabilities bit needs to
be checked, but not only does that bit come in a later tagged element
than the SSID, it's not necessarily sent, and for Responses we'd have
to track if the bit was set in a corresponding Request in the same
conversation. However, it's not clear that any drivers actually do
set the bit. (In all the captures I've seen with UTF-8 or even non
ASCII/non UTF-8 SSIDs, the bit was unset.)
2022-02-26 12:28:59 +00:00
John Thacker
939972800e Strip Headers: Add separate menu dialog, tshark help
Add a separate menu for Strip Headers (similar to Export PDU, but exporting
to an encapsulation other than WIRESHARK_UPPER_PDU everything for
that encapsulation). Add to the usage output of tshark for the "-U"
option which encapsulation a export tap will produce.
2022-02-25 20:29:16 -05:00
John Thacker
cbf76ea22f Export PDU: Allow native encapsulations / strip headers
Allow export PDU taps to be registered with a wiretap encapsulation
instead of always using WTAP_ENCAP_WIRESHARK_UPPER_PDU. This allows
creating normal capture files that aren't tied to wireshark without
having to do a "editcap -C -L -T", as well as creating files in
formats other than pcapng and pcap with tshark.

Provide a couple sample implementations in Ethernet (WTAP_ENCAP_ETHERNET)
and IP (v4 and v6, WTAP_ENCAP_RAW_IP) that are the most common use cases.
(I can imagine a few others; WTAP_ENCAP_MPEG_2_TS could probably be
useful, for example.) Fixes #15141
2022-02-25 20:29:16 -05:00
Martin Mathieson
f457caae01 EIGRP: Fix some item lengths 2022-02-25 22:52:18 +00:00
Martin Mathieson
462d755d8c IPv6: Calipso Domain of Interpretation is 4 bytes 2022-02-25 22:34:14 +00:00
Moshe Kaplan
4fdf7eee6f amqp: Fix spelling of Queueing (issue #17943)
Correct spelling of from Queueing to Queueing.
This fixes issue #17943.

Note that other instances of "Queueing" are
kept because it's technically a correct spelling,
but here it's the name of the protocol.
2022-02-25 19:24:05 +00:00
a059280b5d CSN.1: Fix compiler warning showing wrong copy
Let's do what's done for u8, which looks far more sane.

Fixes following gcc 11.2.0 warning:
"""
epan/dissectors/packet-csn1.c:913:17: warning: ‘ui16’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  913 |                 memcpy(pui16, &ui16, 2);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~
"""
2022-02-25 17:23:07 +00:00
Trond Norbye
f5277d0186 Couchbase: Simplify PDU length detection
1. The fixed size of a Couchbase header is 24 bytes (not 12)
2. The "overflow detection" won't work as the test would wrap.
   In addition to that the (current) version of the server will
   drop a connection if it encounters a frame bigger than 30MB
   and the biggest "legal" packets are currently less than 21MB.
2022-02-25 11:12:29 +01:00
Uli Heilmeier
33f5b9e145 Proto: Return NULL for 0 or lower -1 length items
Return NULL when an item with length zero or lower -1 is added to
the tree.

With this the calling dissector doesn't have to check the length and
there is no Dissector bug reported.

Related to #17890
2022-02-25 09:53:14 +00:00
Trond Norbye
4f0354b95f Couchbase: Whitelist some commands from key decode
Some commands use raw strings in the key field shouldn't
be decoded as collection encoded strings.
2022-02-25 09:39:42 +00:00
Developer Alexander
864c8cc857 SOMEIP: Fix length resolution for wiretype 4
Fixes wrong determination of length of length field for wiretype 4 in
combination of typerefs due to usage of wrong reference.
2022-02-25 09:29:08 +00:00
Trond Norbye
fa0cd7d2f4 Couchbase: Refactor packet dissector
A packet in the Couchbase protocol looks like:

    Byte/     0       |       1       |       2       |       3       |
       /              |               |               |               |
      |0 1 2 3 4 5 6 7|0 1 2 3 4 5 6 7|0 1 2 3 4 5 6 7|0 1 2 3 4 5 6 7|
      +---------------+---------------+---------------+---------------+
     0| HEADER                                                        |
      |                                                               |
      |                                                               |
      |                                                               |
      +---------------+---------------+---------------+---------------+
    24| Frame specific extras (only set if magic and length in the    |
      | header say so)                                                |
      +---------------+---------------+---------------+---------------+
     x| Ccommand specific extras                                      |
      |  (note length in the extras length header field)              |
      +---------------+---------------+---------------+---------------+
     y| Key (as needed)                                               |
      |  (note length in key length header field)                     |
      +---------------+---------------+---------------+---------------+
     z| Value (as needed)                                             |
      |  (note length is total body length header field, minus        |
      |   sum of the other sections above)                            |
      +---------------+---------------+---------------+---------------+

This patch change the dissector to call a separate function to
print each section (instead of a single function).

The motivation for the patch is to make the code more readable
as each of these fields may have multiple formats (depending on
the value in the magic field). Currently only the client initiated
packets are implemented in the dissector, but in certain cases
the server may push messages to the client with a different magic
which use another namespace for the opcodes and would be a lot
easier to implement with this refactor)
2022-02-25 09:17:27 +00:00