Commit Graph

85312 Commits

Author SHA1 Message Date
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
Chuck Craft 5dfbc40b4b Qt: Analyze->Enabled Protocols search in enabled/disabled
Rearrange some of the code from ddb943bf so that searches in
`Only enabled protocols` or `Only disabled protocols` return
filtered results.
2022-09-29 11:14:17 +00:00
Jaap Keuter 3af1a21bfa TFS: Add a note how to fully handle additions to this file 2022-09-29 11:05:22 +00:00
João Valverde e854f14507 Fix Debian symbols
[skip ci]
2022-09-29 09:27:00 +01:00
Adrian Granados da978b8093 ieee80211: Fix Ruckus, Mist, and Aerohite vendor-specific dissectors
Makes sure "Unknown" is added to tree for unknown vendor-specific types.
2022-09-29 06:39:22 +00:00
Adrian Granados 1889b1f455 ieee80211: Add dissector for Alcatel-Lucent vendor specific IE
Dissector only supports type 1: AP Name.
2022-09-29 06:38:22 +00:00
Jaap Keuter b092fa05da Replace the last of PROTO_ITEM_ macro calls with function calls 2022-09-29 05:59:12 +00:00
João Valverde b982023107 epan: Use proto_*_ret_display_string() in a couple of places
Use a better pattern than formatting the string for display
multiple times.

Code is cleaner avoids wasteful calls to format_text() that can be
slightly expensive.

In some cases it might not have exactly the same whitespace semantics
for the column info (escape vs replace) but that's OK.
2022-09-28 22:13:32 +00:00
João Valverde 15634c0b46 Move format_text() to libwsutil and add unit tests 2022-09-28 21:44:27 +00:00
Alexis La Goutte fd97378da4 ISKAMP: Add VID Auto-Discovery Sender (Fortinet) 2022-09-28 21:19:19 +00:00
Jaap Keuter d3ab23d490 FCELS: one find_options conversion missed in 86fdbe2ea9 2022-09-28 20:29:15 +00:00
João Valverde 16e2aa42ee wslog: Activate message if domain is fatal
Without requiring extra options like --log-level or --log-domains.
2022-09-28 19:33:33 +00:00
João Valverde f2cc1f2382 epan: Add BASE_STR_WSP and use it
This field display type formats the representation string of
FT_STRING by replacing all space character with ' '.

Instead of "A line end\n" it will output "A line end ".

This allows cleaner code using proto_tree_add_item() and
avoids the problematic pattern

  proto_tree_add_string(..., tvb_format_text_wsp(...));

because we only want to affect the way the string value is displayed,
not the actual field value stored.
2022-09-28 19:32:46 +01:00
João Valverde 9345bcdae5 epan: Change signature of format_text()
Replace "const guchar *" with "const char *".
2022-09-28 19:28:28 +01:00
Gerald Combs 7d3a50a02e Qt: Fix our packet comment connections.
Use new-style connections for our packet comment actions. Fix our slots
to match 24a09965e6.
2022-09-28 10:19:31 -07:00
João Valverde b7d15d0767 wslog: Add option to make a list of domains fatal
Add a command line option --log-fatal-domains= and environment variable
WIRESHARK_LOG_FATAL_DOMAINS that aborts the programs if a domain in
the list is logged to.

Negative matches for fatal log domains not implemented for now,
pending a relevant use-case.
2022-09-28 17:14:44 +01:00
João Valverde ad66a854a0 wslog: Print to stderr with a null error handler
For some programs (e.g: unit tests) we want to init the logging
subsystem but having to pass an error output handler is overkill
and annoying.

In that case with a NULL handler printing to stderr by default is
almost certainly the best thing to do.
2022-09-28 14:56:16 +00:00
João Valverde 32befe119d Add a log domain for encoding errors and lower the log level
Using a warning is probably too exalted for the current state
of the code, where UTF-8 errors are somewhat expected from
dissectors that are lax about input validation.

Use a debug level with its own "UTF-8" domain instead.

Using a dedicated domain allows to filter on encoding errors and
with some enhancements to the logging subsystem make them fatal
for tracking and debugging purposes.

Using a dedicated domain might have other drawbacks but for now
it seems like the best approach.
2022-09-28 14:57:51 +01:00
John Thacker feb7f45179 gtp: Fix UE-AMBR and APN-AMBR with NSAPI IEs
The optional Authorized UE-AMBR for Uplink and Downlink
fields in UE-AMBR were never getting dissected.
Also, the trees and tree description for the UE-AMBR and
APN-AMBR with NSAPI IEs were swapped.
2022-09-28 01:26:46 +00:00
João Valverde cdfa3116d2 epan: Update format_text() API documentation 2022-09-28 00:47:25 +00:00
João Valverde d7b1a2b4a8 Fix Debian symbols 2022-09-28 01:25:59 +01:00
Harald Welte 2ca164446d gsmtap: fix dissection of LAPD-in-E1-in-GSMTAP traces
When the ability to dispatch GSMTAP E1/T1 frames to the LAPD dissector
was merged in August 2020, a recent July 2020 change earlier has
restructured and renamed the lapd dissector.  So at the time the GSMTAP
support for LAPD was added, the dissector was no longer called 'lapd'
and hence it never worked.

commit 75c739e4b7
Author: Guy Harris <gharris@sonic.net>
Date:   Sat Jul 25 02:20:10 2020 -0700
ISDN, LAPD: clean up the way they connect to other dissectors.

commit 132d6ec70b
Author: Harald Welte <laforge@osmocom.org>
Date:   Thu Aug 20 19:11:58 2020 +0200

Let's fix this by properly dispatching the LAPD frames from GSMTAP.
2022-09-27 22:55:06 +00:00
Gerald Combs 402bb0ee81 USB HID: Always use a format string.
Ensure that the second argument to wmem_strdup_printf is always a format
string.
Fixes #18384.
2022-09-27 22:39:28 +00:00
John Thacker d4327d42b0 GTPv2: Add Service Response Time statistics, similar to GTPv1
Add a Service Response Time table for GTPv2, similar to that
for GTPv1. Update the tshark docs to mention it.
2022-09-27 22:06:45 +00:00
Gerald Combs f011e75025 Qt: Use new-style syntax for signal & slots connected by name.
Change anything that matches

    grep -Eir '(signal|slot) *\( *on_action' ui

to new-style connections so that we can catch any future direct
connection conversion issues at compile time.

Change a connection from on_actionCaptureOptions_triggered to
showCaptureOptionsDialog and make showCaptureOptionsDialog public. Fixes
an issue introduced in fcdb77dc.
2022-09-27 21:43:05 +00:00
João Valverde 79d02af2b5 wmem: Remove a redundant ternary operator
wmem_strbuf_grow should set the correct size with regard to max_size,
if set. In any case passing the actual free "raw" size to g_strlcpy is
always the correct thing to do.
2022-09-27 19:01:18 +01:00
João Valverde 9c4a42c07c wmem: Rename some variables
Use length and size consistently. strbuf->len does not
include the terminating nul. strbuf->alloc_len includes
the terminating nul.

Use consistent language and use "length" to mean size without
nul byte and "size" to mean size with all bytes, including nul.
2022-09-27 18:59:00 +01:00