Commit Graph

86053 Commits

Author SHA1 Message Date
John Thacker 7baa0ca0c4 proto: Custom column concatenation and truncation
Fix some issues regarding custom columns near the maximum size:

Fix where when near the column limit, a comma was not being added
to separate a value but the first character of the next field was,
resulting in an invalid field.

Create the "result" and the "expr" (resolved and unresolved) separately
to address issue where for multifield custom columns of different
types, the "result" might be truncated without "expr" necessarily
being so. This created problems when concatenating the end of the
result to the expr for certain types later.

Avoid passing a NULL to snprintf for integer columns of BASE_NONE
of unexpected value.

Indicate when the custom column has been truncated, since after
commit e449b560c0 this string value is no longer
used to create the filter and is for display only. Also use
the label truncation function so that truncatation is on UTF-8
boundaries.

Fix #17618
2022-12-16 21:08:47 +00:00
João Valverde c2850d7203 C15 CH: Fix UTF-8 string truncation 2022-12-16 19:45:02 +00:00
João Valverde 2de92a94df epan: Add a bounds check to tvb_uncompress_lz7huff() 2022-12-16 19:45:02 +00:00
João Valverde 730981f76a GSM A-bis: Add an assertion to prevent a buffer overflow
==207143==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7f59752e0f00 at pc 0x7f5971cd0737 bp 0x7ffe881b1ef0 sp 0x7ffe881b1ee8
READ of size 4 at 0x7f59752e0f00 thread T0
    #0 0x7f5971cd0736 in setup_rlc_mac_priv epan/dissectors/packet-gsm_abis_pgsl.c:194:8
    #1 0x7f5971ccfc89 in dissect_gprs_data epan/dissectors/packet-gsm_abis_pgsl.c:357:3
    #2 0x7f5971ccf6ea in dissect_abis_pgsl epan/dissectors/packet-gsm_abis_pgsl.c:477:3
    #3 0x7f5974483daa in call_dissector_through_handle epan/packet.c:822:9
    #4 0x7f5974478c05 in call_dissector_work epan/packet.c:920:9
2022-12-16 19:45:02 +00:00
John Thacker 5b96d57b18 protobuf: Do not crash on zero length bytes element
If a field name has been written to the json dumper for
a bytes element (Base64), then a Base64 value must be written
later, even if the value is zero length.

Move the JSON_DUMPER_FLAGS_NO_DEBUG flag to the json_dumper header,
and use it in the protobuf dissector, so that errors in the JSON
dumper state transitions do not abort the application through a
ws_error() call. Use DISSECTOR_ASSERT in that case, since it should
happen only with a dissector bug (as with the zero bytes elements
issue fixed here), not with malformed packets.

Only instantiate the json_dumper and create its output string if
we intend on displaying its output, instead of doing so whenever
we have a message type name.

Fix #18730.
2022-12-16 12:20:30 +00:00
João Valverde ae14849864 Windows: Use SpeexDSP binary package
Remove bundled code and use vcpkg binary library instead.
2022-12-16 11:11:28 +00:00
Vasil Velichkov a4f56e90a6 BER: Fix extension lengths
Previously the length was ignored and if a Sequence contains more then
one extensions (in the ellipsis) then the value of the second was
wrongly added to the value of the previous one.
2022-12-16 08:55:47 +00:00
Chuck Craft 3a61e3f851 SNMP/UDP: SNMP is walking on UDP conversation/stream ID 2022-12-16 08:46:03 +00:00
Gerald Combs b0cf030b30 RTPS: Add offset overflow checking.
Add and use check_offset_addition, which adds an expert item and throws
an exception if we're about to overflow our offset.

Fixes #18737
2022-12-15 16:16:00 -08:00
Roland Knall 18c2f29610 Qt: Limit copy of TrafficDialog to visible items
The traffic dialogs did not respect the filtered elements, when copying
data as CSV, Yaml or JSON

Fixes #18530
Fixes #18637
2022-12-15 16:39:54 +00:00
Roland Knall c1169d587c Qt: Fix Packet Comments shortcut
The shortcut for adding a new packet comment is not available
until the menu has first been shown, or a packet has been selected.

This is a bug, as it is not clear to the user, why the shortcut should
exist in one instance and not in the other. Therefore the shortcut is
always added.

It is not added in the .ui files, as this would trigger a new set of
translations.

Fixes #18673
2022-12-15 15:46:53 +00:00
João Valverde 1ca46907d4 DMP: Fix invalid UTF-8 encoding 2022-12-15 15:04:08 +00:00
João Valverde 10bfb702a6 ECMP: Fix invalid UTF-8 encoding 2022-12-15 14:23:01 +00:00
João Valverde be44dab5d6 Zbee ZDP: Fix UTF-8 string invalid truncation 2022-12-15 14:23:01 +00:00
João Valverde 0256d09ab8 NCSI: Fix invalid UTF-8 encoding 2022-12-15 14:23:01 +00:00
João Valverde 2db8d6213f AllJoyn: Fix invalid UTF-8 encoding
Fixes #18725.
2022-12-15 14:23:01 +00:00
João Valverde 8afd34c616 Alljoyn: Fix -Wdocumentation warnings 2022-12-15 14:23:01 +00:00
Philipp Dittmann bca2b4dd9e Qt: Fix Qt 6.4 QMouseEvent deprecation
QMouseEvent constructor is deprecated in Qt 6.4. Changed to another
6.0 constructor.
2022-12-15 14:12:54 +00:00
John Thacker 03b4c62be5 cli: Fix copying global profile to personal at startup
Fix up commit 1eeb0c9934
At initial startup, the hash of configuration files used
by profiles doesn't exist yet or is not completely filled.
(Files are only added to the list after initially parsing
the current configuration.)

So, if copying a global profile to the personal directory
at initial startup, just copy all the files from the global
profile.

Also, don't free to_dir and from_dir if we're returning them
in the case of errors.
2022-12-15 14:05:19 +00:00
Martin Mathieson d17c018013 tools/check_typed_item_calls: check FT_BOOLEAN mask length 2022-12-15 13:28:05 +00:00
Dario Lombardo 1e8d3d8695 tshark: fix duplicate fields issue in ek output.
Fix: #18036.
2022-12-15 12:22:30 +00:00
Jeremy Kerr ff728ab37d MCTP: Add decoder for message type
Once we have a full MCTP message, we can decode its type (including IC
field). This change adds type decode support, for the types present in
packet-mctp.h.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
2022-12-15 12:21:06 +00:00
Jeremy Kerr cfcb33e8b7 MCTP: Add NCSI (and ethernet) over MCTP dissection
This change adds support for trivially-encapsulated MCTP protocols,
starting with NCSI-over-MCTP.

We need to handle this slightly different from the existing MCTP-based
protocols (MCTP control protocol and NVMe-MI), as the inner protocol is
unaware of the type byte and (optional) checksum tailer. So, add a new
dissector table, "mctp.encap-type" for these, meaning we can just hook
into the raw NC-SI dissector.

We also add the type definition for MCTP-over-ethernet, as defined in
the NCSI-over-MCTP specification.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
2022-12-15 12:21:06 +00:00
Jeremy Kerr 728e89b955 MCTP: Add header for MCTP packet types
We have a few hard-coded MCTP type definitions in use (for MCTP control
protocol, and NVMe-MI) already, and we're about to add a couple more.

This change adds a header for packet-mctp, just with the type
definitions, and uses it for the current types.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
2022-12-15 12:21:06 +00:00
Bernhard Dick 7b53d22b27 DECT-DLC: Remove abandonend part 2022-12-15 12:17:29 +00:00
Bernhard Dick 969f12c365 DECT-DLC: Unify variable naming
Naming of variables, i.e. for header fields was inconsistent (dlc_ vs
dect_dlc_). This is now changed to use the abbreviation (dect_dlc_) on
all global places.
2022-12-15 12:17:29 +00:00
Bernhard Dick a3e624cb01 DECT-DLC: Add dissector to relnotes 2022-12-15 12:17:29 +00:00
Bernhard Dick f56a3fed08 DECT-DLC: Fix missing prototype 2022-12-15 12:17:29 +00:00
Bernhard Dick 584e65c950 DECT-DLC: Fix typos in hf definitions 2022-12-15 12:17:29 +00:00
Bernhard Dick 9a96284e5a DECT-DLC: Reassemble fragments
The DECT-DLC dissector now reassembles fragments before handing them
over to the NWK layer. Most of this is done by reusing of the reassembly code
from packet-lapdm.c.
2022-12-15 12:17:29 +00:00
Bernhard Dick 594207d04e DECT-DLC:DECT-DLC: Really disable abandoned func
The preprocessor definition to disable the stub
proto_reg_handoff_dect_aastra in packet-dect-dlc did not work, so it's
disabled via comment now.
2022-12-15 12:17:29 +00:00
Harald Welte c6fb1b2308 DECT-DLC: Don't call NWK dissector if there's no payload
Change-Id: Ia86185f52b724be61db2d94ffaf51fd00ebab84c
2022-12-15 12:17:29 +00:00
Harald Welte a13d71dab9 DECT-DLC: Initial dissector for DECT DLC protocol layer
Change-Id: Iabd75b0f9b12ea9162dc164741123feb1ba7992d
2022-12-15 12:17:29 +00:00
John Thacker 4672e73900 NBAP: Add UEID to HS-DSCH flows added from RadioLinkReconfiguration
A few HS-DSCH conversations are created when calling add_hsdsch_bind,
such as when a RadioLinkReconfigurationPrepare procedure has
a id-HSDSCH-MACdFlows-to-Add element. This method should add
the CommunicationContextID to the conversation just like the
other ways of creating the conversation. This provides a UEID
for a unique key for RLC reassembly.
2022-12-15 12:13:36 +00:00
João Valverde 7fef921875 wslog: Resynchronize UTF-8 display
When displaying the string with encoding errors resynchronize
the display to print the string after the invalid substring.
2022-12-15 11:08:41 +00:00
João Valverde ea8b5fb024 wmem: Add wmem_strbuf_append_c_count() 2022-12-15 11:08:41 +00:00
João Valverde 1f34529839 wmem: Optimize some strbuf functions
The changes in commit 32f88ad22c allow removing some checks that
could speed up the code.
2022-12-15 11:08:41 +00:00
Gerald Combs 963dba2d60 NSIS: Add an initial donation page.
Add a donation page to the Wireshark installer.
2022-12-15 08:36:50 +00:00
Tomasz Moń c6ee65db6b
Qt: Display extcap uncheckable multicheck items as labels
Commit e1a8f0119e ("Extcap prefs: Editor remembers empty values")
inadvertently made the immutable checkbox visible next to uncheckable
multicheck items. Restore former behavior, that is display only labels
for uncheckable multicheck items, by setting unchecked state only for
checkable items.

Uncheckable items, since its introduction in commit 9c1225f735
("Modify multicheck to accept parent parameter."), were used to display
additional labels in USBPcap configuration options to aid user in
determining which individual device to filter on. Without the additional
information determining for example which "USB composite device" is of
interest to the user is really problematic.
2022-12-15 06:50:49 +01:00
João Valverde 415389eb84 CMake: Update a comment
The stringop-overflow warning is active with both GCC and Clang
in the master branch and was not triggered by our build bots so
update the comment to reflect that.

```
epan/dissectors/packet-lwm.c:464:31: error: writing 16 bytes into a region of size 0 [-Werror=stringop-overflow=]
  464 |                     vector[i] ^= text_dec[i];
      |                     ~~~~~~~~~~^~~~~~~~~~~~~~
epan/dissectors/packet-lwm.c:419:21: note: at offset 192 into destination object ‘nwkSecurityVector’ of size 16
  419 |             guint32 nwkSecurityVector[4];
      |                     ^~~~~~~~~~~~~~~~~
```
2022-12-15 03:34:06 +00:00
João Valverde 38e73b895a SGsAP: Use ENC_APN_STR
Fixes #18701.
2022-12-15 03:08:39 +00:00
João Valverde 31ab1a0a17 SIP: Fix heap-use-after-free crash with ASAN
Fixes 358641a5ca.

Fixes #18735.
2022-12-15 02:13:30 +00:00
João Valverde 2d3de008f5 CMake: Disable UTF-8 debug checks for release builds
Disable UTF-8 debug checks for release builds for optimization
purposes.

Also remove unused macro that currently lacks a proper use case.

Change version info to be more complete about the build type without
being too verbose.
2022-12-15 01:57:39 +00:00
João Valverde 400235ad7e CMake: Re-enable -Wno-error=stringop-overflow= 2022-12-15 01:57:39 +00:00
Gerald Combs f2caa6a0cc Extcap: Fix falcodump gcc warnings and errors.
Fix warnings and errors reported by gcc 11.3.
2022-12-15 01:46:03 +00:00
Brendan Meath 3a43d97898 NAS-5GS: change TLV to TLV_E for CAG Information list IE 2022-12-14 18:55:55 +00:00
Chuck Craft 2aa40d4488 Qt: crash on negative row in Conversations 2022-12-14 18:10:58 +00:00
Alexis La Goutte 8504578ec2 ieee80211: fix typo for encoding 2022-12-14 15:58:38 +00:00
Alexis La Goutte 30df11941b ieee80211: fix trailing whitespace 2022-12-14 15:58:38 +00:00
Alexis La Goutte 1856d1368a ieee80211: Add Location Civic (Measurement Report) 2022-12-14 15:58:38 +00:00