Commit Graph

86133 Commits

Author SHA1 Message Date
João Valverde 358641a5ca SIP: Fix fixed buffer UTF-8 string truncation
Fixes #18699
2022-12-14 08:56:26 +00:00
Dario Lombardo f2eb97e910 Fix ciscodump CID 2022-12-13 20:05:59 +00:00
Alexis La Goutte 37c400afe3 usb-ccid: fix mask found by check_typed_items_calls
epan/dissectors/packet-usb-ccid.c filter= usbccid.dwFeatures.stopIccClk  - mask has odd number of digits 0x100 expected max for FT_BOOLEAN is 8
epan/dissectors/packet-usb-ccid.c filter= usbccid.dwFeatures.nadValNot0accept  - mask has odd number of digits 0x200 expected max for FT_BOOLEAN is 8
epan/dissectors/packet-usb-ccid.c filter= usbccid.dwFeatures.autoIfsd  - mask has odd number of digits 0x400 expected max for FT_BOOLEAN is 8
2022-12-13 14:16:11 +00:00
Alexis La Goutte 594aaca250 usb-ccid: fix typo found by check_typed_item_calls
packet-usb-ccid.c:598 proto_tree_add_item called for hf_ccid_wLevelParameter  -  item type is FT_UINT8 but call has len 2
2022-12-13 14:16:11 +00:00
John Thacker 2fd04b6ba9 bpv6: Fix possible infinite loop
display_extension_block is supposed to return the current offset,
not the number of bytes remaining. The number of bytes remaining
can be less than the current offset and cause an infinite loop.

In the case of an error, set lastheader and return the current
offset in order to break out of the main processing loop.

Fix #18711.
2022-12-13 07:33:19 -05:00
Pascal Quantin 73866d3623 RoHC: fix dissection of IP version alternate encoding for IP profile
As specified in RFC 3843 chapter 3.1
2022-12-12 20:43:04 +00:00
Gerald Combs 7d20bd0b10 Extcap: Clean up our fifo in non-blocking mode.
Use O_NONBLOCK when opening our fifo for cleanup.

Ping #18715
2022-12-12 11:50:00 -08:00
j.novak@netsystem.cz 212b196bee ciscodump: Added support for IOS XE 17.x 2022-12-12 19:49:17 +00:00
Gerald Combs 9581085430 Falcodump: Open our fifo directly.
Just open our fifo directly using our sinsp dumper. Add a couple of
missing regions.
2022-12-12 18:36:52 +00:00
Gerald Combs cb420c7911 Extcap: Create our fifo in a temporary directory.
Instead of creating a temp file, unlinking it, and creating a fifo with
the same name, add create_tempdir() so that we can create a temporary
directory and create a fifo inside that.

This should avoid a race condition in Carbon Black Cloud antivirus,
which if the timing is right, will stat the initial temporary *file*,
miss the fact that it's been replaced with a *fifo*, and open and steal
data^W^W read from it, leaving dumpcap to contend with the truncated
remains.

Adding the unexpected magic number to cap_pipe_open_live()'s error
message helped to debug this. Leave it in since it's handy to have in
that case.

Ping #15587
2022-12-12 18:34:21 +00:00
Tomasz Moń 5aa1871ee0
extcap: Do not hang if extcap doesn't open fifo
Simply open and close the fifo as part of cleanup. Doing so lets dumpcap
know that the capture has finished if extcap did not open the pipe. This
is only needed on *NIX systems, because there was no hang on Windows.

Fixes #18715
2022-12-12 16:54:23 +01:00
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