Commit Graph

85371 Commits

Author SHA1 Message Date
John Thacker feb7f45179 gtp: Fix UE-AMBR and APN-AMBR with NSAPI IEs
The optional Authorized UE-AMBR for Uplink and Downlink
fields in UE-AMBR were never getting dissected.
Also, the trees and tree description for the UE-AMBR and
APN-AMBR with NSAPI IEs were swapped.
2022-09-28 01:26:46 +00:00
João Valverde cdfa3116d2 epan: Update format_text() API documentation 2022-09-28 00:47:25 +00:00
João Valverde d7b1a2b4a8 Fix Debian symbols 2022-09-28 01:25:59 +01:00
Harald Welte 2ca164446d gsmtap: fix dissection of LAPD-in-E1-in-GSMTAP traces
When the ability to dispatch GSMTAP E1/T1 frames to the LAPD dissector
was merged in August 2020, a recent July 2020 change earlier has
restructured and renamed the lapd dissector.  So at the time the GSMTAP
support for LAPD was added, the dissector was no longer called 'lapd'
and hence it never worked.

commit 75c739e4b7
Author: Guy Harris <gharris@sonic.net>
Date:   Sat Jul 25 02:20:10 2020 -0700
ISDN, LAPD: clean up the way they connect to other dissectors.

commit 132d6ec70b
Author: Harald Welte <laforge@osmocom.org>
Date:   Thu Aug 20 19:11:58 2020 +0200

Let's fix this by properly dispatching the LAPD frames from GSMTAP.
2022-09-27 22:55:06 +00:00
Gerald Combs 402bb0ee81 USB HID: Always use a format string.
Ensure that the second argument to wmem_strdup_printf is always a format
string.
Fixes #18384.
2022-09-27 22:39:28 +00:00
John Thacker d4327d42b0 GTPv2: Add Service Response Time statistics, similar to GTPv1
Add a Service Response Time table for GTPv2, similar to that
for GTPv1. Update the tshark docs to mention it.
2022-09-27 22:06:45 +00:00
Gerald Combs f011e75025 Qt: Use new-style syntax for signal & slots connected by name.
Change anything that matches

    grep -Eir '(signal|slot) *\( *on_action' ui

to new-style connections so that we can catch any future direct
connection conversion issues at compile time.

Change a connection from on_actionCaptureOptions_triggered to
showCaptureOptionsDialog and make showCaptureOptionsDialog public. Fixes
an issue introduced in fcdb77dc.
2022-09-27 21:43:05 +00:00
João Valverde 79d02af2b5 wmem: Remove a redundant ternary operator
wmem_strbuf_grow should set the correct size with regard to max_size,
if set. In any case passing the actual free "raw" size to g_strlcpy is
always the correct thing to do.
2022-09-27 19:01:18 +01:00
João Valverde 9c4a42c07c wmem: Rename some variables
Use length and size consistently. strbuf->len does not
include the terminating nul. strbuf->alloc_len includes
the terminating nul.

Use consistent language and use "length" to mean size without
nul byte and "size" to mean size with all bytes, including nul.
2022-09-27 18:59:00 +01:00
João Valverde e28ef20c8b README.Developer: Add notes about string encoding and best-practices 2022-09-27 17:04:44 +00:00
João Valverde 621257f472 epan: Add a warning for invalid UTF-8 with format_text() 2022-09-27 17:04:44 +00:00
João Valverde 6d06d4e46b Add some UTF-8 debug checks with a compile time flag
Some older dissectors that predate Unicode and parse text protocols
are prone to generate invalid UTF-8 strings. This is a bug and can have
safety implications.

For example passing invalid UTF-8 to proto_tree_add_string() is a
common bug. There are safeguards in format_text() but this should
not be relied on as a general solution to the problem.

For one, as the name implies, it is only used with representation of a
field value, which is not the same as the value itself of an FT_STRING field.
Issue #18317 shows another reason why.

For now this compile flag only enables extra checks for string ftypes,
which covers a subset of proto.h APIs including
proto_tree_append_string(). Later is should be extended to other
interfaces.

This is also not expected to be disabled for release builds because
there are still many dissectors that do not correctly handle strings.
More work is needed to 1) identify them and 2) fix them.

Ping #18317
2022-09-27 17:04:44 +00:00
Gerald Combs 7b53fd127e Tools: Make sure we reset our fuzz ranges.
[skip ci]
2022-09-27 09:57:12 -07:00
Gerald Combs 12334494ba Tools: Our fuzz packet range should be unquoted.
[skip ci]
2022-09-27 09:38:42 -07:00
Jaap Keuter dfce8c9c3d OSSP: Update ESMC dissection to match current recommendation 2022-09-27 11:52:02 +00:00
j.novak@netsystem.cz bb4de1a046 RTP dialogs: Fix: Coloring of QTreeWidgetItem do not work 2022-09-27 09:48:40 +00:00
Gerald Combs dc521850e5 Tools: Fuzz subsets of large files.
If our capture file has more than a designated maximum number of
packets, fuzz a random subset.
2022-09-26 18:38:14 -07:00
John Thacker 749a8d0912 opus: Don't overflow a signed 16-bit integer
The internal sample rate of 48KHz overflows a signed 16-bit
integer, and causes incorrect calculations. Use an unsigned integer.

Fix #18378
2022-09-26 19:55:59 -04:00
Mikael Kanstrup b7066e0819 sshdump: Fix remote-capture-command option
The remote-capture-command option does not work when selecting
remote capture command selection 'other' from the extcap capture
options dialog. Fix strcmp statement to actually check for 'other'.

Fixes: #18381
2022-09-26 20:25:18 +02:00
Dario Lombardo a082ba9dae github: update "options" workflow.
Ref: #18352.
2022-09-26 13:49:48 +00:00
Pascal Quantin 567b759ae2 E1AP: upgrade dissector to v17.2.0 2022-09-26 15:33:55 +02:00
Pascal Quantin 71e11142d1 XnAP: upgrade dissector to v17.2.0 2022-09-26 15:12:37 +02:00
Pascal Quantin 4b095e3f9b X2AP: upgrade dissector to v17.2.0 2022-09-26 12:54:05 +00:00
Pascal Quantin 61fcfc0b0b NGAP: upgrade dissector to v17.2.0 2022-09-26 14:16:27 +02:00
Dr. Lars Völker 4d239d5ff6 TECMP: Only NULL-Frame payload was shown (BUGFIX) 2022-09-26 11:15:26 +00:00
Martin Mathieson 92af8b2f51 ROHC: self-describing length - 4 bytes indicated in 3 bits 2022-09-26 10:57:38 +01:00
Pascal Quantin bac5bc8daf 3GPP NAS: update comments after Extended DRX parameters IE change 2022-09-26 09:37:53 +02:00
Gerald Combs fcdb77dce9 Qt: Manually connect our "Capture" menu actions. 2022-09-25 14:25:21 -07:00
Gerald Combs fc461d1592 Qt: Manually connect our "Go" menu actions. 2022-09-25 13:37:37 -07:00
Gerald Combs a135d741a7 Qt: Manually connect our "View" menu actions. 2022-09-25 19:50:34 +00:00
Pascal Quantin e9318bdee3 S1AP: upgrade dissector to v17.2.0 2022-09-25 19:41:41 +02:00
Gerald Combs 5d4e102b4c [Automatic update for 2022-09-25]
Update manuf, services enterprise numbers, translations, and other items.
2022-09-25 16:43:29 +00:00
John Thacker fd59445e8a smb: Fix dead code due to typo 2022-09-25 15:31:21 +00:00
Pascal Quantin 67814a4f63 NAS EPS: upgrade dissector to v17.8.0 2022-09-25 17:10:36 +02:00
Pascal Quantin 26e5fb43dd GSM A GM: upgrade dissector to v17.8.0 2022-09-25 16:39:33 +02:00
Pau Espin 8009076204 packet-rsl: Support osmocom extension IE Osmux CID
Osmux protocol [1] has historically been used as a replacement of RTP in
the SCCPLite or AoIP interfaces over satellite links, since usually the
satellite link is placed between the BSS (BSC) and the CN (MSC.

However, some network operators found need for Osmux in the Abis
interface, that is, between BTS and BSC. Hence, an Osmocom extension IE
"Osmux CID" was added to the IPAC CRCX/MDCX ip.access Abis
implementation, which is understood by osmo-bts and osmo-bsc. This new
extension IE is similar to the already existing extension IE in the
BSSMAP protocol spoken in AoIP (see BE_OSMOCOM_OSMUX_CID in wireshark
code).
More information on how this IE is used can be found in OsmoBTs and
OsmoBSC user manuals [2][3] (search for "Osmux" keyword).

This patch adds the new IE to the RSL dissector and avoids informing the
RTP subsystem to follow this conversation if the IE is found, since
marking it as an RTP conversation overrides the default or user
configured osmux dissector (UDO port 1984).

[1] https://ftp.osmocom.org/docs/latest/osmux-reference.pdf
[2] https://ftp.osmocom.org/docs/latest/osmobts-usermanual.pdf
[3] https://ftp.osmocom.org/docs/latest/osmobsc-usermanual.pdf
2022-09-25 11:50:11 +00:00
John Thacker eab41f440a http: Fix location_target length regression
The strndup expression accidentally got changed as part of
commit 71e6b0498a to use the
offset instead of the length value.
2022-09-25 07:14:05 -04:00
John Thacker 43073bff09 http: Use the header value length after sanitization
UTF-8 sanitization can change a string's byte length, so
use the correct length now that we're sanitizing it.

Fix #18372. Fix #18373.
2022-09-25 07:03:00 -04:00
John Thacker da68e54efe SMB: Use the string API and produce UTF-8 strings
SMB can have two types of string encodings: Little Endian UTF-16, and
Extended ASCII OEM code page (DOS code pages, like CP 437, 850, 866, etc.)
The strings can either have an exact length, or be null terminated
inside a larger buffer that may contain other fields.

Currently the dissector returns strings in the original encoding for
the Extended ASCII strings, and returns ISO-8859-1 strings, not UTF-8,
for Unicode strings. Neither are correctly handled internally when non
ASCII values are used.

We should always produce UTF-8 strings for internal use.

For the OEM strings, we can't tell what code page it is, so use ENC_ASCII
to be safe. (A preference could be added here and in packet-smb-browser.c for
the default code page.)

For the UTF-16 strings, also produce UTF-8. Continue to handle an odd
case where some Windows 2000 servers terminated UTF-16 strings with only
a single NUL and then provided an odd byte count of the string length
plus the one NUL byte.

Fix #18369
2022-09-25 00:48:49 +00:00
Gerald Combs 24a09965e6 Qt: More menu action cleanup.
We use the convention "actionSomeThing" for action names. Rename some
member functions that used that convention.

Manually connect another action.
2022-09-24 16:03:00 -07:00
Martin Mathieson ca2e561a5b ROHC: More fixes for UDP profile (2) 2022-09-24 21:02:59 +01:00
John Thacker 899db5d3c0 smb: Certain deprecated commands never use Unicode
MS-CIFS indicates that the deprecated commands SMB_COM_SEARCH (0x81),
SMB_COM_FIND (0x82), and SMB_COM_FIND_UNIQUE (0x83) never use
Unicode, and "names are returned in the extended ASCII (OEM)
character set only." That makes sense, as the size in the return
is listed as a fixed 13 bytes. Honor that.
2022-09-24 10:53:54 -04:00
John Thacker 44f733dfee http: Handle field value encoding
RFCs 9110 5.5 is explicit about allowed characters in field values:
"Specification for newly defined fields SHOULD limit their values
to visible US-ASCII octets (VCHAR), SP, and HTAB. A recipient SHOULD
treat other allowed octets in field content (i.e., obs-text [%x80-FF])
as opaque data...  Field values containing CR, LF, or NUL characters
are invalid and dangerous."

Up to RFC 7230, an obsolete "line-folding" mechanism that included
CRLF was allowed.

So NUL is not allowed, and all the known fields we support only allow
ASCII, so for display purposes it is permissible to retrieve the
value as ASCII. tvb_get_string_enc with ENC_ASCII does actually
retrieve a buffer of the full length with internal NULs if they
are in the buffer, but other functions end up truncating the value
at the first null if it exists. We should eventually have expert infos
that flag internal NULs or other invalid values with varying degrees of
severity, and display unknown header types with invalid values as
something like FT_BYTES with BASE_SHOW_ASCII_PRINTABLE.

Continue, for now, to pass along the raw value in the header_value_map
in case some dissector was using that value.

Fix #18368.
2022-09-24 01:38:05 +00:00
Chuck Craft 1d6ee40af4 debian: add new tfs symbol
Added to header file in !8206
2022-09-23 18:13:10 -05:00
Martin Mathieson c1c297868b ROHC: formatting 2022-09-23 22:26:01 +01:00
Gerald Combs de387814bb Qt: Manually connect our "File" menu actions. 2022-09-23 19:41:32 +00:00
Gerald Combs 720090fb86 Qt: Manually connect more "Edit" menu actions.
Followup to ce44047584.
2022-09-23 19:38:07 +00:00
Alexis La Goutte 2b255903ce GENEVE: Display also VNI to decimal format
some solution (VMware NSX) display GENEVE VNI to decimal

Fix #18349
2022-09-23 18:55:11 +00:00
Pascal Quantin fa58d578f7 NAS EPS: upgrade dissector to v17.7.0 2022-09-23 19:41:07 +02:00
Pascal Quantin 0b80cc4fdc GSM A GM: upgrade dissector to v17.7.0 2022-09-23 16:19:15 +02:00