Commit Graph

82083 Commits

Author SHA1 Message Date
Tomasz Moń 8a311003df USB HID: Handle different usage pages in fields
Replace custom keyboard page array handling with generic array handler.
2021-09-10 04:55:49 +00:00
Tomasz Moń 739666a7f5 USB HID: Support extended usages in descriptors
Usage, Usage Minimum and Usage Maximum can be "Extended" Usages. When
parsing report descriptor, respect page encoded in extended usage value.

Remove arbitrary usage count limit, as the usage ranges are limited to
16-bit value and thus the usages array can grow by up by 256 KiB with
single usage range.
2021-09-10 04:55:49 +00:00
Berk Akinci 9d65d3f889 DOC: Remove redundancy in build instructions.
Consolidate build instructions and troubleshooting into WSDG chapter 2.
Remove (moved) troubleshooting note that libpcap is required.

Link from WSUG build instructions to the WSDG chapters.

Reorder WSUG to have install instructions before build instructions for both
Windows and Unix.

Link from WSDG build instructions in WSDG sources chapter back to
WSDG chapter 2.

Offer options to the 'git clone' lines in obtaining sources: '--depth' and
'--shallow-since'

Add brief descriptions of new options mentioned.
2021-09-10 04:38:56 +00:00
David Perry 5076aee044 [#17517] capinfos: machine-readable filetype/encap 2021-09-10 04:25:13 +00:00
Guy Harris dee79a0c81 wtap_opttypes: move more if_filter and packet_verdict stuff together.
As we did in earlier changes.
2021-09-09 15:12:05 -07:00
David Fort d46e31a48a rdp_drdynvc: fix channel name displaying in SOFT_SYNC_REQUEST 2021-09-09 15:37:54 +00:00
David Fort 0da1babbb3 rdp: fix endianess in misc places
Some fields were interpreted with the wrong endianess.
2021-09-09 15:37:54 +00:00
David Perry 84a0141683 [#12331] Persist cmd-line prefs on reloading Lua
Save a list of all user options that were specified on the Wireshark
command line using the `-o` option. Reapply those preferences after
reloading Lua plugins. Fixes the behaviour given in #12331 wherein such
prefs were reset to the defaults, not the command-line values, when
reloading Lua plugins.

When the user changes a preference in the Wireshark UI, remove that
preference from the stored command line options, so it doesn't get reset
when Lua plugins are reloaded again.
2021-09-09 12:58:38 +00:00
Developer Alexander 02285e53b8 Qt: JSON Export - Statusbar info corrected
During a JSON Export "Writing JSON" will displayed in the statusbar.
2021-09-09 09:37:28 +00:00
Dr. Lars Völker be7b4163de BLF: Adding LIN support
This patch adds support for LIN Messages in BLF.
2021-09-09 09:19:36 +00:00
Guy Harris a4a571e680 wtap_opttypes: move the specialized options after the custom options.
Move the if_filter and packet_verdict option stuff after the custom
option stuff in various places.

Fix some comments while we're at it.
2021-09-09 01:33:47 -07:00
Guy Harris 58d053923e pcapng: clean up block length checks.
Use the same style of message for too-short block errors ("pcapng: total
block length XXX of {a,an} XXX is too small...").

Add an additional check for the "skip" Netflix cutom block, to make sure
it has enough room for the 4-byte "skipped" value.
2021-09-09 00:19:36 -07:00
Jim Borden cb88f6d4e8 BLIP: Add next gen Web-Sec-Protocol
Starting with 3.0 there is a new non backwards compatible Web-Sec-Protocol for BLIP, so the plugin should handle both (the differences are irrelevant from Wireshark's standpoint)
2021-09-09 06:38:46 +00:00
Taisuke Sasaki 42372c0dfa BGP: Add BGP-LS SR Local Block TLV (rfc9085)
- Add BGP-LS Prefix Attribute Flags TLV (rfc9085)
- Add BGP-LS Node/Link MSD (rfc8814)
- Add BGP-LS Link Local/Remote Identifiers TLV (rfc5307)
- Modified from error to warning for unsupported BGP-LS Attribute TLVs
2021-09-09 06:22:09 +00:00
John Thacker 69176a0eff IEEE 1722 / MP2T: Call MP2T subdissector from AVTP
Have the IEEE 1722 AVTP dissector call the MP2T dissector when that
is the payload type. Comment out the "if (tree)" statement since
the MP2T dissector needs to be called on the first pass regardless
to handle fragmentation.

Since there is a 4 octet source packet header timestamp before each
MPEG2-TS packet when carried on AVTP, the MP2T dissector has to be
called multiple times per frame. Since the fragmentation data is
indexed by the offset in the tvb passed to the MP2T dissector, create
a table for each MP2T layer in the packet via pinfo->curr_layer_num.
Fix #10702.
2021-09-09 06:04:42 +00:00
Evan Huus bb1286dc3c epan: more work to avoid global memory pool
A few helpers weren't in exception-throwing paths and can just free
unscoped memory. The macro in proto.c is only used in contexts with a
tree, so just use the tree's scope there.
2021-09-08 21:25:40 +00:00
Nardi Ivan 197b67cf8c Fix two memory leaks on ZSTD and LZ4 decompression 2021-09-08 21:08:41 +00:00
Mikael Kanstrup c58c106b30 dot11decrypt: Fix AAD calculation for legacy ccmp implementation
Re-implement below change but for the legacy ccmp decryption used on
3.2 release track but also on later releases when Wireshark is built
with older versions of libgcrypt:

e5e37add9a 802.11 Decrypt: Fix AAD Calculation when HT-Control present in a QoS Data Frame

Ping #17577.
2021-09-08 20:24:31 +00:00
Uli Heilmeier 4e7d10eea1 Credentials Tap: Fix wmem scope for init call
When calling credentials_init() for a tshark live capture we're in the
epan wmem scope.

Fixes: wireshark/wireshark#17576
2021-09-08 20:07:01 +00:00
Roland Knall 48cf9d5497 Qt: IOGraph - correctly add new graphs
If a graph is added it should be a single operation, not multiple setData operations
leading to a myriad of dataChanged signals to be fired, which in turn can hinder redissection.
2021-09-08 19:32:39 +00:00
Developer Alexander 03480fd6e1 epan: export epan_set_always_visible()
Exports (DLL) epan_set_always_visible() to make it accessible for plugins.

This enables post dissection taps to access all fields.
2021-09-08 14:40:24 +00:00
Evan Huus 6caf24e966 tvblist: explicitly scope memory
Allocate the root node in the same pool as the list itself, and make
that pool explicit so we can pass the pinfo scope instead of using the
global packet pool.
2021-09-08 01:37:07 +00:00
Pascal Quantin 530ee0b365 Windows: upgrade Npcap to 1.55 2021-09-07 23:18:19 +02:00
Pascal Quantin 98faf05b6b file_wrappers.c: use LZ4 if the library is 1.7.3 or later 2021-09-07 21:40:44 +02:00
Evan Huus a97e34a1c1 oids: remove global scopes from debug code
It can all just use NULL scope anyway.
2021-09-07 17:39:22 +00:00
Evan Huus 8a4242fb76 proto: prefer memory from tree over global pool
In methods where we're guaranteed to have a non-null tree, prefer memory
from that tree's scoped pool rather than the global packet pool.
2021-09-07 17:22:47 +00:00
Evan Huus 36f9bb412b dvb_chartbl: remove wmem_packet_scope
Short-circuit on a null tree, so that we can reliably use
PNODE_POOL(tree) for a memory pool instead of the global packet scope.
2021-09-07 17:06:08 +00:00
John Thacker d5a3824f54 IEEE1722 AVTP: Support UDP/IP Encapsulation
Fix support for IEEE 1722-2016 Annex J IP Encapsulation.
Dissect extra 4-octet encapsulation_sequence_num field that
is present when carried on UDP/IP. Perform rudimentary sequence
analysis with it. Fix #17389.
2021-09-07 14:06:52 +00:00
Triton Circonflexe 22768e218c Thrift: Allow partial definition of sub-dissectors
When written by hand, it’s difficult to have a fully functional
subdissector for a given command if the structures in it contain at lot
of fields and/or numerous level of sub-structures, making the definition
of all sub-structures mandatory before we have all sub-structures fully
defined before we can dissect anything.

This patch makes it easy not to defined some structure fields and let
the generic Thrift dissector handle them.

If you care only about some fields for your analysis or you have some
obsolete fields that may appear in your captures due to old client but
are no longer defined in the .thrift files, you can still write the sub-
dissector for your protocol just by omitting the obsolete field.

For example:

static const thrift_member_t tcustom_data[] = {
    { &hf_tcustom_data_id, 1, TRUE, DE_THRIFT_T_I64, TMFILL },
    { &hf_tcustom_data_name, 2, TRUE, DE_THRIFT_T_BINARY, TMUTF8 },
    { &hf_tcustom_data_content, 3, TRUE, DE_THRIFT_T_STRUCT, &ett_tcustom_resource, { .members = tcustom_resource } },
    { NULL, 0, FALSE, DE_THRIFT_T_STOP, TMFILL }
};

could become:

static const thrift_member_t tcustom_data[] = {
    { &hf_tcustom_data_id, 1, TRUE, DE_THRIFT_T_I64, TMFILL },
    { &hf_tcustom_data_name, 2, TRUE, DE_THRIFT_T_BINARY, TMUTF8 },
    { NULL, 3, TRUE, DE_THRIFT_T_GENERIC, TMFILL },
    { NULL, 0, FALSE, DE_THRIFT_T_STOP, TMFILL }
};

and avoid the need to define the extremely complex "resource" struct.

In this case, the structured data would be dissected by the generic
dissector while keeping the possibility for the user to filter on the
resource id or name.
2021-09-07 11:36:00 +02:00
David Fort aae500d32b add RDP multi-transport dissector
This patch adds decoding of RDP multi-transport according to MS-RDPEMT, transported
on top of RDP UDP.
2021-09-07 08:13:57 +00:00
David Fort 8a1649c5a5 rdpudp: dissect the RDP UDP protocol
This patch adds a dissector to analyze the RDP UDP protocol according
to MS-RDPEUDP and MS-RDPEUDP2.
2021-09-07 08:13:57 +00:00
David Fort a3eafc6a5b rdp: parses heartbeat messages
This patch adds parsing for Heartbeat packets and also fixes the ett that was used
for this tree.
2021-09-07 08:13:57 +00:00
Alexis La Goutte 1bf1a1ea7c sequence_dialog(Qt): Fix Called C++ object is null 2021-09-07 06:00:28 +00:00
Alexis La Goutte 3eb15f04ad sharkd_session: Fix Branch condition evaluate to a garbage value
sharkd_session.c:3307:18: warning: Branch condition evaluates to a garbage value [core.uninitialized.Branch]
2021-09-07 05:56:36 +00:00
Alexis La Goutte 5fc6549178 pcapng: Fix Branch condition evaluate to a garbage value
wblock->internal is not initialized on pcapng_read_custom_block function
pcapng.c:3747:9: warning: Branch condition evaluates to a garbage value [core.uninitialized.Branch]
2021-09-07 05:56:36 +00:00
Florian Bezold fece6e0440 SOME/IP: Adding dissection support for SOME/IP over TLS
This patch adds support to SOME/IP to be dissected on top of DTLS. This
can be used via the Decode As feature of Wireshark.

This extends the existing support for DTLS.
2021-09-06 15:42:43 +00:00
Anders Broman 1095faf9d8 Diameter: Update Verizon and Cisco AVPs from MR !3731 2021-09-06 14:28:07 +00:00
John Thacker f6e0589f89 MP2T: Expert info, counter drop is PI_SEQUENCE, not MALFORMED 2021-09-06 09:16:58 +00:00
Triton Circonflexe c30e111ceb Thrift: Improve error reporting
Add an expert info for more protocol issues:
- Thrift protocol exceptions.
- Thrift application exceptions.
- Negative field id that are now prohibited in new interfaces.
- Out-of-order field ids (not prohibited but unusual).
2021-09-06 08:46:03 +00:00
Joakim Karlsson 4eeb091eca Diameter: Update some 3GPP AVS to OctetStringOrUTF8 2021-09-06 10:14:00 +02:00
Alexis La Goutte a5494200c6 tiff: Fix Dead Store found by Clang Analyzer
file-tiff.c:794:5: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
2021-09-06 04:21:15 +00:00
Alexis La Goutte 90a060c339 autosar-nm: Fix Dead Store found by Clang Analyzer
packet-autosar-nm.c:572:7: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
2021-09-06 04:21:15 +00:00
Alexis La Goutte a39fcee57a catapult-dct2000: Fix Dead Store found by Clang Analyzer
packet-catapult-dct2000.c:2826:21: warning: Value stored to 'sub_dissector_result' is never read [deadcode.DeadStores]
2021-09-06 04:21:15 +00:00
Alexis La Goutte 7644d6cc4a dvb-s2-bb: Fix Dead Store found by Clang Analyzer
packet-dvb-s2-bb.c:1902:17: warning: Value stored to 'next_tvb' is never read [deadcode.DeadStores]
2021-09-06 04:21:15 +00:00
Alexis La Goutte 104242836b erldp: Fix Dead Store found by Clang Analyzer
packet-erldp.c:403:13: warning: Although the value stored to 'buf_ptr' is used in the enclosing expression, the value is never actually read from 'buf_ptr' [deadcode.DeadStores]
packet-erldp.c:922:9: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
packet-erldp.c:928:7: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
2021-09-06 04:21:15 +00:00
Alexis La Goutte 34c094a6e9 iso15765: Fix Dead Store Found by Clang Analyzer
packet-iso15765.c:534:13: warning: Value stored to 'pci' is never read [deadcode.DeadStores]
2021-09-06 04:21:15 +00:00
Alexis La Goutte c58400a2ed json: Fix Dead Store found by Clang Analyzer
packet-json.c:365:7: warning: Value stored to 'is_valid_unicode_character' is never read [deadcode.DeadStores]
packet-json.c:371:7: warning: Value stored to 'is_valid_unicode_character' is never read [deadcode.DeadStores]
packet-json.c:383:8: warning: Value stored to 'is_valid_unicode_character' is never read [deadcode.DeadStores]
packet-json.c:389:8: warning: Value stored to 'is_valid_unicode_character' is never read [deadcode.DeadStores]
2021-09-06 04:21:14 +00:00
Alexis La Goutte b007d13f57 oran: Fix Dead Store found by Clang Analyzer
packet-oran.c:1073:25: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
2021-09-06 04:21:14 +00:00
Alexis La Goutte 3d0017ec9f rdp: Fix Dead Store found by Clang Analyzer
packet-rdp.c:1600:3: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
packet-rdp.c:1614:3: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
2021-09-06 04:21:14 +00:00
Alexis La Goutte 9b4263fa3c thrift: Fix Dead Store Found by Clang Analyzer
packet-thrift.c:1382:17: warning: Value stored to 'len_pi' is never read [deadcode.DeadStores]
packet-thrift.c:1388:9: warning: Value stored to 'len_pi' is never read [deadcode.DeadStores]
2021-09-06 04:21:14 +00:00