Commit Graph

85538 Commits

Author SHA1 Message Date
João Valverde f6de88707c Add DIAG_WARN() diagnostic macros
This enable the warning at "warning" level (neither ignored nor
an error). This is used to selectively disable -Werror for a section
of code but keep the warning enabled as useful and relevant.

For example it can be used to defer replacing deprecated declarations
and still build with -Werror enabled globally.
2022-10-04 17:35:55 +00:00
Pascal Quantin 1ef5af31ce LTE RRC: upgrade dissector to v17.2.0 2022-10-04 17:34:17 +00:00
João Valverde 35c06ad742 CMake: Fix Qt -Werror compilation flag
All source files should have COMPILE_FLAGS applied, not just
ui/qt/*.cpp.

This fixes setting -Werror on the Qt build, since that is
the only custom C++ compilation flag we are using at the moment.
2022-10-04 17:08:31 +00:00
João Valverde ec54b1c611 Qt: Fix deprecation of QByteArray::count()
Use size() instead, which is exactly the same as count(), and
is not deprecated. Seems to exist in all out supported Qt
versions, as far as I can tell.

warning: ‘qsizetype QByteArray::count() const’ is deprecated: Use size() or length() instead. [-Wdeprecated-declarations]
  257 |     while ((int) (row_y + line_height_) < widget_height && offset < (int) data_.count()) {
      |                                                                           ~~~~~~~~~~~^~
2022-10-04 17:08:31 +00:00
João Valverde 9acfcd1f9b Qt: Fix setTextAlignment() deprecation
Cast away bogus deprecation created by deprecating
setTextAlignment(int, int) without fixing textAlignment()
to not return int.

```
error: ‘void QTreeWidgetItem::setTextAlignment(int, int)’ is deprecated: Use the overload taking Qt::Alignment [-Werror=deprecated-declarations]
  597 |             wn_ti->setTextAlignment(col, ws_dlg->statsTreeWidget()->headerItem()->textAlignment(col));
      |             ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtWidgets/qtreewidget.h:105:17: note: declared here
  105 |     inline void setTextAlignment(int column, int alignment)
      |                 ^~~~~~~~~~~~~~~~
```
2022-10-04 17:08:31 +00:00
João Valverde f0a633622d Qt: Remove workaround for Qt bug fixed in Qt 5.5.1 2022-10-04 17:06:54 +00:00
Stig Bjørlykke 4512dfd66d wslua: Support FT_STRINGZPAD in FieldInfo
Add support for FT_STRINGZPAD in FieldInfo.
2022-10-04 15:28:18 +00:00
Pascal Quantin 34eebaeb10 LPP: upgrade dissector to v17.2.0 2022-10-04 14:59:37 +00:00
Pascal Quantin 6a0a153226 NR RRC: register a dissector by name for Reconfiguration Complete
Closes #18406
2022-10-04 14:57:55 +00:00
Ming Chen 01a3a19e15 Add copy as a Base64 string 2022-10-04 12:36:25 +00:00
Pascal Quantin 2c40dc97cd NAS 5GS: upgrade dissector to v17.8.0 2022-10-04 14:08:17 +02:00
Joakim Karlsson 00f4f4ee7d JSON: add seperate 3GPP file
Moving specific 3GPP keys handle to its own file
This will also enable custom JSON string dissector
2022-10-04 10:48:08 +00:00
João Valverde 0239242fb1 wslog: Improve help output 2022-10-04 11:16:42 +01:00
João Valverde 481d3cb804 wslog: Do not leak memory 2022-10-04 10:56:40 +01:00
Alexis La Goutte ede10ccc26 ISAKMP: Add IKEv2 notification (Private) type for Auto Discovery and Network Overlay ID (Fortinet) 2022-10-04 06:43:20 +00:00
garrymar 603cbd82ad Mixed-up interpretation of bgp.ext_com.type.auth 2022-10-04 06:09:27 +00:00
John Thacker 333fe08bb3 gtp: Use ENC_APN_STR for decode_apn
Using ENC_APN_STR is simpler and guarantees that we produce
valid UTF-8. Fix #18402
2022-10-03 21:18:42 -04:00
Gerald Combs ca0843f168 falcodump: Fixup our help output. 2022-10-03 15:09:55 -07:00
Gerald Combs b5b1949c5e falcodump: Updates for libsinsp and the cloudtrail plugin.
The libsinsp plugin API recently changed the way plugins are opened.
Update falcodump to match.

Plugins might return a nested and "$ref"ed config schema. Update our
parsing code to match.
2022-10-03 14:24:24 -07:00
Patricia Lindner ddf0d35516 BPv7: Enhance block data and payload data handling
This change improves sequence analysis and subdissector interfaces, adds
payload Decode As support for DTN and IPN services, and add heuristic
dissection for BTSD.
2022-10-03 20:02:43 +00:00
Chuck Craft 58cb2d6857 wsdg: PortableApps - update project path; drop 32-bits 2022-10-03 11:26:06 -05:00
João Valverde 241610b13f RPC: Do not truncate string blindly
The code is mixing character offsets with byte offsets. Do not
blindly truncate an UTF-8 string on a random length, it is likely
to be wrong and generate encoding errors.

Rename some variables for clarity.

Fixes #18399.
2022-10-03 12:50:33 +01:00
j.novak@netsystem.cz e091e8755a extcap: Fixed end application loop logic 2022-10-03 10:16:57 +00:00
Joakim Karlsson 4026590bd0 pfcp: Update to 3GPP TS 29.244 V17.6.0
Mostly documentation changes in this release
2022-10-03 09:38:50 +02:00
Guy Harris eba9adfa23 macos-setup: fix a test.
The syntax

    if [ <test> ]; then
        ...
    fi

isn't what one might think.  The way that works is that "[" is a
command; it's an alias for "test", except that if it's involked as "["
rather than as "test", it expects there to be a token "]" at the end, so
that the test expression is enclosed in square brackets.  (This dates
back all the way to, I think, V7, although the link from "/bin/test" to
"/bin/[" wasn't documented at that point.)

This means that the "]" must have white space before it, so it's a
separate token.

[skip ci]
2022-10-02 18:30:32 +00:00
João Valverde 539fbafce4 Remove encoding warnings from format_text()
The use of format_text() to sanitize strings by dissectors is
too widespread to make this check useful. Allow it for now.
2022-10-02 18:01:35 +00:00
João Valverde 0bc040b44a Tools: Test for UTF-8 errors in fuzz tests
Can be turned off with -U option.
2022-10-02 18:01:35 +00:00
Gerald Combs 45c6c79624 [Automatic update for 2022-10-02]
Update manuf, services enterprise numbers, translations, and other items.

services failed.
2022-10-02 16:43:23 +00:00
João Valverde afa2579124 Qt: Fix compilation with Qt 6.4
error: conversion function from 'gchar *' (aka 'char *') to 'QVariant' invokes a deleted function
            return entry->hostname;
                   ^~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qvariant.h:199:5: note: 'QVariant<char *, false>' has been explicitly marked deleted here
    QVariant(T) = delete;
    ^
2022-10-01 21:53:11 +01:00
Chuck Craft c4c38defa5 Qt: enabled/disabled protocols filtered list enable/disabled
Follow up to !8151
Calls to setData are wrapped with beginResetModel/endResetModel
so don't call emit dataChanged() (per Qt suggestion)

Fixes "As the loop is worked, the size of the parents shrinks
 with each item processed."
2022-09-30 22:46:16 -05:00
Jérôme Pouiller 692f959025 Add Wi-SUN OUI
For now the Wi-SUN OUI is not yet used.
2022-09-30 18:37:13 +00:00
Jérôme Pouiller a1e2f3b3f5 ieee80211: Fix EAPOL dissector for Wi-SUN
In section 6.5.2.3 ("PTK and GTK Installation Flow"), the Wi-SUN
specification says that the second message in 4 way handshake must have
these properties:

  Descriptor Type = 2
  Key Information:
      1. Key Descriptor Version = 2
      2. Key Type = 1 (Pairwise)
      3. Install = 0
      4. Key Ack = 0
      5. Key MIC = 1
      6. Secure = 0
      7. Error = 0
      8. Request = 0
      9. Encrypted Key Data = 0
      10. SMK Message = 0
      11. Reserved = 0
  Key Length = 0
  Key Replay Counter = see [IEEE802.11] section 11.6.2.
  Key Nonce = SUP generated SNonce
  EAPOL-Key IV = 0
  Key RSC = 0
  Key MIC = MIC(KCK, EAPOL) computed over the body of this EAPOL-Key frame
  with the Key MIC field first initialized to 0.
  Key Data Length = 0
  Key Data = none

Thus, until now, the message 2/4 of 4 way handshake was identified as
message 4/4.
2022-09-30 18:37:13 +00:00
Anders Broman 0f296eb3f9 JSON: Add New SupportFeature Negotiation Bits 3GPP TS 29.512 V17.7.0 2022-09-30 14:32:46 +00:00
Chuck Craft f45b1c5f25 wsdg: nocheck (no pytests) when building debian packages 2022-09-30 14:22:35 +00:00
Joakim Karlsson 1a448d449a pfcp: remove session tracking faulty SEID conversion 2022-09-30 14:19:40 +00:00
Roland Knall 7c8c615efd C-Ares: Move library to 1.13
1.13 is the maximum library for RHEL 8, therefore moving down a
version to ensure compatibility
2022-09-30 14:50:06 +02:00
msweant 312efbd483 IEEE 802.11: Add Operating Class Indication Lookup
packet-ieee80211.c has the IEEE 802.11w-2009 class
indication lookup table included already but it's only
used to resolve the WFA HS2.0 OCI attribute when it
could also be used to resolve beacon/probe response tag
59.  Adding that resolution and renaming the RVAL struct
from hs20_oper_class_rvals to simply oper_class_rvals.

Closes #18389
2022-09-30 05:48:45 +00:00
John Thacker 67b4650559 fc: Fix Service Response Table
The lun value is stored in the tree on the first pass. Do
the lookup when it's not the first pass.

Also add the display filter to the SRT table so that the GUI
generated filters work properly.

Fix #16084.
2022-09-30 00:16:51 -04:00
Leonard Penzer 28c8238845 GIOP: Fix formatstring for MacOS build
Use "%" PRI64d or "%" PRI64u  instead of %ld or %lu to fix build
problems on MacOS introduced by 32c2ab79 (MR 8153)
2022-09-29 17:09:47 +00:00
Gerald Combs 8109332ffa epan: Add an XML buffer limit.
Try to fix

```
*** CID 1515532:  Memory - corruptions  (OVERRUN)
/builds/wireshark/wireshark/epan/print.c: 1859 in print_escaped_xml()
1853                 } else {
1854                     temp_buffer[offset++] = *p;
1855                 }
1856             }
1857             if (offset > ESCAPED_BUFFER_MAX-8) {
1858                 /* Getting close to end of buffer so flush to fh */
>>>     CID 1515532:  Memory - corruptions  (OVERRUN)
>>>     Overrunning array "temp_buffer" of 256 bytes at byte offset 260 using index "offset" (which evaluates to 260).
1859                 temp_buffer[offset] = '\0';
1860                 fputs(temp_buffer, fh);
1861                 offset = 0;
1862             }
1863         }
1864         if (offset) {
```
2022-09-29 16:45:57 +00:00
Gerald Combs 28a26096fb falcodump: Add support for selection options.
If a plugin has an "enum" + array in its configuration, convert it to a
selector option.

Start adding plugin sections to the falcodump man page.
2022-09-29 16:44:21 +00:00
Gerald Combs 91bb68c86a Qt: Set a minimum width for our stream spinboxes.
Set a minimum width for the stream and substream number spinboxes in the
"Follow" and "TCP Stream Graphs" dialogs. This provides a larger click
target and should make editing easier.
Fixes #18265.
2022-09-29 16:42:56 +00:00
Joakim Karlsson e0c563c71e pfcp: Use a map for mapping from <seid,address> to frame
For PFCP session tracking (off by default), there's a mapping
from <SEID, ADDRESS> to frame numbers. The current implementation
is a tree (converting the address to a string for keys) of linked
lists of the SEIDs. That gets very slow when there's a large number
of SEIDs. Convert it to a map that uses the seid and address,
with the SEID used for the hash.
There's still a reverse lookup (foreach_remove) when SEIDs are reused
or sessions fail, but this still yields over a 10x speedup on a
few moderate sized test files (~50000 PFCP packets).

See 1ccf4f3c for reference
2022-09-29 15:46:38 +02:00
Joakim Karlsson 68f77cb2aa pfcp: Use direct hashing in the session table
The session table maps frames (which are 32 bit uints that
start at 1) to sessions (which are also 32 bit uints that
start at 1), so use GUINT_TO_POINTER and the direct hash
functions instead of creating extra file scope pointers.

see 8129b9de for reference
2022-09-29 13:29:08 +00:00
Thomas Wiens 167ac34448 s7comm: Dissector improvements with some new functions and restructuring
Add some new protocol functions, which needed changes in the existing
structure of the parameter part.
New protocol functions are USEND, AR_SEND, and a basic dissection of
Data record routing. Changed detection of mode transition events. USEND
and mode transition events need a special handling (it's all reverse
engineered, so it's still not 100 percent correct).
Renamed "Prog" to "TIS" (Test and installation), and "Push" to
"Indication" to use some of the official terminology.
Cleanup of comments due to the changes, and remove some obvious ones.
2022-09-29 11:44:05 +00:00
Anders Broman 8355f75603 CBOR: Fix duplicated filter names. 2022-09-29 11:41:45 +00:00
Jonas Blust 32c2ab79a7 GIOP and idl2wrs: Implementation of Any type and fixes and improvements for idl2wrs 2022-09-29 11:40:44 +00:00
Jaap Keuter d8983b54ba Qt: plug resource leak in error path (CID-1504598) 2022-09-29 11:35:39 +00:00
David Perry 0e9e35cd29 Use `register_dissector()` for more protocols 2022-09-29 11:21:10 +00:00
David Perry b2ace05edc TRANSUM: claim 0 bytes of packet data
The TRANSUM post-dissector performs timing analysis, and does not
dissect any of the packet data; all its calls to `proto_tree_add_foo()`
claim 0 bytes. So this fix claims 0 bytes for the overall TRANSUM
protocol tree as well.

Fixes #18241
2022-09-29 11:17:36 +00:00