Commit Graph

89893 Commits

Author SHA1 Message Date
João Valverde e2dff8eb27 Qt: Remove another plugin #ifdef 2023-12-11 16:01:30 +00:00
John Thacker edc7ebfcdb Qt: Don't fill in interfaces if we're just doing a caps query
Move the call to fill_in_local_interfaces to after checking for
an interface capabilities query.

We don't need to retrieve all the local interfaces if we're doing
a capabilities query and then exiting. The interfaces to query
are either specified on the command line, specified in preferences,
or picked as a default (interface "1"), none of which requires
filling in all the local interfaces and querying their capabilities
an additional time.

Part of #15082
2023-12-11 09:41:43 -05:00
John Thacker cc7f348b38 capture: Free capabilities automatically when the hash is destroyed
Use g_hash_table_new_full so that each capability in the hash table
is automatically freed instead of callers have to do so manually.
2023-12-11 09:15:34 -05:00
Martin Mathieson a57069a7ca CIP & PLDM: make some functions static 2023-12-11 13:56:26 +00:00
Martin Mathieson 2936f5c026 E2AP: add support for CCC RAN Function 2023-12-11 12:30:26 +00:00
Martin Mathieson 79d26352f2 GSM-MAP: use common tfs.c true_false_string 2023-12-11 12:29:23 +00:00
Martin Mathieson 66c4987948 RLC Graph: some improvements 2023-12-11 12:15:35 +00:00
Joakim Karlsson 3d5ac61f29 GTPv2: Dissect IE PGW Change Info Extendable 2023-12-11 08:30:02 +01:00
John Thacker 719ca70130 HTTP3: Use BASE_SHOW_ASCII_PRINTABLE for QPACK
The non-Huffman encoded QPACK bytes are added to the tree as
FT_BYTES, and they are expected to be probably printable
ASCII but treated as opaque data if not. That's
BASE_SHOW_ASCII_PRINTABLE, which makes the values a little more
useful in the tree.
2023-12-10 22:32:53 -05:00
John Thacker 88e5ae3d14 HTTP3: Use the Wireshark logging system
Move some of the less useful messages to ws_noisy, the rest to
ws_debug. (A few of the errors could be ws_info, which isn't
displayed by default either.)

Part of #19519
2023-12-10 23:43:10 +00:00
João Valverde 360cb3f40a plugins: Lower a log level
Avoid filling the fuzz test console with this message.
2023-12-10 22:51:27 +00:00
João Valverde 22c27f2dae Qt: Remove an #ifdef for Windows
Instead of pre-failing, allow the delete to fail.
2023-12-10 22:50:53 +00:00
João Valverde e3d23bfad4 Improve paragraph about the GPLv2 in the README
[skip ci]
2023-12-10 21:56:54 +00:00
John Thacker ae170d9b22 Logray: Only retrieve the extcap interfaces
Logray filters the interface list down the extcap interfaces,
so don't bother spawning dumpcap to retrieve the other interface
types. It's time consuming, and on Windows with NPcap installed
with administrator privileges, means unnecessary UAC prompts.
2023-12-10 14:31:25 -05:00
Gerald Combs ccb8a79bc2 [Automatic update for 2023-12-10]
Update manuf, services enterprise numbers, translations, and other items.
2023-12-10 16:24:43 +00:00
John Thacker 0c9cceebe3 Qt: Cache the capture interface list in Wireshark and Logray
Since global_capture_opts is always already init'ed in
scan_local_interfaces_filtered, call the get_iface_list
callback instead of the generic capture_interface_list there.

Cached the interface list returned from capture_interface_list
and store it in the MainApplication. On subsequent calls
to the capture opts get_iface_list callback, return the cached
list if it exists.

When Refresh Local Interfaces is called (either manually by the
user, or by a notification from iface_monitor), clear the cached
interface list and set it to NULL so that a new capture_interface_list
call will happen.

This prevents multiple privileged dumpcap calls when parsing
multiple interface options, or when retrieving the entire interface
list after having already done so to parse an interface command
line option.

Related to #15082
2023-12-10 13:01:02 +00:00
John Thacker 2e5f5ab645 HTTP3, QUIC: Desegment HTTP3 QPACK Encoder Streams
Return the number of bytes decoded and placed in the tree and
set pinfo->desegment_offset and desegment_len so that the QUIC
disssector can desegment the HTTP3 Encoder stream.

Pass that number of bytes to the nghttp3 decoder so that we don't
end up passing the same bytes twice with reassembly.

Make it so the QUIC data stream desegmenting code puts a link
to the frame data was reassembled in for segments that begin
an MSP as well in more cases, as the TCP dissector does.
(There are a few more cases TODO to produce results similar to
TCP.)

Fix #19475
2023-12-10 07:36:41 -05:00
Guy Harris 17d479f876 nflog: time stamps are in seconds/microseconds, not seconds/nanoseconds.
See

1. https://www.tcpdump.org/linktypes/LINKTYPE_NFLOG.html

2. The `nla_put(inst->skb, NFULA_TIMESTAMP, sizeof(ts), &ts))`
   call in net/netfilter/nfnetlink_log.c in the Linux kernel source.

Add support for 16-byte and 12-byte seconds/microseconds time stamp, to
match what we already have for seconds/nanoseconds time stamps, in
`proto_tree_add_item()` etc., and use that.

Fixes #19525.
2023-12-09 12:15:50 -08:00
John Thacker 2e288ae393 HTTP/3: Only decode a QPACK encoder stream on the first pass
Store the QPACK encoder stream state, such as the number of insertions
in the current segment and the total so far, and retrieve it on subsequent
passes. Passing the data to the nghttp3_qpack_decoder on subquent
dissections creates confusion and inaccurate results.

We don't have to memdup the buffer unless we're actually doing the
decoding.

We can later use this information in order to defragment QPACK
table insertion instructions that are split across QUIC packets.

Related to #19475
2023-12-09 13:10:37 +00:00
Guy Harris f50c46ea8c On *BSD, use a PF_ROUTE socket to get indications of new/removed interfaces.
This was brought up in issue #15950.

It doesn't fix that issue for other platforms such as Windows, Solaris,
and AIX.
2023-12-09 01:05:19 -08:00
John Thacker 7a6338c60c QUIC: Don't desegment and call app handles for 0-length stream segments
Don't bother trying to desegment and calling the subdissector indicated
by the app handle / ALPN for a zero length stream payload segment. It
won't work, and it messes up our methods of determining if desegmentation
is needed.

Revisit this is there ever is a protocol on top of QUIC that must
be called with a zero length payload segment.

Fix #19497
2023-12-08 20:42:14 -05:00
João Valverde 25bce48873 Qt: Fix plugins double-click/show in folder 2023-12-08 20:29:19 +00:00
João Valverde 12234b2064 Qt: Add back "Path" column to Plugins tab
It is still useful for now and not as redundant as I
initially assumed.

Partial revert of 51c6fa874d.
2023-12-08 16:35:56 +00:00
João Valverde bb09bed969 wslua: Add support for SPDX/URL/Description info 2023-12-08 16:35:48 +00:00
John Thacker 4db3e8f3f1 Capture: Check to see if the interface name is a Windows Named Pipe
Named pipes have special names on Windows
( https://learn.microsoft.com/en-us/windows/win32/ipc/pipe-names )
If we're on Windows, and the interface name given has such a name,
assume it is a pipe and don't bother retrieving the interface list.

Dumpcap and rawshark already have identical code for testing if an
interface name is a pipe. Move that into win32-utils and have
capture_opts, dumpcap, and rawshark all use the common function.

Fix #17721
2023-12-08 15:49:05 +00:00
João Valverde 0bcd2b6e6f wslua: Add a scope field to lua plugin description 2023-12-08 15:44:07 +00:00
João Valverde 5f6b5c40f4 plugins: Improve build with !HAVE_PLUGINS
Instead of not compiling plugins.c without HAVE_PLUGINS, we
should disable plugin support in a way that is functionally
the same as if the platform does not support it at runtime.

This reduces the number of ifdefs and allows sharing more utility
code for plugins.
2023-12-08 15:44:07 +00:00
Martin Mathieson 8db858b667 RLC-NR: Further fixes to tapping NACK_SN + ranges 2023-12-08 12:17:45 +00:00
João Valverde 47376298a5 plugins: Remove an assertion 2023-12-08 11:58:48 +00:00
João Valverde b1521550c6 plugins: Give higher priority to the personal folder
In general user customization should take higher priority
over system defaults. Do that here. This allows the user
to replace system plugins without much hassle.

We load the personal plugin folder first and lower the report
for a plugin found in multiple folders to a console log message
with log level "message" (so by default it will be displayed).
2023-12-08 11:47:19 +00:00
David Fort e0acd7ef1e rdp: add dissecting of relative mouse moves
Last MS-RDPBCGR spec contains new messages to send relative mouse moves in fastpath
packets. The patch add the dissecting of these new messages.
2023-12-08 10:55:53 +00:00
Martin Mathieson bfda80d230 check_typed_item_calls.py: Improve checks around items in bitmask calls 2023-12-08 09:20:02 +00:00
Martin Mathieson 8cda6390de Fix some issues around tapping RLC NR ACKs 2023-12-08 09:18:22 +00:00
Gerald Combs 9a9b2e114f GitLab CI: Make sure we set the ccache size in our fuzz jobs 2023-12-07 18:18:49 -08:00
Haiyun Liu a23e4fa086 Plugins: Fix the issue of duplicate scanning of the same directory
If the global plugins dir is the same as the users plugins dir,
Wireshark will prompt the warning "The plugin 'xxx' was found in
multiple directories".
2023-12-08 01:22:00 +00:00
John Thacker 5e370aa748 assa_r3: Dissect UPSTREAMFIELD_NOTUSED as an unknown type
Space is set aside in an array of hfs for UPSTREAMFIELD_NOTUSED (0),
presumably because that's easier than applying an offset to the
type value. However, an hf is never registered.

On 4.2 and earlier it ends up adding an empty "text only" field to
the tree, because the hfindex is initialized to zero (as a static
array). Since the hfindex 0 no longer corresponds to the text only
field (but means an unregistered field), the bug has been exposed.

There's already a FT_NONE field for an unknown type greater than
the maximum value. Let's use that for this type, which is also
contrary to spec.

Seen in fuzzed data (#19522)
2023-12-08 01:01:46 +00:00
João Valverde a7827322fc plugins: Rename "dfilter" to "dfunction" 2023-12-08 00:45:36 +00:00
João Valverde c76a28fca4 Qt: Add Install Plugin to Tools menu
Add an option to the tools menu to copy a binary plugin file
(a .dll or .so) to the personal plugin folder.

This avoids the user having to create the paths manually and
knowning a lot of relatively unimportant details about where and
how Wireshark loads binary plugins.

It will also try to validate the plugin and do some sanity checks to
ensure the ABI is compatible.
2023-12-07 22:58:33 +00:00
Anders Broman 158e104569 ITS: CAMv2 uses "pld" PathHistory defenition.
Add PathHistoryV2 to CPM-PDU-Descriptions for bacward compabillity.
Closes #19511
2023-12-07 16:58:48 +00:00
Dr. Lars Völker f5e25421a8 SOME/IP-SD: Adding expert info for StopSub/Sub combination
SOME/IP-SD sends out a StopSubscribe entry followed by a Subscribe
entry, if the previous Subscribe was not answered. This patch adds an
expert info to show that.
2023-12-07 15:44:39 +00:00
John Thacker 18a5b0976a Qt: Fix crash related to new TCP analysis pref
The selected rows the main window returns could be an empty list.
Check for that.

Fix #19521
2023-12-07 13:06:42 +00:00
Guy Harris 6ec6e5b545 Another check for a routine returning an error.
At least currently, it can only fail with "that pcap_t is activated,
this can't be changed", but we're calling it after it's been created
but before it's been activated.
2023-12-07 12:53:35 +00:00
Dr. Lars Völker c512da8b8b SOME/IP-SD: Adding expert info for Offer Service without Endpoints
Offer Service entries are the only entries that need to always reference
1 or 2 endpoints. Show expert info, if this is not the case!
2023-12-07 12:33:35 +00:00
Dr. Lars Völker 5b2533af87 TECMP: Adding support for ILaS data
Adding support for ILaS data.

Thanks to Mr. Hoffmann of Inova for approving the publishing of the code.
2023-12-07 12:32:34 +00:00
Martin Mathieson dd9e07ae6d MAC 3GPP Stats: treat all CRC errors as generic failures 2023-12-07 12:30:19 +00:00
Martin Kaiser 70497ac5f8 check_tfs.py: ignore utf-8 encoding errors 2023-12-07 11:55:21 +00:00
Guy Harris 2971ce995d Check for success of routines called between pcap_create() and pcap_activate().
Report failures of attempts to set various attributes between
pcap_create() and pcap_activate().

Make a routine not called outside capture/capture-pcap-util.c static.
2023-12-07 03:14:10 -08:00
Guy Harris c6e03be53a dumpcap: check whether pcap_stats() succeeds.
But what if it fails?  (Unlikely, but....)
2023-12-07 10:15:52 +00:00
Martin Mathieson e17a22df89 Fix some spelling errors 2023-12-07 09:38:27 +00:00
Chris Brandson 866de7bcde Zigbee display Smart Energy Fast Poll End Time as numeric and string
Thanks to Cole Wu <colewu9712@gmail.com> for the original implementation
2023-12-07 06:33:14 +00:00