Commit Graph

85508 Commits

Author SHA1 Message Date
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
João Valverde d20ed9491c GSUP: Validate DNS name string encoding 2022-10-20 12:03:52 +00:00
João Valverde 93efea8ea9 Try to fix test suite failures on Win64
[skip ci]
2022-10-20 12:56:21 +01:00
Brian Sipos a81e90f39b TCPCL: Clamp and indicate lengths too large for Wireshark to handle
This fixes windows build errors reported in comments on !8541
2022-10-20 08:32:31 +00:00
Gerald Combs b2b76c2bae Qt: Add geolocation columns back to the Endpoints dialog.
Add geolocation columns back to the Endpoints dialog. Fix our
geolocation column alignments as well.

Fixes #18320.
2022-10-19 17:03:49 +00:00
Brian Sipos 5bb756e203 epan: centralize SDNV processing along other similar varint types
This avoids having general-purpose decoding happening in
non-DLL-exported functions defined in a dissector for #18478,
and removes unused functions and avoids duplicate decoding.
This also removes unnecessary early exit conditions for #18145.
Unit test cases for varint decoding are added to verify this.
2022-10-19 15:27:42 +00:00
Dylan Ulis d2e5bd80cb CIP: Minor cleanup/refactoring 2022-10-19 15:23:32 +00:00
John Thacker 7a4d05d63a charsets: Don't add illegal Unicode codepoints for UTF-16, UTF-32
If a character is not a valid Unicode codepoint, i.e. one of
the code points reserved for surrogate pairs or a code point
above 0x10FFFF, don't add it to a wmem_strbuf when converting
from other encodings but add a replacement character instead, by
using a new wmem_strbuf_append_unichar_validated() function.

Now we produce valid UTF-8 in various situations where UCS-2 or UTF-32
can encode unpaired surrogate codepoints. Consolidate some related
checks that are now redundant.

Also add a replacement character to the end of invalid UCS-2 strings
with an odd number of bytes, as done with UTF-16 and UTF-32.

Fix #18508
2022-10-19 07:53:02 -04:00
AndersBroman 5af53da434 json: Add media type application/3gppHal+json 2022-10-19 06:31:02 +00:00
Chuck Craft 69f1cd3eed build: rpm-setup.sh - typo in usage 2022-10-19 01:18:51 +00:00
Gerald Combs 0d59da3156 Qt: Fix the ByteViewText line height.
QFontMetrics::leading() was zero for Consolas on Windows in Qt5, but is
nonzero in Qt6. This revealed that we were inconsistently using height()
and leading() to calculate our line height. Just use lineSpacing()
instead.

Fixes #18438.
2022-10-19 01:06:37 +00:00
Chuck Craft 5b59771e8b wsdg: add arch-setup.sh; update options for others
Ping #17771
2022-10-19 00:25:01 +00:00
Richard Sharpe 45add8812d ieee80211: Improve the handling of Beamforming matrices.
Reduce the number of chars used so we can fit in the 240-byte limit.

Fixes #18504
2022-10-18 23:20:26 +00:00
Uli Heilmeier f90486246f README.plugins: Fix version variables
Fixes: #18507
2022-10-18 19:22:31 +00:00
João Valverde 4136b250c5 epan: Rename tvb_get_nstringz0()
Rename tvb_get_nstringz0() to tvb_get_raw_bytes_as_stringz()
to reflect the fact that this function does not return
a string (UTF-8 internal text string).

Remove tvb_get_stringz() because it is unused and just seems
dangerous.
2022-10-18 19:51:38 +01:00
João Valverde e4d5a44014 MEGACO: Fix proto_tree_add_string() call
Strings passed to proto_tree_add_string() must be UTF-8 encoded.

Fixes #18486.
2022-10-18 19:50:38 +01:00
Chuck Craft 41f14af980 build: bsd-setup.sh - make code like the others; FreeBSD gcrypt 2022-10-18 16:06:05 +00:00
John Thacker 6156e28a26 dhcp: Convert raw string to UTF-8 before adding to expert info
In PacketCable MTA capabilities, the length of the capability
is store as hex digits in ASCII. If bogus, the incorrect value
is added as an expert info. Ensure that it's formatted as UTF-8
and for display when added to the tree.

Fix #18437
2022-10-18 07:03:38 -04:00
Chuck Craft bc9a5ff70e build: fix typos in alpine-setup.sh 2022-10-17 16:55:28 -05:00
Vadim Yanitskiy b93e8234f6 GSM A-bis/RSL: dissect and show RFN using parse_reduced_frame_number()
3GPP came up with a special encoding of TDMA frame number, which reduces
the amount of bits needed to carry it from 32 to 16.  This encoding is
not only employed on the radio interface (GSM RR), but also on the
A-bis/RSL interface which is used between BTS and BSC nodes.

From the user perspective, parsed RFN value is a lot more meaningful
than the T1/T2/T3 variables used on the wire.  The GSM RR dissector
does show parsed RFN value together with these variables, while the RSL
dissector does not.  Let's show it in the RSL dissector too.
2022-10-17 19:45:15 +00:00
Vadim Yanitskiy 269d3a9968 GSM A RR: expose parse_reduced_frame_number()
This function will be used by the RSL dissector to show parsed RFN
value in the upcoming patch.
2022-10-17 19:45:15 +00:00
Vadim Yanitskiy 9006f25701 GSM A RR: make [parse_]reduced_frame_number() easier to use 2022-10-17 19:45:15 +00:00
Alexis La Goutte 47bd05e494 giop: Fix Dead Store found by Clang Analyzer 2022-10-17 16:44:45 +00:00
John Thacker 0bf410550b smb2: Copy entire Unicode string length
In SMB2, the length of the buffer than contained a UTF-16
unicode string is not necessarily the length of the converted
UTF-8 string, and in some cases can even be shorter than the
length of the UTF-8 string, if the string has many 2 octet
UTF-16 characters that are 3 or 4 octets in UTF-8.

Use wmem_strdup and wmem_strdup_printf instead of wmem_alloc
and sprintf, which is a safer pattern anyway as it reduces
the chance of these errors.

Fix #18482
2022-10-17 07:45:20 -04:00
Guy Harris be60ad9b17 Add include/ws_codepoints.h to the list of public headers. 2022-10-17 00:23:32 -07:00
John Thacker d248702b86 nbt: Eliminate clang analyzer warning
By using strlcat later, we don't need to update pname_ret again,
since we only need the total size of the buffer. Elminates a
clang analyzer warning about writing a value that is never used
related to commit 9891a79137
2022-10-17 00:37:16 +00:00
Guy Harris 1c9c1b5100 Add a #define for REPLACEMENT CHARACTER and use it.
Add UNICODE_REPLACEMENT_CHARACTER as a #define for the Unicode
REPLACEMENT CHARACTER code point (0x00FFFD), and use that instead of
0xfffd/0xFFFD/0x00FFFD in cases where that value refers to REPLACEMENT
CHARACTER.
2022-10-16 23:36:12 +00:00
John Thacker 5fd09b521d ftp: deal with UTF-8
Ensure that FTP doesn't add invalid strings to the tree or columns.
Also allow UTF-8 pathnames to work.

According to RFC 2640, FTP supports UTF-8 for pathnames (and it
MUST be supported even if the other side does not advertise support
for UTF-8, unless a different character set has been explicitly
configured, which is out of scope of the RFCs, and we don't have
such a preference.) So in general interpret strings as UTF-8, not
ASCII.

Reduce the use of tvb_get_ptr by using functions directly on the
original tvb and offset. This also happens to be more compliant
with RFC 2640 when getting the token lengths. (RFC 2640 states
that implementations MUST assume that there is only one space between
a command and the pathname, and treat additional spaces as part of
the pathname instead of skipping them. tvb_get_token_len() does not
skip trailing spaces, but get_token_len() does.)

The only place that still uses tvb_get_ptr is when processing a PWD
command, because it has to deal with the double quote escaping as
a custom encoding.

Add a tvb_ascii_isdigit function.

Fix #18439.
2022-10-16 22:43:39 +00:00
Gerald Combs 94b4202a99 GIOP: Handle recursion and large loops.
dissect_data_for_typecode_with_params is recursive. Add a depth check.
It also has large loops. Make sure our offsets advance.
Fixes #18392.
2022-10-16 22:09:32 +00:00
Bin Peng 2eeb086f70 H265: Support RPS prediction in h265 SPS
According to Rec. ITU-T H.265 7.3.7 and 7.4.8,
when there are multiple RPS in SPS,
RPS can be predicted from previous ones.

But NumDletaPocs used to be a local variable for each RPS,
prediction will always fail.
In this change, NumDletaPocs is  moved from dissect_h265_st_ref_pic_set
to dissect_h265_seq_parameter_set_rbsp, to allow access to previous RPS
data.

This change also move each RPS into a subtree.

Fix #18481
2022-10-16 21:24:06 +00:00
Gerald Combs 44a17f395f [Automatic update for 2022-10-16]
Update manuf, services enterprise numbers, translations, and other items.
2022-10-16 21:08:54 +00:00
Martin Gallo fc052615a6 SAPNI: Added SAP NI as main dissector 2022-10-16 19:59:59 +00:00
Guy Harris f86a0d5ab4 Use wmem_strbuf_append_unichar_repl() to append a REPLACEMENT CHARACTER.
Replace several instances in which a REPLACEMENT CHARACTER was being
appended to a wmem_strbuf with a call to
wmem_strbuf_append_unichar_repl().

This reduces the number of explicit 0x00fffd or 0xfffd or... in the
code.
2022-10-15 14:16:10 -07:00
João Valverde ab7b71605c TDS: Reject invalid ASCII
Fixes #18448.
2022-10-15 20:17:56 +00:00
John Thacker cb23c5e8d7 PER, asn2wrs: Fix permitted-alphabet constrained character strings
Effective permitted-alphabet constraints are only PER-visible for
the known-multiplier character string types (X.691 27.1). When
PER-visible, the upper bound of any code point used in the
alphabet needs to be calculated, in particular for the ALIGNED
variant, because that determines whether or not canonical order
is used (X.691 27.5.2, 27.5.4).

Note that even with the change to asn2wrs.py none of the generated
dissectors change, because we don't have any example of ASN.1
with non-PER visible permitted alphabet constraints because of
using them on non known-multiplier character string types
(like UTF8String).

There's some various edge cases that we still don't handle, but
nothing that any of the ASN.1 modules in the repository use.
(Permitted-alphabet constraints using characters outside the
ASCII range, possibly with "CharacterStringList", "Quadruple",
or "Tuple" notation, permitted-alphabet constraints that are
extensible and thus not PER-visible, etc.)

Also fix a fencepost error with the length of the octets to highlight.

Fix #18468
2022-10-15 17:20:02 +00:00
Martin Mathieson 21b3529be4 ANSI-A: init user_data field in stat_tap_table_item_type entries. 2022-10-15 17:17:11 +00:00
Michael Tuexen 510c22a6a7 TCP: Update TCP TARR support to version 06 of the ID
The dissector now supports draft-gomez-tcpm-ack-rate-request-06.
The rate is now encoded in one byte instead of two.
2022-10-15 15:59:35 +02:00