Commit Graph

86072 Commits

Author SHA1 Message Date
John Thacker f0002e0e3d umts_fp: Handle absent checksums when there is no payload
3GPP TS 25.427 and TS 25.435 both say that the Payload CRC IE
may only be present if the frame contains payload for E-DCH
frames, even where the setup of the transport bearer indicated
that the CRC would be present otherwise. So if there's no payload
and the CRC is missing, treat that as missing-but-expected rather
than marking the packet as malformed.

Take the opportunity to switch to proto_tree_add_checksum, which
handles all the various cases. Ping #8859
2022-12-12 15:00:27 +00:00
John Thacker ec30a03387 usb-video: Validate encoding of fourcc
Don't add raw bytes as a string; convert to UTF-8.

Fix #18713.
2022-12-12 08:41:42 -05:00
Uli Heilmeier 740778e16d Colorfilters: Updating TTL low or unexpected
Adding some more protocols and a rule for IPv6.

Fixes: #18593
2022-12-12 12:38:29 +00:00
j.novak@netsystem.cz 2e22eb8357 ciscodump: Added noisy messages for troubleshooting 2022-12-12 07:50:46 +00:00
Gerald Combs d44c4193e0 macOS packaging: Clarify an issue with libbrotli. 2022-12-11 20:31:46 +00:00
Gerald Combs 3924162f00 [Automatic update for 2022-12-11]
Update manuf, services enterprise numbers, translations, and other items.

services failed.
2022-12-11 20:24:56 +00:00
Ludovic Rousseau 699e9162d8 CCID USB: decode PC_RDR_SET_PARAMS & RDR_PC_PARAMS
Add decoding of the abProtocolDataStructure part of the command and the
response.
2022-12-11 15:55:51 +01:00
Ludovic Rousseau 5a260568b6 CCID USB: Correctrly identify protocol number
The bProtocolNum field is at offset 9, not 8.
Offset 8 is already used for bError.
2022-12-11 15:55:51 +01:00
Tomasz Moń cf6fd1248f
USB: Fix Darwin source and destination handling
Set the direction based on request type in a similar manner as it done
for other URB types, i.e. set source to host on URB submit. Correctly
set bus number based on locationID upper 8 bits.

Fixes #16768
2022-12-10 19:40:34 +01:00
Guy Harris 17d7b7cb73 wslua_proto: document the init and prefs_changed functions.
Don't just indicate that they exist and are settable, indicate what the
*do*.

See https://ask.wireshark.org/question/29843/how-to-maintain-a-packetfile-specific-var/.
2022-12-10 02:49:52 -08:00
João Valverde a74027ad00 wiretap: Validate UTF-8 encoding for pcapng
Validate UTF-8 encoding for pcapng string options. To
avoid two unnecessary memory allocations for invalid strings and
make the code cleaner a new wtap_block_add_string_option_owned()
function is used.

Add UTF-8 debug check for wiretap API.

Fixes #18703.
2022-12-09 19:17:05 +00:00
Dario Lombardo c64eaf87af
github: install cmake and winflexbison alongside other windows pkgs. 2022-12-09 17:27:46 +01:00
John Thacker 29c6f4ebf1 H224: Add for Decode As
Add H224 as a possible type for Decode As for RTP Payload Type

Fix #18680
2022-12-09 10:13:00 +00:00
Chien Wong 82a0a5215d ieee80211: Fix SAE Confirm dissecting
IEEE 802.11-2020, Section 12.4.7.6 says that an SAE Confirm message,
with a status code not equal to SUCCESS, shall indicate that a peer
rejects a previously sent SAE Confirm message. In this case, the Confirm
message may not carry a Send-Confirm field or a Confirm field, as
hostapd does. So we simply ignore possible fields following Status code.

Signed-off-by: Chien Wong <m@xv97.com>
2022-12-09 06:37:51 +00:00
Odysseus Yang c19f31247f MBIM: Remove repeated hf_mbim_ms_device_slot_mapping_info_map_count 2022-12-08 20:42:58 +00:00
Gerald Combs 48bb59d096 Docs: Remove some leftover Perl POD markup. 2022-12-08 17:01:22 +00:00
AndersBroman dae36edbda debian:add missing symbols 2022-12-08 13:41:57 +01:00
João Valverde d86a9910e5 tools/checklicense: Skip build directories
Skip a source tree root directory starting with 'build' (by
convention).

Remove previous logic from Chromium that does not apply to us.
2022-12-08 07:15:52 +00:00
John Thacker bcc77ab189 http-urlencoded: Optimize parsing
Use tvb_find_guint8 and tvb_ws_mepbrk to find the
token boundaries for www-form-urlencoded. Use tvb_memcpy
to copy groups of bytes that don't have special characters
like + or %.

This is considerably more optimized (e.g. find_guint8 uses
memchr) than the naive loop, and speeds up the relevant part
by up to 10x.

Also handle cases where value is empty and there is no =
by splitting on &, instead of looking for the next =.

Together with bd1f2cc996, fix #13779.
2022-12-08 02:28:37 +00:00
David Perry d3fd7a92ec PCEP: Stub in support for more objects 2022-12-07 18:53:51 +00:00
David Perry 3d290f0248 Demonstrate `CUSTOM_TSHARK_TAP_SRC` for CMake 2022-12-07 18:50:28 +00:00
Moshe Kaplan f413260df9 WSLUA: Add new lua function register_packet_menu()
This adds support to Wireshark for custom context menus for packets, so
that when a packet's context menu is opened (e.g., by right-clicking),
Wireshark can support doing things like "run a program" or
"open a URL" with a field from the packet as a parameter. Note that
this is similar to ArcSight's integration commands feature.

For example, it could be used like the following:

```
ROBTEX_URL = "https://www.robtex.com/dns-lookup/"
local function search_robtex(...)
    local fields = {...};

    for i, field in ipairs( fields ) do
        if (field.name == 'http.host') then
            browser_open_url(ROBTEX_URL .. field.value)
            break
        end
    end
end
register_packet_menu("Search host in Robtex", search_robtex, "http.host");
```

Fixes issue #14998
2022-12-07 18:47:14 +00:00
Chuck Craft eff7cd15b0 github: repo_lockdown v2->v3 (node12->node16)
Last item on #18462. Will manually close after a good run on github.
2022-12-07 09:04:03 +00:00
Chuck Craft e490a3dd92 WSUG: (PDF) add fallback font for missing up/down arrows
https://github.com/asciidoctor/asciidoctor-pdf/issues/1811
Up/down arrow symbols not rendered to pdf #1811

asciidoctor-pdf bundled fonts don't include an Apple cmd symbol.
use "Cmd" as elsewhere in the WSDG.
2022-12-06 19:18:14 -06:00
Alexis Gryta 77a1cb0636 rpm packaging: Add .el7, .fc38, ... 2022-12-06 20:24:39 +00:00
Gerald Combs 932f4ff893 Qt: Don't use QString::toLocal8Bit().
As the QString::toLocal8Bit() documentation says,

"On Unix systems this is equivalen to toUtf8(), on Windows the systems
current code page is being used."

This is problematic for the Packet Comments dialog, since the comments
need to be UTF-8 as per the pcapng specification. Use toUtf8() instead
there and in the Import Text dialog.

Remove the toLocal8Bit() calls from the Extcap Options dialog since they
weren'nt needed.

Blind attempt at fixing #18698.
2022-12-06 17:19:07 +00:00
Tomasz Moń bad5ae8c42
USB: Allow registering protocol specific dissectors
Formerly only the class specific dissectors could be registered for
bulk, control and interrupt endpoints. While this is sufficient for
major classes, there are some classes that only use one or two of
possible class/subclass/protocol triple values. Allow registering
specific triples so appropriate dissector can be automatically selected
based on CONFIGURATION DESCRIPTOR data.

Register DFU Run-Time and DFU Mode triples so user no longer needs to
manually set Decode As for USB DFU.
2022-12-06 16:36:18 +01:00
John Thacker 74b1c07f91 test: Skip Follow HTTP2 test without Nghttp2
The expected test output is with the headers decompressed, which
we can't do without Nghttp2. (It outputs the compressed headers
if we don't have it, so we could test for that instead.)

Fix #18707
2022-12-06 07:21:58 -05:00
Tomasz Moń 2fcc819366
USBLL: Correctly handle last fragment retransmissions
Add fragment_add_check_with_fallback() and use it in USBLL dissector
instead of fragment_add_check() to avoid last fragment retransmissions
from being treated as separate transfers. With this change, the last
fragment retransmissions are correctly grouped together with the rest
of the transfer.

Only skip single fragment reassembly if retransmission is not possible
at the protocol level, i.e. for SETUP DATA0 (when it is not merged with
OUT data) and for isochronous transfers. The reassembly must not be
skipped for other transfers (especially for full-speed bulk) because
otherwise it wouldn't be possible to group retransmissions together with
the first data packet.

Do not use DATA0/DATA1 tracking for isochronous transfers. Isochronous
data cannot be retransmitted because there are no handshakes (there is
no ACK nor NAK after isochronous data packets).
2022-12-06 07:26:02 +01:00
Chuck Craft d153113cdf WSDG: retire Visual Studio 2019 for VS2022 2022-12-05 17:52:34 -06:00
Gerald Combs cb85a4b1a4 Qt: Convert our widgets and models to new-style signals & slots
Convert our remaining widget and model code to new-style signals and
slots.
2022-12-05 19:53:34 +00:00
Gerald Combs 0c1a10b02b Qt: Update an action name.
647978b8be renamed actionAnalyzeCreateAColumn to
actionAnalyzeApplyAsColumn. Update the packet list accordingly.
2022-12-05 10:03:18 -08:00
Stig Bjørlykke 6558b58e58 dtls: Support Connection ID when using Block Ciphers
Add support for DTLS Connection ID when using Block Ciphers
with the deprecated extention type (53) from
draft-ietf-tls-dtls-connection-id-07.

Closes #18705
2022-12-05 14:05:34 +00:00
João Valverde 237b7d02fe Update release notes 2022-12-05 13:41:33 +00:00
João Valverde b29ee628e2 IPv6: Remove some redundancies in address detail
The loopback and unspecified addresses are repeated. Keep
only the "special purpose" field, in accordance with the
IANA registry (and unlike RFC 4291) to remove the redundancy.

Add the "Unique Local Unicast" range to address space field,
also from the IANA registry.

Unique-Local and Link-Local are still repeated in both fields.
Oh well...
2022-12-05 13:39:38 +00:00
João Valverde d216f0a6e2 IPv6: Add special-purpose address detail
Add a field to show special purpose assignments listed in [1].

[1] https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
2022-12-05 13:39:14 +00:00
João Valverde f8d308e9af Kafka: Add more loop checks
Add a safeguard to limit the maximum number of iterations.

Do not allocate a new buffer for every loop iterations in a loop that
depends on the result of the decompression routine.

Either allocate the buffer once or free after use. Defensive programming
is more important than speed in this case.
2022-12-05 11:53:31 +00:00
João Valverde 60cb3dd3c6 CMake: Remove -Wjump-misses-init warning
If the jump misses init it's probably because the variable is
not used. Don't force contortions to avoid this common and
harmless case of "missing init" for an unused variable after
jumping.
2022-12-05 11:53:31 +00:00
João Valverde 2897e904f9 CMake: Remove redundant warning
-Wunused-const-variable is enabled with -Wunused-variable
which is enabled by -Wall.
2022-12-05 11:53:23 +00:00
Kevin Albertson 266a0d38b4 kafka: fix note of ZSTD_decompressStream return 2022-12-05 00:16:59 +00:00
Kevin Albertson 9412adf7bf kafka: stop decompressing once all input is consumed 2022-12-05 00:16:59 +00:00
John Thacker c36dde6e13 nxp_802154_sniffer: Add heuristics
UDP port 49999 is not IANA registered, so add some heuristics
to the NXP 802.15.4 sniffer so that it doesn't claim packets
from other protocols that have chosen that ephemeral port.

Don't return 0 after already adding things to the tree; do that
check in the heuristics.

Fix #18695
2022-12-04 23:51:10 +00:00
Gerald Combs 647978b8be Qt: Manually connect our "Analyze" menu actions. 2022-12-04 22:54:01 +00:00
Gerald Combs 3b7df80a0a [Automatic update for 2022-12-04]
Update manuf, services enterprise numbers, translations, and other items.
2022-12-04 16:48:16 +00:00
Martin Mathieson eba1f048b3 E2AP: Use S-NSSAI field in KPM 2022-12-04 13:38:12 +00:00
João Valverde f96885ab06 IPv6: Add multicast scope and flags address detail 2022-12-04 12:57:49 +00:00
Gerald Combs 5eb2a7f7b7 Qt: Miscellaneous ByteViewText fixes.
Don't use isEmpty() internally. Name a variable "em_width_" to match the
convention we use elsewhere. Use our viewport's font metrics.
2022-12-03 18:47:36 +00:00
Martin Mathieson b7c3bae518 check_typed_item_calls: add check for add_bitmask fields 2022-12-03 17:15:24 +00:00
John Thacker bd1f2cc996 epan: Use realloc when extending the uncompressed buffer
tvb_uncompress initially allocates an output buffer of twice the
input size. It is typical to have a compression ratio of 2:1 or
5:1, but in the extreme case (lots of all identical bytes), 1030:1
is possible.

When extending the output buffer, instead of always malloc'ing
a new buffer and memcpy'ing the old buffer into it, call realloc,
which at least some (most?) of the time will extend the current
buffer in place instead. This should reduce the time to unzip
from always O(N^2) (where N is the compression ratio) to something
average case more like O(N) or O(N log N), depending on how often
it actually copies the data. It only really affects pathological
cases.

Related to #13779.
2022-12-03 13:00:28 +00:00
João Valverde 868313956f proto: Tweak admonition for proto_tree_add_string()
Try the clarify the distinction and implications of a string
value vs a string label.
2022-12-03 11:28:48 +00:00