Commit Graph

85920 Commits

Author SHA1 Message Date
Pascal Quantin 6b41ad918b PCAP: upgrade dissector to v17.0.0
In their infinite wisdom, 3GPP succeeded to make non backward compatible
ASN.1 description
Closes #18646
2022-11-15 16:04:54 +01:00
Pau Espin 37a0ccee9c GSM A-bis/OML: Show NACK cause descriptions 2022-11-15 10:23:47 +00:00
Jeremy Kerr 889e5331dc Add NVMe Management Interface (NVMe-MI) dissector
This change adds a small dissector for the NVMe-MI protocol, typically
for tunelling Administration commands over an MCTP (over I2C) channel.

We just decode the request and response headers, and leave the payload
as raw data.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
2022-11-15 09:05:05 +00:00
Jeremy Kerr baf7a3c493 Add MCTP control protocol dissector
This change adds a very basic dissector for the MCTP control protocol -
just the header fields, leaving the raw payload data.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
2022-11-15 09:05:05 +00:00
Jeremy Kerr e1cbe02cce Add Management Component Transport Protocol (MCTP) dissector
This change adds a protocol dissector for the Management Component
Transport Protocol (MCTP). This is a failry simple datagram-based
protocol for messaging between components within a single platform,
typically over I2C, serial or PCIe.

This dissector just implements the header fields, and sequence-number
based message reassembly. Inner protocols will be added as follow-up
changes.

Linux has support for AF_MCTP data, so decode from the MCTP SLL ltype.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
2022-11-15 09:05:05 +00:00
AndersBroman b704562c0c RTPProxy: Make column info more readable. 2022-11-15 09:29:19 +01:00
John Thacker b9a4bf297e reassembly: Fix update to the fragment_add_single functions
These used fragment_head and fragment_items indistinguishably
in a few ways. Fix up 4f3b028d94

Fix #18639. Fix #18640.
2022-11-14 21:39:16 -05:00
Martin Gallo 59fdaa7d07 SAPEnqueue: Added SAP Enqueue Server as main dissector 2022-11-14 20:35:17 +00:00
John Thacker 6e041d9afa Qt: Fix typo in proto_tree_model
Don't take the address of a pointer in the foreach function.
Fixes the main status bar not updating properly because of
inability to find a field.
2022-11-14 11:36:43 -05:00
John Thacker ab27562dbc Fixup fragment
Fix a fragment idiom changed in 4f3b028d94

Fix #18634
2022-11-14 12:22:37 +00:00
John Thacker b7ed46288a Qt: Speed up ProtoTreeModel with lots of items
When creating a ProtoNode, count the (non-hidden) children and put
them in a QVector. This saves time having to iterate through all
of a node's children (or the parent's children) each time the
model or view wants to get the row or index number. Create and
delete the needed ProtoNodes when the root node is changed, instead
of recreating them on demand from the proto_nodes (since they're no
longer a thin wrapper.)

Fix #18625
2022-11-14 06:28:16 -05:00
David Perry 52382b2592 Use `register_dissector()` for more protocols 2022-11-14 04:48:24 +00:00
John Thacker 4f3b028d94 epan: Separate fragment_head and fragment_item
Separate fragment_head and fragment_item into two
different types of structs.

Remove "offset" from fragment_head, which was unused,
making fragment heads 4 bytes smaller.

Remove fragment_nr_offset, datalen, reassembled_in,
reas_in_layer_num, and error from fragment_item,
making them 24 bytes smaller.

Change a few dissectors which were using fragment_head
and fragment_item indistinguishably.

Ping #17311
2022-11-14 01:18:11 +00:00
Gerald Combs 0bfdd0d954 [Automatic update for 2022-11-13]
Update manuf, services enterprise numbers, translations, and other items.
2022-11-13 18:12:27 +00:00
Kevin Albertson 24d55ce7ac move depth increment below error checks 2022-11-13 16:19:19 +00:00
Kevin Albertson 2b43f5f650 mongo: fix document depth tracking
Fixes a "BSON document recursion exceeds" error on lists of > 100
documents.
2022-11-13 16:19:19 +00:00
João Valverde ae0c38a07a NFS: Fix string decoding to use UTF-8
Use tvb_get_string_enc() to read a string.

I think NFSv3 doesn't specify an encoding so interoperabilty
is dicey. I believe NFSv4 specifies UTF-8.

Fixes #18628.
2022-11-13 15:38:53 +00:00
Martin Mathieson fd96d818a9 SAP HDB: fix a spelling error and some cppcheck warnings 2022-11-12 11:30:26 +00:00
John Thacker 3014fd9d17 pgsql: Avoid crash on non-ASCII invalid type bytes
We don't really want to a full hex representation to the INFO
column, just replace it for unprintable characters.

Fix #18591
2022-11-11 17:45:26 -05:00
João Valverde 795e318739 Gitlab CI: Add build with -Werror enabled
Currently we don't have any build with -Werror because of
widespread use of ENABLE_EXTRA_COMPILER_WARNINGS CMake option,
that automatically disables -Werror. That's bad because it allows
code with warnings to pass the CI jobs and be checked in, which is
something we want to avoid.

Configure the GCC build to not use ENABLE_EXTRA_COMPILER_WARNINGS.
2022-11-11 14:24:54 +00:00
João Valverde 1ed750dd94 CMake + Gitlab CI: Allow fuzz jobs to pass with warnings
Allow fuzz jobs to pass with warnings because catching warnings is
not their purpose.

Remove -Werror=unused-but-set-variable that was added in
85357ae721 as a work-around to the fact that -Werror is not
enabled as a side-effect of ENABLE_EXTRA_COMPILER_WARNINGS.

Allow users to control -Werror. For example the MSYS2 build
has many warnings, this policy of adding -Werror= breaks that
build.
2022-11-11 14:20:28 +00:00
Martin Gallo 384bf49591 SAPHDB: Added SAP HDB as main dissector 2022-11-11 13:10:00 +00:00
John Thacker 91279eb90e Qt: Add GeoIP latitude and longitude to Endpoints table
Fix #17049
2022-11-10 17:48:29 +00:00
Chuck Craft 1e6f26adb6 wslua: init.lua - superuser logic; typeof() call on non-table
obj.__typeof exists only for "table" objects (see c4f1777a)
2022-11-10 07:32:30 -06:00
Chuck Craft b032a40fd9 IEEE 802.11: random addresses in conversations and endpoints
https://ask.wireshark.org/question/29235/
MAC addresses shown in WLAN statistics do not appear in the capture!

Initialize the address types then check if set when tapping.
2022-11-10 12:22:31 +00:00
Cody Planteen c34223ad62 VRT: add context packet support to VITA 49 dissector
Add complete decoding of CIF0 context packet fields per ANSI/VITA 49.2-2017
standard. Includes framework for future CIF1-CIF3 support with partial
implementation of CIF1.
2022-11-10 06:38:22 +00:00
John Thacker f9a5bf5805 WASSP: Don't add a NULL to a column
The result of try_val_to_str can be NULL, don't add a null address
to a column. Ensure that an appropriate unknown string is added
instead.

Fix #18613
2022-11-09 20:38:45 -05:00
Huang Qiangxiong 99e93e24b8 Protobuf: fix the bug about string format
Support string format like:
- 'a single quote string contains "a double quote string"'
- "a double quote string contains 'a single quote string'"

close #18599
2022-11-09 16:11:22 +00:00
Pascal Quantin 2a0061e445 EVS: improve info column display 2022-11-09 16:46:24 +01:00
Pascal Quantin 1196f214aa EVS: add an option to force decoding as Header-Full format only
Closes #18498
2022-11-09 16:12:17 +01:00
Alexis La Goutte 7f2006e744 ieee80211: Use FT_STRING for HS 2.0 OSU NAI
Fix 18610
2022-11-09 11:41:21 +00:00
Chuck Craft 085cbd27e1 pcapng: ws_debug - display option code in decimal 2022-11-08 22:15:44 -06:00
Gerald Combs 85357ae721 Fix more unused variables and enable unused-but-set-variable errors.
Add -Werror=unused-but-set-variable to our default compiler flags and fix

```
epan/dissectors/packet-dcerpc-frsrpc.c:709:10: error: variable 'nb_chunk' set but not used [-Werror,-Wunused-but-set-variable]
        guint32 nb_chunk = 0;
                ^
```

```
epan/dissectors/packet-dcom-oxid.c:175:13: error: variable 'u32ItemIdx' set but not used [-Werror,-Wunused-but-set-variable]
    guint32 u32ItemIdx;
            ^
```

```
epan/dissectors/packet-l2tp.c:1775:104: error: parameter 'ccid' set but not used [-Werror,-Wunused-but-set-parameter]
static int dissect_l2tp_ericsson_avps(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 ccid)
                                                                                                       ^
```

```
epan/dissectors/packet-ldp.c:1922:19: error: variable 'ix' set but not used [-Werror,-Wunused-but-set-variable]
    guint8        ix;
                  ^
```

```
epan/dissectors/packet-nas_5gs.c:4757:14: error: variable 'curr_len' set but not used [-Werror,-Wunused-but-set-variable]
    guint i, curr_len;
             ^
```

```
epan/dissectors/packet-per.c:1769:6: error: variable 'extension_addition_entries' set but not used [-Werror,-Wunused-but-set-variable]
        int extension_addition_entries;
            ^
```

```
epan/dissectors/packet-rtitcp.c:618:11: error: variable 'messages_count' set but not used [-Werror,-Wunused-but-set-variable]
    guint messages_count, offset;
          ^
```

```
epan/dissectors/packet-tcp.c:2130:9: error: variable 'ackcount' set but not used [-Werror,-Wunused-but-set-variable]
    int ackcount;
        ^
epan/dissectors/packet-tcp.c:3317:12: error: variable 'nbOptionsChanged' set but not used [-Werror,-Wunused-but-set-variable]
    guint8 nbOptionsChanged = 0;
           ^
```

```
epan/dissectors/packet-zbee-zcl-se.c:11802:15: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
    for (gint i = 0; tvb_reported_length_remaining(tvb, *offset) >= 5; i++) {
              ^
```

```
ui/iface_lists.c:142:23: error: variable 'linktype_count' set but not used [-Werror,-Wunused-but-set-variable]
    gint              linktype_count;
                      ^
```

```
ui/voip_calls.c:456:15: error: variable 'item_num' set but not used [-Werror,-Wunused-but-set-variable]
    guint     item_num;
              ^
```

```
file.c:572:17: error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable]
        guint32 count             = 0;
                ^
```

```
file.c:3667:24: warning: cast from 'const unsigned char *' to 'unsigned char *' drops const qualifier [-Wcast-qual]
        pd = (guint8 *)ws_mempbrk_exec(pd, buf_end - pd, pattern, &c_char);
                       ^
```

```
ui/qt/io_graph_dialog.cpp:1932:60: error: variable 'mavg_right' set but not used [-Werror,-Wunused-but-set-variable]
    unsigned int mavg_in_average_count = 0, mavg_left = 0, mavg_right = 0;
                                                           ^
```

```
ui/qt/stats_tree_dialog.cpp:166:9: error: variable 'node_count' set but not used [-Werror,-Wunused-but-set-variable]
    int node_count = 0;
        ^
```

```
ui/qt/models/profile_model.cpp:1142:13: error: variable 'entryCount' set but not used [-Werror,-Wunused-but-set-variable]
        int entryCount = 0;
            ^
```
2022-11-08 13:49:44 -08:00
Gerald Combs b662f565f0 STP: Remove an unused variable.
Fix

```
epan/dissectors/packet-bpdu.c:327:36: error: variable 'msti' set but not used [-Werror,-Wunused-but-set-variable]
  int   total_msti_length, offset, msti, msti_format;
                                   ^
```
2022-11-08 08:54:16 -08:00
John Thacker 526ccef5f4 per: Implement UTF8String properly
UTF8String is not a known-multiplier character string, since the
characters are variable width. That means that a size constraint
in characters doesn't correspond to a fixed number of octets, and
thus that constraints are never PER-visible. (X.691 27.6) That
includes size constraints, extensions, permitted alphabets, etc.
The length determinant is thus the unconstrained type, and always
at least an entire octet instead of ever taking up a smaller
number of bits.

Extract the string as UTF-8 after aligning as necessary, which
will deal with illegal encodings.

Fix #18600.
2022-11-08 07:05:42 -05:00
Dario Lombardo c2b59567d3 tshark: update man to explain why some fields are skipped in elastic-mapping. 2022-11-08 06:24:50 +00:00
Gerald Combs fd92228e54 capture: Remove an unused variable.
Fix

```
capture/ws80211_utils.c:328:6: error: variable 'bandidx' set but not used [-Werror,-Wunused-but-set-variable]
        int bandidx = 1;
            ^
```
2022-11-07 11:24:27 -08:00
John Thacker 3ec1e6ca59 afs: Validate vectorized strings
The RXStringV type has one character (octet) stored per 32
bit word. There's no real indication of the string encoding
(possibly locale dependent, maybe ASCII or UTF-8.) Validate
it as UTF-8 for now, to produce good UTF-8 and handle the latter
two cases.

Fix #18583.
2022-11-07 09:36:52 +00:00
Peter Wu df478a365d dfilter: treat carriage returns as whitespace
Fixes #18595
2022-11-07 01:00:50 +00:00
Stig Bjørlykke 16afad10fb Qt: Fix a deprecated warning
warning: 'parentWidget' is deprecated: Use parent() with qobject_cast()
instead [-Wdeprecated-declarations]
2022-11-06 22:33:25 +00:00
John Thacker f4965d5dec wmem: Make wmem_strbuf_utf8_validate endpptr param optional
Often we don't care about the last valid character, just if
the buffer is valid.
2022-11-06 21:11:36 +00:00
Gerald Combs 0928a25d1f GitLab CI: Switch to clang 15. 2022-11-06 10:33:09 -08:00
Gerald Combs 0bfe5bed72 [Automatic update for 2022-11-06]
Update manuf, services enterprise numbers, translations, and other items.
2022-11-06 17:57:36 +00:00
Pascal Quantin a1feafad6c IPv6: fix embedded IPv4 address dissection when using Well-Known Prefix
See https://www.wireshark.org/lists/wireshark-dev/202211/msg00000.html
2022-11-06 16:57:59 +01:00
Martin Gallo 0562fe46f6 SAPIGS: Added SAP IGS as main dissector 2022-11-06 14:27:25 +00:00
John Thacker 23f54390f1 hl7: Validate encoding
Translate the raw strings from the struct from ASCII before adding
to the columns.

Fix #18598
2022-11-06 06:23:45 -05:00
John Thacker 9a3d091933 mmse: Handle encoding
Use tvb_get_stringz_enc with ENC_ASCII instead of tvb_strsize
and tvb_memdup. Note that, in MMS encoding at least,
OMA-TS-MMS-CONF says that Text-string (where encoding is
not specified) is always US-ASCII.

For Encoded-string-values, get and process the MIBEnum charset,
at least when it's an integer (which OMA-TS-MMS-CONF says it
must be.)

Fix #18575
2022-11-06 05:29:56 -05:00
Martin Mathieson b860351e7f Packet List: preserve horizontal scroll extent for PgUp/PgDn 2022-11-05 21:56:19 +00:00
Michael Tuexen bcbd6c3974 sctp: add support for Zero Checksum Acceptable parameter 2022-11-05 20:27:36 +00:00
John Thacker d2f7b8907c wbxml: Fix encoding
Whenever a string is inline or retrieved from the string table,
it needs to use the document encoding. Not tvb_format_text
(which always assumes UTF-8, though that is the default for WBXML
if we don't know otherwise), and *definitely* not tvb_get_ptr.

Replace a bunch of calls of tvb_strsize and tvb_format_text
(and one tvb_get_ptr) with tvb_get_stringz_enc with the
document encoding, which is now stored in packet level proto
data. (There should be a fallback to parsing it from the
Content-Type string, if the calling dissector provides it.)

Fix #18573
2022-11-05 15:02:16 +00:00