Commit Graph

82050 Commits

Author SHA1 Message Date
Martin Mathieson fb6aa10c12 ORAN FH CUS: avoid undefined shift in block fp decompress
Fixes #17552
2021-09-02 15:43:36 +00:00
Dario Lombardo 2e9f33fe09 file_wrapper: fix compilation without LZ4. 2021-09-02 15:17:05 +00:00
Chuck Craft 2be72076f0 f5ethtrailer: greedy conversation filters 2021-09-02 14:07:45 +00:00
Martin Mathieson 124f7ce798 ORAN FH CUS: Add C SectionType=6 2021-09-02 12:11:43 +00:00
Marius Preuten e5e37add9a 802.11 Decrypt: Fix AAD Calculation when HT-Control present in a QoS Data Frame
The current implementation misses an edge case, where bit 15 of the FC Field
must be zeroed in case a QoS Control field is present (IEEE 802.11 12.5.3.3.3),
which results in a wrong AAD and subsequently in the failure of the packet
decryption for QoS Data Frame carrying a HT Control Field (indicated by bit
15 set to 1).

In addition the field 14 must be 1, which is ensured explicitly (the author is
not sure if the code is reachable by frames which do not have bit 14 set to
one).
2021-09-02 10:56:02 +00:00
Alexis La Goutte cfc60b3f6e thrift(.h): Fix Warning about -Wdocumentation
remove extra : after each variable
2021-09-02 10:26:59 +00:00
Anders Broman 062994e089 GSM MAP: Handle Version 1 of ResetArg
Closes #17549
2021-09-02 09:36:44 +00:00
Guy Harris e998a4cc02 Clean up handling of buffer size/offset/etc. types.
Use guint for them, and don't let the buffer sizes get bigger than 2^30,
so they all fit in a guint.
2021-09-02 02:14:28 -07:00
John Thacker 4091b31444 IEEE 1722/AVTP: Update Compressed Video Format
Call existing MJPEG and H.264 dissectors for those subtypes,
and remove duplicate fields. Use common true_false_string.
Warn about invalid length, and only process the payload length
show in the payload field, allowing for Ethernet FCS autodetection,
among other things. Register the MJPEG dissector by name so
that AVTP CVF can call it. Add some value string entries to the
MJPEG dissector.

When the format value is reserved, ignore the subtype field
and add expert info and show the payload as data. (IEEE 1722-2016
8.3.2) Fix #12490
2021-09-01 21:03:35 -04:00
Erik Rigtorp 341a9d099c Fix build for debian and macOS 2021-09-01 23:16:59 +02:00
Erik Rigtorp 5844c469f0 Add support for ZSTD and LZ4 decompression
- Describe zstd and lz4 support in man pages
- Update AUTHORS
- Update mime types to recognize zstd and lz4
2021-09-01 20:59:07 +02:00
Dr. Lars Völker 3f92ae9db9 IEEE1609dot2: fix missing import (BUGFIX)
Closes #17568
2021-09-01 20:09:56 +02:00
Gerald Combs 348d356594 Packaging: Update the macOS notarization failure error message.
Apple provides a status page for various developer services at
https://developer.apple.com/system-status/, including the status of the
Developer ID Notary Service. Show the URL notarization fails so that
troubleshooting is easier.
2021-09-01 10:24:58 -07:00
Gerald Combs 5893d3cd09 CMake: Fix tests.
Pass $<TARGET_FILE_DIR:wmem_test> to test.py, which should be the path
for all of our built executables, instead of ...:tshark, which is the
path for *some* of our built executables on macOS.
2021-09-01 09:31:07 -07:00
Ugur ILTER 43d2655f16 ieee1905: fix dissection of DPP messages
- Handle 'Category' field under 'Encapsulated Frame' field inside 1905 Encap DPP TLVs

![incorrect](/uploads/be54a9e6757aacbccb3625b4aa11db9b/incorrect.png)

![correct](/uploads/285b14d3945c2821ba3606e7da7ae94d/correct.png)
2021-09-01 13:08:21 +00:00
Anders Broman 9cf6caee62 Thrift: Fix warning about unused variable.
/epan/dissectors/packet-thrift.c:1619:9: error: ‘type_pi’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
2021-09-01 13:53:55 +02:00
Alexis La Goutte 875d607892 Aruba(IAP): Add IAP-635 (Norma) 2021-09-01 08:44:54 +00:00
Gerald Combs 4d1357eebe CMake: Get rid of WS_PROGRAM_PATH
Use the $<TARGET_FILE_DIR:tshark> generator expression instead.
2021-09-01 07:16:20 +00:00
John Thacker b04165a57b DVB-S2: Only create composite if used
It violates the tvb_composite API to create composite TVBs if
they're not going to have at least one TVB put in them. Prevent
dissector bug failed assertions in the case of packets incorrectly
identified as DVB Baseband frames carrying TS by the heuristic
dissector.
2021-09-01 07:00:16 +00:00
Tomas Kukosa 033068916d ITS: use custom value format for CPM elements 2021-09-01 06:44:20 +00:00
Evan Huus cdfab0d6e9 tvbuff: convert helper methods to pinfo->pool
A few of them just needed scratch memory, so allocate and free it
manually after doing any exception-raising checks.

A few others were returning memory, and needed conversion to accept a
wmem scope argument.
2021-09-01 03:54:52 +00:00
Adrian Ratiu 61e66c37ab cmake: lemon: allow overriding lemon CC setting
When cross-compiling wireshark the lemon tool should be built
using the host machine compiler to be run on the host. Before
cmake this was done via autotools CC_FOR_BUILD but cmake only
supports one compiler toolchain per build and requires some
workarounds like running cmake twice using separately defined
toolchains.

This gets ugly and complicated fast when considering multiple
toolchains, especially for a simple tool like lemon, so just
allow builds to override the C compiler and wipe the cflags.

This way systems like Gentoo/ChromeOS/Yocto with a properly
setup cross-compile environment can just point to the native
BUILD_CC or similar while minimizing complexity.
2021-08-31 19:19:05 +00:00
Adrian Ratiu 49240e23b4 cmake: lemon: fix path to internal lemon tool
Wireshark fails to build when cross-compiling on Gentoo/ChromeOS
systems because the lemon command is not properly specified or
included in PATH, failing with:

/bin/sh: lemon: command not found

The relevant excerpt from build.ninja is:

COMMAND = cd ..._build/plugins/epan/mate && lemon -T.../tools/lemon/lempar.c
-d. .../plugins/epan/mate/mate_grammar.lemon

By specifying the full path to "lemon" we ensure it is
always searched and found in the correct location.
2021-08-31 19:19:05 +00:00
Tomas Kukosa 2dc8b74afc IEEE1609dot2: fix psid-collective-perception-service value 2021-08-31 16:55:52 +00:00
Tomas Kukosa 3bd885d42e IEEE1609dot2: use custom formatters for better readability
fix Ubuntu build
2021-08-31 16:55:52 +00:00
Tomas Kukosa 16b1cdb23f IEEE1609dot2: use custom formatters for better readability 2021-08-31 16:55:52 +00:00
Pascal Quantin a728da1f28 NAS-5GS: fix dissection of port management information container IE
Closes #17562
2021-08-31 17:25:14 +02:00
Berk Akinci 40685047a5 USBHID: Report Descriptor: Fix Push and Pop global item parsing.
Still to do: fix the corresponding HID data parsing.
2021-08-31 14:14:33 +00:00
Adrien Destugues 8223405abc DVB-S2: allow dissection of DVB-S2 over RTP 2021-08-31 09:48:56 +00:00
John Thacker d900777d68 KNX/IP: Handle multiple PDUs per TCP segment / UDP datagram
Handle multiple PDUs per TCP segment or UDP datagram. Add
preference for handling PDUs that span multiple TCP segments.
Fix nested depth handling so as not to clear COL_INFO in the
second PDU of a segment (and also make dissect_knxip have the
standard signature.) Fix #17545.
2021-08-31 09:32:18 +00:00
Peter van der Perk e0f7940d29 Fix broken release notes caused by !3048 2021-08-31 08:59:10 +00:00
Jorge Mora 981ec7f3c7 iwarp_mpa: fix iWarp MPA for NFS-over-RDMA
On the first packet of the conversation, the MPA layer is
dissected correctly followed by the DDP, RDMAP, RPC-over-RDMA,
RPC and NFS layers. The MPA layer sets the TCP conversation as
MPA protocol but when it dissects the RPC layer it also sets
the TCP conversation as RPC protocol thus overwriting the previous
protocol.

Added new port type PT_IWARP_MPA so that when the RPC layer
is dissected it does not overwrite the default protocol for
the TCP conversation which has already been set to MPA.

Fixes #15869.
2021-08-31 08:14:31 +00:00
Dr. Lars Völker e446bbc3e7 ISO10681: Adding support for ISO10681 (FlexRay ISO TP)
This patch adds support for the ISO 10681-2 protocol, which is similar
to the ISO 15765-2 protocol (see packet-iso15765.c).

This patch also add support for registering combined FlexRay IDs to
register the new dissector.
2021-08-31 07:37:59 +00:00
Guy Harris 030b06ba3c pcapng: write packet and Netflix custom blocks the same as other blocks.
Use compute_options_size() to get the total size of all the options, and
use write_options() to write out the options for those blocks, as we do
for other blocks.

Get rid of wtap_block_option_get_value_size() and
wtap_block_get_options_size_padded(); they're no longer needed, and
their notion of an option's "size" is "size in a pcapng file", so that
doesn't belong in code that's intended to support all file types.
2021-08-30 16:29:04 -07:00
Guy Harris 510c088ce6 ngsniffer: fix a routine name.
That routine now only processes frame records; call it
process_frame_record().
2021-08-30 20:45:52 +00:00
Gerald Combs b300c063c2 Add a code of conduct.
After reviewing several codes of conduct, the KDE CoC[1][2] seems to
match the goals and personality of our community the best. Adapt it to
suit our needs. Name the file CODE_OF_CONDUCT.adoc, which seems to be
the most common base name. Note that it must be kept in sync with
https://www.wireshark.org/code-of-conduct.html.

[1]https://kde.org/code-of-conduct/
[2]https://invent.kde.org/websites/kde-org/-/blob/master/content/code-of-conduct.md
2021-08-30 20:29:19 +00:00
Guy Harris dcfa3ec835 ngsniffer: clean up the read process.
Have a routine to read the Sniffer record header, and call that in
ngsniffer_read() and ngsniffer_seek_read().  Only call
ngsniffer_process_record() for frame records that we understand, so that
we only allocate a block for those rather than for records we don't
understand or for EOF records, potentially leaking them.
2021-08-30 12:47:38 -07:00
Dr. Lars Völker 2c543f999b DoIP/ISO15765/UDS: Passing addresses to UDS to refine lookup
This patch adds support to DoIP and ISO15765 to pass the diagnostic
address or addresses to UDS. UDS takes the relevant address into account
for the data identifier and routine identifier name resolution.
2021-08-30 16:10:55 +00:00
David Perry d3d4e4b135 Show error for `-X lua_script` if no Lua support
Wireshark/tshark may be built without Lua support. This patch adds an
error message if the user specifies the `-X lua_script` command-line
argument to a program built without Lua support, so the user is not left
wondering why their script isn't working.
2021-08-30 08:01:05 -04:00
Stig Bjørlykke 3efb3cab62 gsm_sim: Fix MANAGE CHANNEL
Use correct offset for P1 and P2 when showing channel operation
and channel number.

According to TS 102 221 V14.2.0 the Open channel operation is using
P2 for channel, and let UICC assign when this is 0. Show P3 as Le.
Make P3 optional because it's not present in at least Close channel
operation.

Change text in Info column to avoid "Channel Channel: x".
2021-08-30 08:49:38 +00:00
Joey Salazar 28dbab369d git: Add test cases
Add git dissection test cases to existing testing suite for: finding git
packets, finding the Git Protocol version, finding the right amount of
Flush and Delimiter packets, not finding Malformed packets.

Part of #17093
2021-08-30 06:34:52 +00:00
Tobias Mueller 853d55b871 pcapng: declare offset to be volatile to fix build error on aarch64
This attempts to fix an error encountered when building Wireshark on aarch64:

[254/2488] Building C object epan/dissectors/CMakeFiles/dissectors.dir/file-pcapng.c.o
FAILED: epan/dissectors/CMakeFiles/dissectors.dir/file-pcapng.c.o
/usr/bin/cc -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DWS_BUILD_DLL -I. -isystem /usr/include/glib-2.0 -isystem /usr/lib/aarch64-linux-gnu/glib-2.0/include -isystem /usr/include/libxml2 -isystem epan/dissectors -isystem epan -fvisibility=hidden  -fexcess-precision=fast -Wall -Wextra -Wendif-labels -Wpointer-arith -Wformat-security -fwrapv -fno-strict-overflow -Wvla -Waddress -Wattributes -Wdiv-by-zero -Wignored-qualifiers -Wpragmas -Wno-overlength-strings -Wno-long-long -Wredundant-decls -Wframe-larger-than=32768 -fdiagnostics-color=always -Wunused-const-variable -Wshadow -Wold-style-definition -Wstrict-prototypes -Wlogical-op -Wjump-misses-init -Werror=implicit -Wno-pointer-sign -std=gnu99 -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fmacro-prefix-map=/run/build/wireshark/= -fmacro-prefix-map=/run/build/wireshark/= -O2 -g -DNDEBUG -fPIC -Werror -MD -MT epan/dissectors/CMakeFiles/dissectors.dir/file-pcapng.c.o -MF epan/dissectors/CMakeFiles/dissectors.dir/file-pcapng.c.o.d -o epan/dissectors/CMakeFiles/dissectors.dir/file-pcapng.c.o -c epan/dissectors/file-pcapng.c
epan/dissectors/file-pcapng.c: In function ‘dissect_spb_data’:
epan/dissectors/file-pcapng.c:1599:9: error: variable ‘offset’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
 1599 |     int offset = 0;
      |         ^~~~~~
epan/dissectors/file-pcapng.c: In function ‘dissect_epb_data’:
epan/dissectors/file-pcapng.c:1791:9: error: variable ‘offset’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
 1791 |     int offset = 0;
      |         ^~~~~~
epan/dissectors/file-pcapng.c: In function ‘dissect_pb_data’:
epan/dissectors/file-pcapng.c:1541:9: error: variable ‘offset’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
 1541 |     int offset = 0;
      |         ^~~~~~
cc1: all warnings being treated as errors
[255/2488] Building C object epan/dissectors/CMakeFiles/dissectors.dir/packet-autosar-nm.c.o
[256/2488] Building C object epan/dissectors/CMakeFiles/dissectors.dir/packet-bblog.c.o

Fixes: https://gitlab.com/wireshark/wireshark/-/issues/17554
2021-08-30 05:49:52 +00:00
Jiří Engelthaler 40aebad079 IEC104: Added Counter integrrogation command qualifier dissection 2021-08-30 04:51:11 +00:00
Guy Harris 3cb6403a4c wiretap: always allocate a block for a record.
Without that, you could add a comment to a record in a file format the
reading code for which doesn't allocate blocks, but the comment doesn't
get saved, as there's no block in which to save the comment option.

This simplifies some code paths, as we're either using the record's
modified block or we're using the block as read from the file, there's
no third possibility.

If we attempt to read a record, and we get an error, and a block was
allocated for the record, unreference it, so the individual file readers
don't have to worry about it.
2021-08-29 19:12:13 -07:00
Chuck Craft eb2037fda4 NSIS: add ntar to AdditionalTasksPage screen 2021-08-29 21:02:09 +00:00
Berk Akinci 0ba0d4e779 USB HID: Fix Usage Maximum typo
Fix typo preventing 'Usage Maximum' values from being parsed.
Values were were reported as 'Usage:'.
2021-08-29 20:02:25 +02:00
Berk Akinci 64a76cca7f USB HID: Update to match HID Usage Tables version 1.22
Add camera control page (0x90). Usages are up to date with HID Usage
Tables for USB version 1.22.
2021-08-29 20:02:16 +02:00
Martin Mathieson eb2078e89e Thrift: make some functions static. 2021-08-29 11:59:38 +01:00
Jörg Mayer c8656a2dcb New dissector for EXOS internal capture extra header 2021-08-29 14:11:34 +00:00
Joakim Andersson ed9e958a2e nordic_ble: Update text for channel to include index
Update channel to include index to clear up possible confusion if this
is RF channel, or channel index.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-08-29 13:37:23 +00:00