Commit Graph

85736 Commits

Author SHA1 Message Date
John Thacker 526ccef5f4 per: Implement UTF8String properly
UTF8String is not a known-multiplier character string, since the
characters are variable width. That means that a size constraint
in characters doesn't correspond to a fixed number of octets, and
thus that constraints are never PER-visible. (X.691 27.6) That
includes size constraints, extensions, permitted alphabets, etc.
The length determinant is thus the unconstrained type, and always
at least an entire octet instead of ever taking up a smaller
number of bits.

Extract the string as UTF-8 after aligning as necessary, which
will deal with illegal encodings.

Fix #18600.
2022-11-08 07:05:42 -05:00
Dario Lombardo c2b59567d3 tshark: update man to explain why some fields are skipped in elastic-mapping. 2022-11-08 06:24:50 +00:00
Gerald Combs fd92228e54 capture: Remove an unused variable.
Fix

```
capture/ws80211_utils.c:328:6: error: variable 'bandidx' set but not used [-Werror,-Wunused-but-set-variable]
        int bandidx = 1;
            ^
```
2022-11-07 11:24:27 -08:00
John Thacker 3ec1e6ca59 afs: Validate vectorized strings
The RXStringV type has one character (octet) stored per 32
bit word. There's no real indication of the string encoding
(possibly locale dependent, maybe ASCII or UTF-8.) Validate
it as UTF-8 for now, to produce good UTF-8 and handle the latter
two cases.

Fix #18583.
2022-11-07 09:36:52 +00:00
Peter Wu df478a365d dfilter: treat carriage returns as whitespace
Fixes #18595
2022-11-07 01:00:50 +00:00
Stig Bjørlykke 16afad10fb Qt: Fix a deprecated warning
warning: 'parentWidget' is deprecated: Use parent() with qobject_cast()
instead [-Wdeprecated-declarations]
2022-11-06 22:33:25 +00:00
John Thacker f4965d5dec wmem: Make wmem_strbuf_utf8_validate endpptr param optional
Often we don't care about the last valid character, just if
the buffer is valid.
2022-11-06 21:11:36 +00:00
Gerald Combs 0928a25d1f GitLab CI: Switch to clang 15. 2022-11-06 10:33:09 -08:00
Gerald Combs 0bfe5bed72 [Automatic update for 2022-11-06]
Update manuf, services enterprise numbers, translations, and other items.
2022-11-06 17:57:36 +00:00
Pascal Quantin a1feafad6c IPv6: fix embedded IPv4 address dissection when using Well-Known Prefix
See https://www.wireshark.org/lists/wireshark-dev/202211/msg00000.html
2022-11-06 16:57:59 +01:00
Martin Gallo 0562fe46f6 SAPIGS: Added SAP IGS as main dissector 2022-11-06 14:27:25 +00:00
John Thacker 23f54390f1 hl7: Validate encoding
Translate the raw strings from the struct from ASCII before adding
to the columns.

Fix #18598
2022-11-06 06:23:45 -05:00
John Thacker 9a3d091933 mmse: Handle encoding
Use tvb_get_stringz_enc with ENC_ASCII instead of tvb_strsize
and tvb_memdup. Note that, in MMS encoding at least,
OMA-TS-MMS-CONF says that Text-string (where encoding is
not specified) is always US-ASCII.

For Encoded-string-values, get and process the MIBEnum charset,
at least when it's an integer (which OMA-TS-MMS-CONF says it
must be.)

Fix #18575
2022-11-06 05:29:56 -05:00
Martin Mathieson b860351e7f Packet List: preserve horizontal scroll extent for PgUp/PgDn 2022-11-05 21:56:19 +00:00
Michael Tuexen bcbd6c3974 sctp: add support for Zero Checksum Acceptable parameter 2022-11-05 20:27:36 +00:00
John Thacker d2f7b8907c wbxml: Fix encoding
Whenever a string is inline or retrieved from the string table,
it needs to use the document encoding. Not tvb_format_text
(which always assumes UTF-8, though that is the default for WBXML
if we don't know otherwise), and *definitely* not tvb_get_ptr.

Replace a bunch of calls of tvb_strsize and tvb_format_text
(and one tvb_get_ptr) with tvb_get_stringz_enc with the
document encoding, which is now stored in packet level proto
data. (There should be a fallback to parsing it from the
Content-Type string, if the calling dissector provides it.)

Fix #18573
2022-11-05 15:02:16 +00:00
Martin Mathieson 07627f0230 E2AP: peek at RAN function name using tvb_get_stringz_enc 2022-11-05 12:27:44 +00:00
Pascal Quantin ae3f4832c5 Windows: install etwdump extcap utility by default
Now that Microsoft own documentation references this utility,
it probably makes sense to activate it by default
2022-11-04 23:30:56 +00:00
John Thacker f47f114bb2 skinny: Check encoding
The displayLabel type in SCCP (skinny) is ASCII where certain
bytes are replaced with common phrases from a codebook. When
displaying the replaced string, remember to replace the non
ASCII characters with REPLACMENT CHARACTERS.

Fix #18592
2022-11-03 21:36:15 -04:00
John Thacker 73c291029d skinny: Resync xml code with dissector, regenerate
Make changes to packet-skinny.c.in and SkinnyProtocolOptimized.xml
that incorporate changes from 67f05835ca
and 8efad466c4 made to the dissector
manually and regenerate. Also fix a case where a comment mixed
tabs and spaces, which caused the python conversion tool to complain.
2022-11-03 20:55:05 -04:00
John Thacker 8c585cc228 skinny: Convert parse_xml2skinny_dissector.py to Py3
Convert parse_xml2skinny_dissector.py to Python 3.
This is mostly the output of running 2to3, but some of the
uses of dict.keys() were left as is instead of being converted
to lists, since only membership was tested.

The dissector still needs to be regenerated, which will happen
in a next commit, so that this change can be easily backported.
2022-11-03 20:28:19 -04:00
Uli Heilmeier d1e3ef36c5 WSUG: consistent spelling of acknowledgment
Use "acknowledgment" as we have it in the TCP dissector.
2022-11-03 18:37:32 +00:00
Gerald Combs 5084857eed WSUG: Document the layer operator.
Copy over the "layer operator" section from the wireshark-filter man
page.

Fix the "at operator" level in the wireshark-filter man page.
2022-11-03 14:23:12 +00:00
Pascal Quantin 1505fa1b4b addr_resolv: define default port values for DNS resolution UAT
This ensures forward compatibility when using Wireshark 4.x or later
(see #18214)
2022-11-03 12:19:00 +00:00
John Thacker 5fa07d18ec xcsl: Check encoding of characters
Separate the tokens in xcsl using tvb_ws_mempbrk_pattern_guint8
instead of the dissector doing it manually.
Retrieve the ASCII token strings with tvb_get_string_enc to do
conversion to UTF-8.

Fix #18587
2022-11-03 07:19:46 -04:00
Martin Mathieson 49d21db1a7 DBUS: Make a function static 2022-11-03 11:17:56 +00:00
Pascal Quantin 798c1a8e6d EVS: fix frame format detection heuristics
As stated in 3GPP 26.445 chapter A.2.2.1.4.2, RTP padding must be taken
into account to discrimate between Header-Full format and Compact format

Closes #18498
2022-11-03 10:23:40 +00:00
John Thacker df4a0f289c alljoyn: Use a FT_CHAR and value_string for the type id
The type id is a natural FT_CHAR, which is much easier than
using a custom formatting function. This also avoids creating
bogus UTF-8

Fix #18582.
2022-11-02 21:44:36 -04:00
John Thacker 3e0ee841b1 epan: Simplify construct_match_selected_string
Since fvalue_to_string_repr does take the field base
as a parameter and that affects the representation,
an existing comment is no longer true, and we can
get rid of a large amount of duplicative special
handling for integer-based types.
2022-11-02 18:16:59 -04:00
Martin Mathieson 3ac86775dc Fix some spelling errors 2022-11-02 20:54:24 +00:00
John Thacker e449b560c0 epan: Properly generate filter expressions for custom columns
Properly generate filter expressions for custom columns by
using proto_construct_match_selected_string on each value and
then joining them together later instead of trying to split
the column expression value.

This ensures that escaping is done properly for display filter
strings, that commas internal to field values are not confused
with commas between occurrences, that for multifield columns
we can distinguish which field each value matches, etc.

It's not entirely clear whether AND or OR logic is appropriate
for multiple occurrences; currently OR is used.

Bump glib requirement to 2.54 for g_ptr_array_find_with_equal_func
(this doesn't drop support for any major distribution that already
meets our other library requirements, like Qt.)

Fix #18001.
2022-11-02 19:46:11 +00:00
Martin Mathieson c6a0b9b64a E2AP: Add some missing IEs 2022-11-02 16:56:12 +00:00
Emmanuel Grumbach 9339b357ea ieee80211: add a dissector for the protected EHT EML OP MODE notif
This an action frame to update the EMLSR / EMLMR mode.
This adds partial support for this frame.
It is fairly hairy to parse it because of its variable format, so for
now, just parse the EMLSR part and leave the EMLMR part for later.
2022-11-02 14:24:18 +00:00
Pau Espin 12a5c10664 gsm_osmux: Fix AMR_SID frame type payload size
According to TS 26.101, AMR_SID payload is 39 bits.
Hence, (39+7)/8 = 5, rounding to octet boundaries.

This fixes incorrect dissecting of Osmux frames containing AMR_SID
payloads.
2022-11-02 11:40:37 +01:00
Pascal Quantin a1c55f2356 GOOSE: add back goose.floating_point filter
Let's add it as a hidden filter for IEEE 754 single precision floating point

Closes #18491
2022-11-01 19:25:02 +00:00
Roland Knall fd7716542c Qt: Move generic methods to utils
Move the utils for checking for the last used directory and storing
it out of ProfileDialog, as they are not Profiles specific
2022-11-01 18:12:07 +00:00
Chuck Craft 91c0669fb7 Qt: KeyboardInputInterval - allow more relaxed typing for keyboardSearch
Gtk popped up a search box when typing in the tree view.
Most places in Qt, a Search: field was added to the dialog.
Looks possible to buffer keystrokes and do a string search in Qt.

Default value is 400ms (even on Windows). Average typing speed of
200 cpm = 300ms per character = too close to 400ms when searching
the protocol name in Preferences -> Protocols.
2022-11-01 17:39:16 +00:00
Chuck Craft 0bfa32ee6c wsdg: order Lua sections as a user may require them
Roughly follows order in previous chapter of examples.
2022-11-01 17:33:12 +00:00
David Perry 636c2d21ac Allow user-defined labels for Bluetooth UUIDs 2022-11-01 17:30:32 +00:00
John Thacker 80e287f82c Reset the "current conversation elements" after each dissector call
packet_info has items that correspond to the single "most recent"
conversation set via conversation_set_conv_addr_port_endpoints or
conversation_set_elements_by_id. These should be reset after each
call of a dissector, because they are only relevant for the
dissector and any additional higher level dissectors it calls.

Lower level protocols and protocols at the same level (i.e., in
different PDUs of a shared lower level protocol) don't want to
automatically use those conversation elements to find the current
conversation.

Separately, there should be an array or linked list of all conversation
elements set in a packet, so that it can be used by the conversation table,
conversation filters, etc., instead of just accessing the most recent
conversation / conversation based on the last set address and ports.

Fix #18278
2022-11-01 17:26:14 +00:00
Uli Heilmeier 5723e43293 BGP: Adding support for RFC8365
Fixes: #18393
2022-11-01 15:47:31 +00:00
David Perry f2105250fa Dissector CMakeLists: custom header+support files 2022-11-01 14:13:57 +00:00
David Perry c18809a861 Change some `wmem_packet_scope()` to `pinfo->pool` 2022-11-01 14:03:44 +00:00
Pascal Quantin dbc688ccb9 F1AP: upgrade dissector to v17.2.0 2022-11-01 12:02:09 +00:00
Uli Heilmeier c2242455e7 Gitlab issue template: Info how to upload a file
Add info on how to attach a file to an issue.
2022-11-01 10:39:50 +00:00
John Thacker dcbd3874d3 tls: add support for DESEGMENT_UNTIL_FIN, sequence numbers
Add a tlsinfo struct that is similar to tcpinfo, and carries
the sequence number (within the TLS stream) and the end of
stream notification (from the TCP FIN or close_notify alerts)
in addition to the session app handle pointer already used
by TLS heuristic dissectors.

Have HTTP use the end of stream notification in order to
handle DESEGMENT_UNTIL_FIN the same way it does when HTTP
is directly over TCP. Also have HTTP use the sequence number
in order to reduce chunked processing from O(N^2) to O(N)
similar to done over TCP.

Update all the TLS heuristic dissectors that set the app
handle to use the new structure.

Note the workaround for the issue #15159 - the TLS dissector
has to report to the TCP dissector that desegmentation at FIN
is required, so that the TCP dissector will know to call the
TLS dissector at FIN. However, the TLS dissector does not request
that the TCP dissector resend bytes belonging to records that
TLS has already desegmented (and decrypted, if possible), to
avoid decrypting twice (and upsetting the decoder state.)

This can mean the TCP dissector calling the TLS dissector to
desegment at FIN with a zero byte payload. In such as case, the
TLS dissector artificially returns "1" byte dissected to avoid
indicating rejecting the payload and having the TLS (and subdissector)
layers removed. (TCP ignores the value returned when desegmenting
at FIN.)

Fix #9154. Fix #14382.
2022-11-01 10:03:35 +00:00
Eugène Adell 6759377b93 TCP: Overriding of the automatic SEQ Analysis 2022-11-01 10:01:35 +00:00
John Thacker 891716800b http: Store request/response data there, not in the conversation
The host, request method, request URI, and response code are
information that are local to a request/response pair. Storing
them in the conversation data struct means that we only have access
to one set of values at any one point.

Currently they are updated every time a packet is dissected,
which is fine for sequential processing but causes unexpected
behavior when scrolling the window upwards, going directly
to a packet, or filtering, among other out of order behavior.

Store the values in the per packet data, and create the
file scoped data only on the first pass. The conversation
level data will have access to the final http_req_res_t
struct, which is useful for connections that Upgrade to a
different dissector.

Also, when a response code is in the Informational 1xx category,
that means it is an interim response and the next response could
be for the same request. (This affects 100 Continue, 103 Early
Hints, etc.)

Fix #16753.
2022-11-01 09:56:41 +00:00
John Thacker 1293f15897 AMQP: Add field table values as fields
Add the name, type, and values of field tables and arrays as
fields under the FT_NONE header. This makes them filterable
and show up in JSON export.

Fix #18385
2022-11-01 09:54:03 +00:00
HOMEPC\eaosk cabe0e0239 Filling in information about the server in the tap listener 2022-11-01 09:15:30 +00:00