Commit graph

87744 commits

Author SHA1 Message Date
Matheus Eduardo Garbelini
014d17b471 PER: Fix dissect_per_null to always use length=0 2023-06-11 20:41:07 +00:00
John Thacker
086f4f1133 MSVC: Increase stack size to 8MiB, same as Linux and MacOS
The default stack size for the main process on most OSes we support is
8MiB, including Linux, MacOS, most UN*Xes.
The default on Windows (when compiled with MSVC) is 1MiB.

Increase the stack size on Windows to match the others.

We set some maximum recursion limits several places in the code, and
set a maximum frame size, and those rough calculations are easier
if we're using the same stack size.

All the TRY..EXCEPT code goes on the stack, so a stack overflow can
lead to not leaving a memory scope, which probably means a crash.

Fix #19090
2023-06-11 20:30:42 +00:00
AndersBroman
fe1f59db7b Update packet-rpc.c 2023-06-11 20:21:11 +00:00
Xavi Hernandez
72001ad04e RPC: Fix credentials decoding for GlusterFS
The decoding of the time inside the credentials was done incorrectly. The
order of the seconds and nanoseconds fields was reversed, and nanoseconds
was interpreted as a 32-bit value, but it's a 64-bit value.

This caused a decoding error that prevented to correctly dissect GlusterFS
packets.
2023-06-11 20:21:11 +00:00
David Perry
1bd8e05f54 tshark: show field abbrevs matching a prefix 2023-06-11 20:16:03 +00:00
Gerald Combs
80abaa6f2d Resources: Update the logo
Resize the document to match the logo size. Add a text path layer.

[skip ci]
2023-06-11 19:52:17 +00:00
John Thacker
ab2b446e69 ALC/LCT, LLS/SLT: Update includes
Need to explicitly include wiretap/wtap.h and wsutil/inet_addr.h
in dissectors now.
2023-06-11 18:02:17 +00:00
John Thacker
d5b3cdacd6 wsutil: Optimize unaligned pointer access for MSVC and icc
Matt Godbolt's Compiler Explorer is a useful tool for examining
what compilers actually do.

gcc and clang recognize our portable (shift-and-mask) version of
retrieving possibly unaligned values from a pointer in either
Endianness and, at -Os at higher, optimize them appropriately over
a wide variety of architectures, doing better with more recent
versions.

However, even the latest versions of MSVC and icc (both the now deprecated
Intel C++ Compiler "Classic" as well as the new LLVM based version) do not,
They do, however, optimize the memcpy based approach appropriately. The
latter, unfortunately, requires picking the right byteswap intrinsics and
avoiding treating clang-cl and icc on Windows as MSVC, since both define
_MSC_VER in the same way that they define __GNUC__ when compiling on Linux.

So for MSVC and icc and icx, use the algorithm that they manage to
optimize correctly, and use the portable version for all other
compilers, some of which (like gcc and clang) will optimize correctly.
2023-06-11 17:59:58 +00:00
Eugène Adell
d00468742f TCP: Zero Window Probe ACK detection for improper clients 2023-06-11 17:11:26 +00:00
Gilbert Ramirez
acbc327faf Change how the packet dedup structures are handled during a live capture 2023-06-11 17:01:55 +00:00
Sergey V. Lobanov
04257d928a ALC/LCT, LLS/SLT: Add ATSC3 support 2023-06-11 16:59:45 +00:00
Gerald Combs
952a3163c2 [Automatic update for 2023-06-11]
Update manuf, services enterprise numbers, translations, and other items.
2023-06-11 16:23:00 +00:00
Martin Mathieson
e0582e1fb1 JSON 3GPP: Fix typo in display filter for EnATSSS 2023-06-10 22:46:44 +00:00
Alexis La Goutte
c2ecbe58d9 bgp: fix warning found by check typed items call 2023-06-10 21:57:49 +00:00
Alexis La Goutte
75cf1d52e5 rdp(drdynvc): fix typo 2023-06-10 21:51:36 +00:00
Alexis La Goutte
ff920f63ea rdp(drdynvc): fix indent 2023-06-10 21:51:36 +00:00
Alexis La Goutte
fa8cd1fac0 rdp(drdynvc): move value_string to top of file 2023-06-10 21:51:36 +00:00
Alexis La Goutte
8aaaded984 rdp(drdynvc): fix Dead Store found by Clang Analyzer 2023-06-10 21:51:36 +00:00
Jeremy Kerr
0795031692 epan: fix MCTP address string length
We need 3 chars for a decimal MCTP address (1-255), not two.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
2023-06-10 21:49:14 +00:00
Johnathan Raymond
54897d8c06 sharkd: Add Multicast streams output 2023-06-10 21:45:21 +00:00
Gerald Combs
049a89b2ce CMake+Windows: Use "x64" instead of "win64"
Use "x64" to refer to "Windows running on 64-bit Intel processors". Get
rid of WIRESHARK_TARGET_PROCESSOR_ARCHITECTURE in favor of
WIRESHARK_TARGET_PLATFORM because the latter is shorter.
2023-06-10 21:41:27 +00:00
Joakim Karlsson
46f5f7a31f JSON 3GPP: add TS 29.525 ch5.8 Feature negotiation support 2023-06-10 21:39:35 +00:00
Martin Mathieson
fa35313f46 check_spelling.py: ignore ghz quantities 2023-06-10 19:22:41 +01:00
Martin Mathieson
cb20d4a192 UDPCP: fix indentation 2023-06-10 16:49:00 +00:00
Martin Mathieson
82f4fd84e0 .tools/check_tfs.py: Tighten up check for vals->common tfs 2023-06-10 15:40:19 +00:00
Alexis La Goutte
c251ec9989 wifi-nan: fix wrong offset for NAN availability
Fix 19129
2023-06-09 19:36:35 +00:00
John Thacker
a3806fc69b Qt: Fix crash when changing dfilter macro
The comments claim that UAT_AFFECTS_FIELDS also triggers a redissection,
but it does not. Fortunately, all UATs whose flags have UAT_AFFECTS_FIELDS
also have UAT_AFFECTS_DISSECTION.

dfilter macro expressions are a rare case of a UAT that should trigger
FieldsChanged but not PacketDissectionChanged. (It's slightly
unnecessary to invalidate the custom columns, but perhaps in the
future macros will be possible in custom columns.)

So resolve things by changing the comments to reflect current reality
and making the dfilter macro UAT flags UAT_AFFECTS_FIELDS.

This prevents a crash when removing a dfilter macro thus invalidating
the current filter, and then opening a file (including reloading the
current one.)

Fix #13753
2023-06-09 15:34:44 +00:00
John Thacker
81c3ade8a3 Qt: Remove now unnecessary, crash-prone ByteViewTab tvb_memeql
This code path is no longer necessary because in the PacketDialog
case a separate fixed epan_dissect_t is now passed in
and save (9198448f9d)

Removing the tvb memory comparision is faster and reduces the number
of ways that the PacketDialog can crash after the capture file is
closed, for tvbs with data that was allocated at file scope, or
freed when the file is closed like reassembly.

Related to #14363
2023-06-09 15:07:50 +00:00
Joakim Karlsson
670002cab6 pfcp: add media_type handle
according to TS 29.502, Table 6.1.6.4.1-1: Binary Data Types, pfcp can be sent trough
HTTP multipart message
2023-06-09 14:03:19 +00:00
João Valverde
0b27d3e584 MinGW+NSIS: Remove the Fedora hard-coded cross-build sysroot
Introduce a MINGW_SYSROOT cache variable and --sysroot Python
script option so the installer can be built in other
distributions that do not use Fedora's layout.

Add a few other DLLs and use some shell globs, tested on an
Arch Linux host.

The dependency list should be generated dynamically but we're not
there yet.
2023-06-09 13:58:24 +00:00
João Valverde
5e0c35df51 CMake: Use USE_REPOSITORY with FindWSWinLibs.cmake
This CMake module is specific to Wireshark's 3rd party Windows
repository so make use the correct variable for that, so this
isn't activated in Windows builds that do not use the reppsitory.
2023-06-09 13:57:52 +00:00
João Valverde
f8f85cb9ad CMake: Modernize Qt6 configuration
Use the new COMPONENTS feature of find_papckage() to configure
Qt6. Leave Qt5 using the old method.

In the past using target_link_libraries() with an OBJECT library
wasn't fully supported but I think we are now requiring a modern
enough CMake version.

Besides being cleaner and more modern this also fixes some detection
problems I am experiencing[1].

[1]https://bugreports.qt.io/browse/QTBUG-95791
2023-06-09 13:57:33 +00:00
Ismael Mendez Matamoros
857c08ae26 RTPS: New RTPS elements introduced by Dynamic Certificate Renewal & Revocation
Added dissection of field Secure Data Header's Transformation Key
Revision Id and flag Key Revisions Enabled.
2023-06-09 09:05:24 +00:00
Gilbert Ramirez
68526daf24 Add packet dedup support for live captures too 2023-06-09 07:21:08 +00:00
Gilbert Ramirez
d2c9f1824a Add a preference for ignoring duplicate frames
Sometimes you have a capture file that has many duplicate frames
because of how the capture was made, and its convenient to ignore
the duplicates so you can concentrate on the data and not all
the TCP warnings.

This adds a preference in the "Protocols" section to ignore
duplicates. This currently only works while reading a capture file
*not* during a live capture.
2023-06-09 07:21:08 +00:00
Alexis La Goutte
620828b945 .mailmap: Update AUTHORS 2023-06-09 07:18:24 +00:00
Joakim Karlsson
9d81e79b92 JSON 3GPP: add TS 29.512 ch5.8 Feature negotiation support 2023-06-09 08:39:00 +02:00
Jeff Morriss
aa8c656783 Add an ID3v2 dissector.
Call it from the mpeg-audio dissector.

Fixes #17991.
2023-06-08 22:35:13 +00:00
Gerald Combs
0757c09a01 Qt: Start adding "Event" support to I/O Graphs
Add a default configuration for Logray. Show "Events" instead of
"Packets" in a couple of places.
2023-06-08 15:02:28 -07:00
Gerald Combs
12b5e4fdfc Falco bridge: Add a missing include
Include wsutil/inet_addr.h.
2023-06-08 20:49:33 +00:00
João Valverde
89e17c19ac Add missing #ifdef HAVE_LIBPCAP guard
Fixes Windows builds without *pcap.
2023-06-08 21:13:40 +01:00
John Thacker
aa8146d181 TLS: Export only actually used secrets
The secrets maps in [D]TLS include all the values from the configured
keylog file, plus anything from a DSB, and any master secrets computed
at runtime. However, not all of them may be used.

Mark which Client Randoms (and, for [D]TLS <= 1.2, Session IDs used
to compute master secrets) are used, and only export secrets associated
with those. This saves a time consuming operation to do so outside of
Wireshark.

"Export TLS Session Keys" now exports TLS 1.3 derived keys, since
now it is useful for filtering a larger keylog file for the values used.

In the future, the string returned from this function can be used to
write a DSB to the file.

Related to #18400
2023-06-08 12:57:28 +00:00
Laurent Fasnacht
52289c74c8 haproxy protocol: fix TLV parsing
The haproxy header length *doesn't include* the 16 byte haproxy header.

To make it more intuitive, we use the next_offset value, instead of adding
16 to the header length at every check (it also improves the clarity of the
code, since the expert info also uses that value if the header is too
short).
2023-06-08 12:25:18 +00:00
Laurent Fasnacht
2b582068d3 haproxy protocol: add support for PP2_TYPE_UNIQUE_ID TLV 2023-06-08 12:25:18 +00:00
John Thacker
1744ce4a0f epan: Add ENC_BOM modifier for UTF-16, UCS-2, UCS-4
Add ENC_BOM to the list of bitflag modifiers, and use it with
UTF-16, UCS-2, and UCS-4 (UTF-32). If set, this means that the
first 2 (or 4) octets, if present, are checked to see if they are
a Big-Endian BYTE ORDER MARK ("ZERO WIDTH NON-BREAKING SPACE"). If so,
those octets are skipped and the encoding is set to Little-Endian
or Big-Endian depending on endianness of the BOM.

If the BOM is absent, the passed in Endianness flag is used normally.

Related to #17991
2023-06-08 11:25:54 +00:00
John Thacker
bda350d8fd Don't have every dissector include wtap.h
The header for frame_data can forward declare an incomplete type
for wtap_rec, since it only takes a pointer to it.

This prevents every dissector from automatically including
wiretap/wtap.h

Add wiretap/wtap.h to some dissectors that need it.

Remove it from some other dissectors that had the explicit include
but don't actually need it.

A few other dissectors actually need wsutil/inet_addr.h but were
getting that via wtap.h - include what they actually need.

This reduces the number of files that are recompiled when
wiretap/wtap.h is touched from ~2500 to ~800.

Note that most of the dissectors that still include wiretap/wtap.h
really only need to use a WTAP_ENCAP_ value, and most of the rest
just need a pseudoheader. Those could be moved into another wiretap
include to further reduce recompilation.

Related to #19127
2023-06-08 11:05:42 +00:00
João Valverde
a82d5b56d1 WSDG: Amend some section titles (quick setup)
Make them subjectively better in terms of clarity and simplicity.
2023-06-08 07:50:07 +00:00
João Valverde
3586dcf61d WSDG: Update test documentation to reflect the latest changes 2023-06-07 18:25:14 +01:00
Martin Mayer
28c3b0dffa OCP.1: Make var initialization consistent
Initialize all vars of struct explicitly as 0 (zero).
2023-06-07 17:09:43 +00:00
Gerald Combs
387eaec32d Docs: Adjust our Asciidoctor page number settings
Try to make it so that we generate page numbers in our PDF output but
not elsewhere.
2023-06-07 16:04:41 +00:00