Commit Graph

26 Commits

Author SHA1 Message Date
Martin Mathieson 714e568f66 Fix some more spelling errors 2024-02-06 10:46:08 +00:00
John Thacker 7b114620c7 opcua: Have a default signature length preference
If the OpenSecureChannel message is not captured, then whether
messages are signed, and what the signature length is is unknown.
This creates a preference that can be set to a default value to use,
instead of assuming that all messages on the channel are unsigned.

Fix #15206
2024-02-05 08:30:57 +00:00
John Thacker 9152670fe5 opcua: Use fragment_add_seq_offset
This is the reassembly API call for fragments that start at a
different value. This is better than examining the entire
chain, and also would have a better chance of working with
out of order fragments (though TCP should handle that for us.)
2024-01-12 14:18:13 +00:00
Gerhard Gappmeier 76f6b5285d opcua: fix payload size for unencrypted chunked messages
fixes #19581
also fix one typo
2024-01-11 14:37:25 +00:00
Stig Bjørlykke 2a9bc63325 Remove init of proto variables
Remove init of proto, header field, expert info and subtree variables.
This will reduces the binary size by approximate 1266320 bytes due to
using .bss to zero-initialize the fields.

The conversion is done using the tools/convert-proto-init.py script.
2023-11-20 08:20:54 +01:00
Stig Bjørlykke 5cedcc970b plugins: Initialize static proto values to 0
Update plugins to not initialize static proto values to -1.
2023-11-07 14:32:47 +00:00
Pascal Quantin 8fc6ea3229 opcua: fix CID 1548379
Protect against a potential null pointer dereference
2023-11-02 14:43:41 +00:00
Gerhard Gappmeier f17f629870 fix return value of decrypt_opcua if decryption fails 2023-11-02 14:43:07 +00:00
Gerhard Gappmeier 3b09f561f2 opcua: add more comments 2023-10-31 21:26:47 +00:00
Gerhard Gappmeier 308336a05d opcua: add sanity check in keylog parser 2023-10-31 21:26:47 +00:00
Gerhard Gappmeier 9f17196a9d opcua: add lost sig_len parsing due to rebasing 2023-10-31 21:26:47 +00:00
Gerhard Gappmeier df8b016ea8 opcua: make strtok_r compatible with MSVC 2023-10-31 21:26:47 +00:00
Gerhard Gappmeier 3c9e7bc58b opcua: implement loading keylog file from pcapng embedded DSB 2023-10-31 21:26:47 +00:00
Gerhard Gappmeier 33b66952ac opcua: fix parsing of service payload for messages without payload
This fixes and issue reported by John Thacker.
2023-10-27 14:02:24 +00:00
Gerhard Gappmeier adaacddc48 opcua: add decryption support 2023-10-26 17:57:04 +00:00
David Perry 55db118c0f Use `register_dissector()` in plugins
Within `plugins/epan/`, change calls of `create_dissector_handle()` to
instead call `register_dissector()` with a name for the dissector.

This change allows affected dissectors to be findable by calls to
`find_dissector()`. In turn, this opens up more command-line use for
these protocols, including fuzzshark and rawshark, as well as lua use
via `Dissector.get()`.

Most changes are to sub-dissectors of the wimax plugin. For these I kept
the naming convention for dissector names used by e.g.
`wimax/msg_aas_beam.c` even though it's unwieldy.

Some of the plugins did use `register_dissector()` but with `-1` as the
protocol ID argument. I changed those to pass the actual protocol ID.

Partially addresses #5612
2023-05-02 13:48:36 -04:00
Martin Mathieson 709d65883f Fix some cppcheck issues 2022-11-18 10:07:57 +00:00
John Thacker 1a04473ca8 opcua: Quiet a Coverity warning
It really shouldn't be possible to have a fragment head with
no fragment items here, but quiet Coverity CID 1516904 here.
2022-11-15 17:08:53 -05:00
John Thacker 4f3b028d94 epan: Separate fragment_head and fragment_item
Separate fragment_head and fragment_item into two
different types of structs.

Remove "offset" from fragment_head, which was unused,
making fragment heads 4 bytes smaller.

Remove fragment_nr_offset, datalen, reassembled_in,
reas_in_layer_num, and error from fragment_item,
making them 24 bytes smaller.

Change a few dissectors which were using fragment_head
and fragment_item indistinguishably.

Ping #17311
2022-11-14 01:18:11 +00:00
Anders Broman 83a0ec0647 opcua: Squelch a couple of warnings by adding casts. 2022-09-07 08:19:39 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Hannes Mezger 348f2cfd6e opcua: show invalid OPC UA messages when 'opcua' filter is set
Change-Id: Ia9d14c14c20ef35aefbb0e6b3853450074b4c0a3
Reviewed-on: https://code.wireshark.org/review/31020
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-13 06:39:22 +00:00
Hannes Mezger 49c6f8e432 opcua: add support for new reverse hello message
The reverse hello message type was added in OPC UA specification 1.04.

Change-Id: I00095e35049b8f38ab183ded1b96af51d788d986
Reviewed-on: https://code.wireshark.org/review/31018
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-12 20:22:06 +00:00
Hannes Mezger 28a7a79cac opcua: prevent opcua dissector crash by limiting nesting depth
The OPC UA types DiagnosticInfo, Variant and ExtensionObject can be
nested, which can lead to stack overflows when parsing specially
crafted packets. This is fixed by storing the current nesting depth
as expert info.
The corresponding CVE is https://cve.mitre.org/cgi-bin/cvename.cgi?name=2018-12086
The corresponding security bulletin of the OPC Foundation is https://opcfoundation-onlineapplications.org/faq/SecurityBulletins/OPC_Foundation_Security_Bulletin_CVE-2018-12086.pdf

Change-Id: I5f6da3a3e269f6db1b690b77470ddf60045bcedd
Reviewed-on: https://code.wireshark.org/review/29645
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-14 04:11:20 +00:00
Dario Lombardo d2d1f793f8 plugins: use SPDX identifiers.
Change-Id: I8155573933daeb69c6e4c95c6702bdd6fc1fa89b
Reviewed-on: https://code.wireshark.org/review/25707
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-09 14:12:48 +00:00
João Valverde 5352ef42f9 plugins: Add source tree subfolder for plugin library
This allows some simplification and makes things more consistent,
particularly for loading plugins from the build dir.

Also fixes the issue reported here:

https://www.wireshark.org/lists/wireshark-dev/201801/msg00061.html

Change-Id: I0d8a000ee679172bccad546a3b0c47a79486f44d
Reviewed-on: https://code.wireshark.org/review/25329
Petri-Dish: João Valverde <j@v6e.pt>
Reviewed-by: João Valverde <j@v6e.pt>
2018-01-16 08:51:37 +00:00