Commit Graph

85544 Commits

Author SHA1 Message Date
Tomasz Moń 0e7c240897
capture: Convert sync pipe to GIOChannel
Reduce the amount of platform specific Wireshark code by using
GIOChannel watch, i.e. do not use UNIX specific GLib functionality and
do not peek into pipe every 100 ms on Windows.
2022-10-23 13:17:10 +02:00
AndersBroman 5c53de8f47 X2AP: Make it possible to dissct private IEs 2022-10-22 21:40:23 +02:00
John Thacker 398fb66598 wow: Reverse string bytes before converting to UTF-8
WOW has several 4 octet ASCII strings in reverse order. g_strreverse
does not work on UTF-8 multibyte characters, such as REPLACEMENT
CHARACTER when there are errors. Reverse the string buffer before
converting from ASCII.

Fix #18529
2022-10-22 09:34:23 -04:00
John Thacker be992b94a1 mpeg-descriptor: Ensure language code is valid UTF-8
Use tvb_get_string_enc to get the 3 character language code
when adding to the subtree.

Fix #18523
2022-10-21 22:10:29 +00:00
Gerald Combs 8514eb0e21 GitLab CI: Remove the "Latest Clang" job.
It was a subset of the "Code Checks + Clang Warnings" job.

[skip ci]
2022-10-21 13:10:23 -07:00
Jim Walker bd4c98b8ed Couchbase: remove unnecessary update to offset
Addresses clang-analyzer warning:

"packet-couchbase.c:2636:7: warning: Value stored to 'offset' is never read"

Change-Id: Ib91fbd64e08f65cbe83887ebdf5b6ae545672bc5
2022-10-21 18:43:41 +00:00
Gerald Combs 197e645f6a GitLab CI: Switch the RPM test jobs to the 2x-daily schedule.
[skip ci]
2022-10-21 11:42:41 -07:00
Gerald Combs 83d5533711 GitLab CI: Switch our Linux packages to a twice daily schedule.
The RPM packages use a versioned build directory, which creates problems
for ccache. The APT packages simply take a long time to build. Switch
both to a twice-daily schedule so that we don't set fire to CI minutes
in parallel with every merge.

Back out a recent CMake change since it's no longer needed.
2022-10-21 11:15:22 -07:00
Chuck Craft 61d81683c8 github: make yaml syntax consistent (msys2.yml)
Simplify output of grep | sort | uniq when checking "uses"
2022-10-21 15:15:16 +00:00
Chuck Craft d896660e63 github: make yaml syntax consistent (lockdown.yml)
Simplify output of grep | sort | uniq when checking "uses"
2022-10-21 14:30:45 +00:00
AndersBroman 533eb735e3 Camel: Dissect TimeAndTimezone
Closes #18485
2022-10-21 14:05:03 +00:00
John Thacker cbfa038602 UCP: Fix string encoding
For EMI and UCP, the encoding for alphanumeric messages, as
specified in ETS 300 133-3 as well as the EMI extension
specification, is rather unique: GSM 7-bit alphabet characters
are each translated (thus unpacked) to two hex byte IRA characters
(same as ASCII over the 0-9 A-F range), with '/' used as an
end of string indicator.

Translate the hex bytestring to bytes, and then convert the bytes
using the unpacked GSM 7-bit alphabet instead of treating them
as ASCII or UTF-8. Check for invalid bytes which are not ASCII hex
and replace them in the final returned string with the UTF-8
replacement character. Fix #18518 better.
2022-10-21 07:39:44 -04:00
João Valverde 6aa33f0fc9 wmem: Make strbuf_utf8_validate() accept embedded NUL bytes 2022-10-21 10:21:21 +00:00
ismaelrti 338e6b50e2 RTPS: Parse Secure Volatile DATA
Added dissection for DATA(v) submessages.
2022-10-21 09:40:48 +00:00
João Valverde 8b3521272a H.224: Fix protocol filter name to match fields and convention 2022-10-21 09:26:11 +01:00
AndersBroman 3be3b2cc95 H224: Add a basic dissector
ping: #18514
2022-10-21 08:18:07 +00:00
kenneth topp 3e92ca0147 Update to https for Acknolodgements (needed for one url) 2022-10-21 08:16:52 +00:00
Alexis La Goutte 6d60a07ea1 ieee802.11: Update doc link and revision 2022-10-21 08:15:30 +00:00
Jakub Pawlowski c76ef65af5 Bluetooth: add RSI and Broadcast_Name AD parser 2022-10-21 08:13:56 +00:00
Jim Walker 76e4bc1c69 Couchbase: Add RangeScan opcodes and request definitions
This commit adds support for requests of:

* RangeScan create (with a JSON value)
* RangeScan continue (with binary extras)
* RangeScan cancel (with binary extras)

And support for the RangeScan create response 128-bit uuid

949615071b/docs/range_scans

Change-Id: Iea7a0bcaea82a22dd938247c71afc57b4a0869cf
2022-10-21 08:12:13 +00:00
Car Benjamin b7a7921699 Increased EBHSCR packet size 2022-10-21 08:10:47 +00:00
Guy Harris 1070328597 packet bytes: do a simpler test for "is this ASCII?"
Just test whether the octet has the 0x80 bit set.
2022-10-21 00:42:42 -07:00
Guy Harris de50666ec0 packet bytes: don't assume the unadorned "char" type is signed.
The C language does not guarantee that "char" is signed or unsigned; it
just states that it's "implementation-dependent".

At least some C compilers for some architectures make it unsigned, so
you need "signed char" to get a signed value.  In particular, it's
unsigned for most ARM compilers (compilers for Darwin-based OSes such as
macOS make it signed on all platforms, including ARM), which causes a
warning about "ba[i] < '\0'" always being false.

The purpose of that test is to check for octets that correspond neither
to ASCII printable characters nor ASCII control characters; just test
with !g_ascii_isprint(ba[i]) && !g_ascii_iscntrl(ba[i]).  (Those are
macros, so it's not as if that adds any subroutine call overhead.)

Add some comments to explain what's being done in
ShowPacketBytesDialog::symbolizeBuffer() while we're at it.  (Not one of
the better uses of C++ polymorphism, giving "replace the octet at this
location with this sequence of octets" and "replace all octets equal to
this value with this sequence of octets" the same name, even though what
they do differs significantly.  I would have called one replace_at and
the other replace_all or something such as that, but the Qt developers
didn't ask me....)
2022-10-21 06:09:55 +00:00
Gerald Combs 139e46898d CMake+GitLab CI: Add and use RPMBUILD_EXTRA_ARGS.
Add an RPMBUILD_EXTRA_ARGS variable to CMakeLists.txt and use it in
GitLab CI to define __cmake_builddir. This should let ccache work with
our RPM builds.
2022-10-20 21:53:37 -07:00
John Thacker d7c993d4af epan: Fix the end offsets for hex string items
hex_str_to_bytes_encoding() consumes pairs of hex digits (and
optional separator) to turn into bytes. It can return a pointer
to the character after the last digit consumed. Don't advance
the end pointer after a single unpaired digit that is not consumed
as part of the hex string returned.

tvb_get_string_bytes() can pass back the end offset. If conversion
fails, return the initial offset instead of zero to make repeated
calls easier in cases where the full length is not decoded due to
errors.

Relatedly, no dissector currently uses this return value, because
it's not useful currently.
2022-10-21 01:11:53 +00:00
Gerald Combs 31ee273517 GitLab CI: Try to get ccache working for RPM builds. 2022-10-20 17:51:16 -07:00
Gerald Combs 1321de7dc3 Packaging: Fix our tarball commit logic.
If CI_COMMIT_SHA is set, it probably means we're building in GitLab CI.
Prefer it over our stash commit ID.
2022-10-20 15:39:53 -07:00
Gerald Combs 6d79c8c1f6 GitLab CI: Don't set absolute_paths_in_stderr.
It's not supported by openSUSE's ccache.
2022-10-20 21:48:36 +00:00
Gerald Combs 1283e29e53 Metamako: Fix a format specifier. 2022-10-20 14:09:10 -07:00
Gerald Combs a30774d8c1 GitLab CI: Set ccache's base_dir for RPM builds.
GitLab CI builds RPMs in a different directory for each pipeline
($CI_PROJECT_DIR/build/packaging/rpm/BUILD/wireshark-<version>), so set
base_dir to the build directory and enable absolute_paths_in_stderr.

Fix our cache directory max sizes as well.
2022-10-20 13:49:40 -07:00
Lewis Hamilton f5f561d5c7 Metamako: Metamako dissector update
The Metamako trailer has changed a lot over the years, this commit reflects these changes.
2022-10-20 20:09:20 +00:00
João Valverde 603354203b epan/proto: Replace format text()
The proto.h APIs expect valid UTF-8 so replace uses of format_text()
with a label copy function that just does formatting and does not
check for encoding errors. Avoid multiple levels of temporary
string allocations.

Make sure the copy does not truncate a multibyte character and
produce invalid strings. Add debug checks for UTF-8 encoding errors
instead.

We escape C0 and C1 control codes (because control codes)
and ASCII whitespace (and bell).

Overall the goal is to be more efficient and optimized and help
detect misuse of APIs by passing invalid UTF-8.

Add a unit test for ws_label_strcat.
2022-10-20 20:05:15 +01:00
Chuck Craft 000c2c0bf4 expert UAT: display field name on load error
https://ask.wireshark.org/question/29044
Tshark: Error loading table 'Expert Info Severity Level Configuration
2022-10-20 19:02:34 +00:00
Uli Heilmeier b42628389e CFDP: Fix empty source filename
Fixes: #18495
2022-10-20 18:43:41 +00:00
João Valverde 7b5ef933b0 C15H: Fix string truncation. 2022-10-20 18:41:46 +00:00
João Valverde 1bd29411a1 UCP: Validate string encoding 2022-10-20 18:41:46 +00:00
Richard Sharpe 00d1f4da87 ieee80211: Use greek leters in Beamforming matrices.
!18504
2022-10-20 18:33:05 +00:00
Gerald Combs 912f7122f9 GitLab CI: Check our commit before building MR jobs.
Make sure the Commit Check job passes before spending additional
resources.
2022-10-20 18:29:43 +00:00
Alexander Funke 1ab15061b5 IP: Fix fragment offset value calculation
The bitmask was applied twice, through the header_field_info
 and before calling proto_tree_add_uint.
Now using _format_value for correct calculation.
2022-10-20 17:52:12 +00:00
João Valverde 375cd6392e DHCPv6: Sanitize domain display labels for invalid UTF-8
Assume labels are encoded using ASCII. Validate them instead
of copying raw byte strings from the TVBuff.

Fixes #18398.
2022-10-20 17:51:08 +00:00
João Valverde 4eb78424d2 CMake: Add -Werror to test binaries 2022-10-20 18:26:49 +01:00
João Valverde c22dc30cac tvbtest: Fix printf() format 2022-10-20 18:13:14 +01:00
João Valverde 9fb07c1b79 Squelch some narrowing warnings.
The macro stores the length in an int. Add a cast to work squelch
the warning.
2022-10-20 17:11:56 +00:00
Gerald Combs 9270731976 GitLab CI: Enable ccache for our RPM package jobs. 2022-10-20 15:43:57 +00:00
John Thacker 2d831519c3 rtcp: Use setup_frame_number to look for conversations
Use the setup_frame_number to look for and create conversations
with srtcp_add_address, the same way as done in srtp_add_address.
This ensures that RTP and RTCP find the same conversation when
called back to back (as when handling them multiplexed on the
same conversation.

Related to #18460.
2022-10-20 14:03:38 +00:00
Stig Bjørlykke cac6a8452b h248: Add missing dot in H.248 protocol name
Add the missing dot in H.248 protocol name and dissector table.

Closes #18513
2022-10-20 13:20:01 +00:00
João Valverde 8f0985b19a SMB: Fix string truncation
As far as I can tell, get_unicode_or_ascii_string() always
nul-terminates string (as it should), so remove g_strlcpy()
copy that can truncate string and produce invalid UTF-8.
2022-10-20 12:03:52 +00:00
João Valverde 815415cda7 DNS: Add documentation for get_dns_name() 2022-10-20 12:03:52 +00:00
João Valverde 64bd646b2f DNS: Don't pass raw bytes to expert.h APIs 2022-10-20 12:03:52 +00:00
João Valverde bd0102fc64 LDAP: Validate DNS name string encoding 2022-10-20 12:03:52 +00:00