Commit Graph

43265 Commits

Author SHA1 Message Date
Developer Alexander 2051cadf99 can: Optimized column info for better readability
Column info is tuned for better readability. It containes CAN ID and Length.
The same applies to protocol item within protocol tree.

Entire packet data (payload) should not be printed to column info by default.
So this behaviour is removed.
2021-07-17 07:15:27 +00:00
Dr. Lars Völker 27c72d1edc LIN: Fix ID parsing (bugfix) 2021-07-16 17:56:46 +02:00
Dr. Lars Völker 73bb25bbc9 BLF: fix clang warnings 2021-07-16 14:45:21 +00:00
Dr. Lars Völker c22846d898 ISO15765: Add support for the new CAN API
This patch allows to register single IDs for CAN.
2021-07-16 10:09:44 +00:00
Arkady Gilinsky 4742371c97 oampdu: Add Network port declaration and it's parsing to GetRequest packets
* Declarations were added according to CableLab specification

Signed-off-by: Arkady Gilinsky <8351139-ark-g@users.noreply.gitlab.com>
2021-07-16 09:44:54 +00:00
Dr. Lars Völker 4cb4217dfd TECMP: Adding a filter for Channel ID names
This patch allows adding a channel name column or use a filter for it.
2021-07-16 09:28:45 +00:00
Dr. Lars Völker e0055d0698 Signal-PDU: Add support for the new CAN API
This patch directly registers configured CAN IDs.
2021-07-16 09:12:18 +00:00
Dr. Lars Völker 102a952533 CAN: Adding support for more specific tables (2)
This patch changes TECMP, 1722, and caneth to use the new
socketcan_call_subdissectors method.
2021-07-16 08:27:11 +00:00
Jaap Keuter fba16c88f4 JUNIPER: Set proper item length for protocol layer 2021-07-16 08:10:34 +00:00
Dr. Lars Völker 796819c955 BLF: Support for BLF file format
This patch adds first support for the BLF file format.
2021-07-16 07:37:43 +00:00
Evan Huus f58850d207 tcp: switch packet_scope to pinfo->pool
Per mailing list discussion:
https://www.wireshark.org/lists/wireshark-dev/202107/msg00030.html

Long-term we want to get rid of the wmem_*_scope globals in favour of
passing wmem pools around. Step one is to replace all reasonable uses of
wmem_packet_scope() with pinfo->pool which has effectively the same
lifespan. This converts the TCP dissector as a proof of concept. TCP is
a common enough protocol this should stress-test the idea fairly well.
2021-07-15 18:14:16 +00:00
Arkady Gilinsky 96c0700c62 wireshark(HEAD): oampdu: Fix: do not stop GetReq packet parsing for Object 0
* The next_byte variable is taken before the pointer moved forward, this lead
   to stop parsing get request packets when object is 0. This commit fixes it.

Signed-off-by: Arkady Gilinsky <8351139-ark-g@users.noreply.gitlab.com>
2021-07-15 13:01:38 +00:00
Martin Mathieson 458d870a66 ORAN FH CUS: Fix C-Section dissection.
Some fields are present or not depending upon the section
type - fix reserved/beamId error.
2021-07-15 11:44:21 +01:00
Developer Alexander 2a1ebd1e91 can: more specific dissector tables for CAN IDs and extended IDs
Introduces two new dissector tables can.id and can.extended_id to enable a
more precise control of subdissectors dependent on the can id which is often
used to identify the the payload.

Since standard CAN IDs and extended IDs can be used in the same network and
their ranges overlap it is necessary to have two different dissector tables.

Existing Decode as dissector table can.subdissector stays as is to prevent a
breaking change. But new dissector tables can.id and can.extended_id get
priority over can.subdissector since they are more specific. Id they get a
match can.subdissector won't be called.

New dissector tables can.id and can.extended_id are accessible in lua scripts
via DissectorTable:add() while can.subdissector unfortunately is not.

For related Discussion see MR !3405
2021-07-15 07:29:46 +00:00
J M cbed7130de DoIP: Add TLS handover for encrypted communication 2021-07-15 06:40:22 +00:00
Stefan Metzmacher 94ac641efa packet-kerberos: implement PAC Ticket checksum verification
We use some private functions from MIT kerberos:
- krb5_free_enc_tkt_part()
- decode_krb5_enc_tkt_part()
- encode_krb5_enc_tkt_part()
but we already do that for krb5int_c_mandatory_cksumtype(),
which is newer than the above functions.

We use all of them only under HAVE_KRB5_PAC_VERIFY,
so we don't seem to need additional configure tests.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2021-07-15 04:52:30 +00:00
Stefan Metzmacher 8cd877fc4d packet-kerberos: always get the true length from decrypt_krb5_data_asn1()
Otherwise the child_tvb blobs may contain to much data.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2021-07-15 04:52:30 +00:00
Alexis La Goutte 0ea7692ec4 sv: fix typo ConfRef => ConfRev
Reported by Robert Sandholzer (#17486)
2021-07-14 17:46:39 +00:00
Martin Mathieson 1f9f287fba ISO15765: Make a function static. 2021-07-14 13:29:33 +01:00
Martin Mathieson 560f271d27 ISIS-LSP: Fix spelling of "algorithm" 2021-07-14 10:56:24 +00:00
Dr. Lars Völker 95dc4f52bc LIN: Adding support for LIN dissection
This patch adds support for LIN (Local Interconnect Network) as
well as support for:
- Signal PDUs on LIN
- ISO 15765 (ISO TP) on LIN
- TECMP transported LIN is handle like LIN

LIN is a simple automotive fieldbus to connect for example simple
sensors and actuators to an electronic control unit.
2021-07-14 09:31:06 +00:00
Gerald Combs ff60fcf92d CMake: Adjust wsutil includes and linking.
Mark wsutil's includes SYSTEM PRIVATE. This exposed a lot of targets
that were indirectly picking up include paths via the wsutil target, so
add direct includes where needed. The G.722 and G.726 codecs were
implicilty including tiffio.h; find it explicitly instead.

Mark some of wsutil's libraries PRIVATE, but leave commonly-used ones
PUBLIC.

Ping #17477.
2021-07-14 03:56:05 +00:00
Chuck Craft a7d927a9e9 prefs_register_protocol_obsolete protocols with only obsolete prefs
Related to #17465 and !3526
2021-07-13 23:12:04 +00:00
bookding 175d75aa03 MySQL: Add support for session track gitds & transaction info 2021-07-13 21:43:41 +00:00
Martin Mathieson eb2015a373 DCT2000: Support a format for MAC-NR PDUs inside comment lines 2021-07-13 17:22:01 +01:00
Richard Sharpe 893ec461f2 ieee80211: Correctly handle trigger frames when there is no padding. 2021-07-13 07:10:15 -07:00
Dr. Lars Völker e8ceb9964c DoIP: Adding name resolution for Diagnostic Addresses (UAT)
This patch will add name resolution to the Diagnostic Addresses of
DoIP by using an UAT based table.
2021-07-13 09:25:16 +00:00
Dr. Lars Völker b82ef729aa TECMP: Adding name resolution for Channel IDs 2021-07-13 09:08:38 +00:00
Taisuke Sasaki 20785aed78 ISIS: Add Flexible Algorithm (draft-ietf-lsr-flex-algo-16)
- Add Flexible Algorithm Definition Sub-TLV
- Add IS-IS Application-Specific Link Attributes (rfc8919)
- Add Extended Administrative Groups Sub-TLV (rfc7308)
2021-07-13 08:49:06 +00:00
Anders Broman 1d590a8c4d ppcap: Remove unused preference code
These preferences has been obsoleted for a long time so let's get rid of
the code.
2021-07-13 07:43:07 +00:00
Uli Heilmeier 3413daad58 Multipart: Add option to uncompress data
Add an option to uncompress gzip:ed data.

Fixes: wireshark/wireshark#17471
2021-07-13 07:27:15 +00:00
Alexander Aring f9037e6537 packet-dlm3: update dissector for version 3.2
This patch updates the dlm3 dissector for version 3.2 which are
currently prepared for sending Linux upstream. The dlm dissector follows
the Linux implementation. There is no other protocol specification.

For the specific protocol changes see:

https://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm.git/commit/?h=next&id=489d8e559c6596eb08e16447d9830bc39afbe54e
2021-07-13 07:10:48 +00:00
Alexander Aring 456c74cb1f packet-dlm3: dissect pdus for tcp case
Currently there can be multiple dlm messages in one tcp segment and in
some cases dlm message can be overlapped between two segments. The main
fix would be that we can now dissect multiple dlm messages if they
appear in one tcp segment. It's still own as one message in the "packet
flow" but in tree view it will be displayed as multiple messages which
are not visible.

For sctp the problem still exists, although there can't be overlapped messages.
2021-07-13 07:10:48 +00:00
Developer Alexander 69fb2a17e4 lua: dialog with prefilled values
new_dialog() lua api gets extended to enable that dialog fields can be
prefilled by lua scripts instead of always starting empty.
2021-07-13 06:52:55 +00:00
Arkady Gilinsky 054868cb0e oampdu: Fix DPoE get request parsing 2021-07-13 06:51:15 +00:00
David Perry 06ed6930dc Carry EPB flags as an option on the packet block
As requested by [this comment][1] on !2859, move `pack_flags` from a
dedicated field in `wtap_rec` to a block option on the packet block in
`wtap_rec.block`.

[1]: https://gitlab.com/wireshark/wireshark/-/merge_requests/2859#note_615984624
2021-07-12 12:41:57 -04:00
Martin Mathieson 030d659f88 More mask checks and some fixes. 2021-07-11 14:55:55 +00:00
Gerald Combs 379352ef7f CMake: Remove a duplicate target include directory.
epan/CMakeLists.txt set both SYSTEM PUBLIC and SYSTEM PRIVATE for
GLIB2_INCLUDE_DIRS. The PUBLIC keyword adds it to the
INTERFACE_INCLUDE_DIRECTORIES property, which is only appropriate for
includes that we ship with Wireshark, so remove that one. Make
GLIB2_LIBRARIES private as well.

Fixes #17477.
2021-07-11 06:47:07 +00:00
João Valverde afdfa9c469 wmem: Add assertion macro with WS_DISABLE_ASSERT
wmem has many assertions during dissection, these are assumed to have
a measurable performance impact so remove assertions with
WS_DISABLE_ASSERT, like is done elsewhere.

We don't use ws_assert() to avoid a dependency on wsutil.

g_assert_not_reached() does not have a performance impact and for
that reason should not be disabled.
2021-07-10 14:29:12 +00:00
João Valverde 2dee8a3a29 wmem: Remove dependency on wsutil
This allows wsutil to depend on wmem without introducing a circular
dependency.

Although wmem is included in epan it is in many ways an independent
library and it should remain so.
2021-07-10 14:29:12 +00:00
João Valverde e81a400edb wmem: Use quotes for an internal include
This is consistent with the rest of the implementation.
2021-07-09 17:55:20 +00:00
Martin Mathieson ba0d6f69ab RSL: Fix mask of eMLPP Priority field.
9.3.49 in 48.058wq
2021-07-08 18:08:53 +00:00
Martin Mathieson 9e5d051a8a check_typed_item_calls.py Some more mask checks
Fix a handful of (trivial) issues found.
2021-07-08 13:02:18 +00:00
Andreas Schultz 9e29ec0940 RADIUS: replace ULI decoder with version from GTPv2
Reuse the DIAMETER dissector for 3GPP-ULI for RADIUS as well.

The DIAMETER dissector for 3GPP-ULI IE is more complete than the RADIUS
version. The format of the IE is the same in RADIUS and DIAMETER.
2021-07-08 08:56:45 +00:00
Joakim Andersson 53f31f100f nordic_ble: Fix packet times for multiple interfaces
Fix packet times calculations when using multiple interfaces.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-07-08 07:52:17 +00:00
Guy Harris dd5907d2a3 Consistently refer to blocks that have been modified as "modified".
"User" sounds as if the blocks belong to the user; at most, the current
user might have modified them directly, but they might also have, for
example, run a Lua script that, unknown to them, modified comments.
Also, a file might have "user comments" added by a previous user, who
them wrote the file and and provided it to the current user.

"Modified" seems a bit clearer than "changed".
2021-07-08 00:05:35 -07:00
David Perry 73087d6fb4 Use wtap_blocks for packet comments
Mostly functioning proof of concept for #14329. This work is intended to
allow Wireshark to support multiple packet comments per packet.

Uses and expands upon the `wtap_block` API in `wiretap/wtap_opttypes.h`.
It attaches a `wtap_block` structure to `wtap_rec` in place of its
current `opt_comment` and `packet_verdict` members to hold OPT_COMMENT
and OPT_PKT_VERDICT option values.
2021-07-07 18:40:24 +00:00
Pascal Quantin 20f38c06ea LPP: upgrade dissector to v16.5.0 2021-07-07 18:09:24 +00:00
Pascal Quantin 204642089a NR RRC: upgrade dissector to v16.5.0 2021-07-07 17:37:07 +00:00
Andreas Schultz 4992806dba GTPv2: fix decoding of (extended) eNodeB id
3GPP TS 29.274, clause 8.21.7 and 8.21.8 clearly specify a total
length of 6 bytes for these fields.
2021-07-07 17:20:01 +00:00
Pascal Quantin ce9b01f059 LTE RRC: upgrade dissector to v16.5.0 2021-07-07 17:34:28 +02:00
Pascal Quantin 1c3739c360 NGAP: fix dissection of gNB/ng-eNB transparent container 2021-07-07 14:27:58 +00:00
Nardi Ivan c2d77d910d QUIC: improve "Follow QUIC Stream" support
This functionality has been added in d2a660d8, where its limitations
are described.
Improvements:
* the Substream index menu now properly filters for available stream numbers;
* Follow Stream selects the first stream in the current packet

Known issue (which is still there):  if a packet contains multiple QUIC
streams, then we will show data also from streams other than the selected
one (see #16093)

Note that there is no way to follow a QUIC connection.

Close #17453
2021-07-07 13:08:19 +00:00
Nardi Ivan a6932f56dc wmem: add a GCompareFunc implementation to compare unsigned integer 64 bits long 2021-07-07 13:08:19 +00:00
David Perry 8dc1660ef8 Fix compiler warning in packet-json.c
Clang gives a fatal warning about "explicitly assigning value of
variable of type 'int' to itself". The statement (and the `if` around
it) are redundant, so this removes both.
2021-07-07 06:48:41 -04:00
Martin Mathieson f9db3ef394 ORAN FH CUS: Fix some field widths
Some fields were articially grouped together
into longer types, with masks that had leading
or trailing zero bytes.
2021-07-07 09:29:52 +00:00
Developer Alexander 8a630ad6d0 json: improved path based filtering
It is the intention to enable more precise filtering for json. 6 changes were
made for this:

- 'json.member' becomes filterable as a string field with the key of the
member. Before the key was only appended as text but was not filterable.

- Every item gets a field 'path' which allows to filter for elments
which are at a specific position within the json. To make anonymous arrays
visible (no member key) they appear as '[]' in the path. (For example arrays
 in arrays)

- Every string, number, true, false, true or null item gets a field
'path_with_value' which combines the path of this element with its value. This
allows a filtering for values of elements at a specific position within the
json.

- Every string, number, true, false, true or null item gets a field
'member_with_value' which combines the key of this element with its value. This
allows a filtering for specific key-values-pairs independently of the position
within the json.

-It is possible to hide 'path', 'path_with_value', 'member_with_value' by
a preference called 'Hide extended path based filtering'.

- If the provided buffer does not start with the json object but has some
leading bytes which does not belong to the json object there is a new option to
ignore these bytes. This behaviour can be enabled by the newly introduced
preference 'Ignore leading non JSON bytes'.
2021-07-06 19:16:29 +00:00
Martin Mathieson 43077b96e8 Fix a few dissector spelling errors. 2021-07-06 07:52:21 +00:00
Martin Mathieson 06e7426efb ORAN FS CUS: Factor out a couple of common functions
Types that are common to section extension types
1 and 11.
2021-07-06 05:49:22 +00:00
Shubham jha 41deb9dd9b Improved PIM dissector with capability to parse multiple TLVs and additional attribute types 2021-07-06 05:48:47 +00:00
Gerald Combs d170dff7eb [Automatic update for 2021-07-04]
Update manuf, services enterprise numbers, translations, and other items.
2021-07-04 15:55:26 +00:00
João Valverde 3a3fda2ca4 epan: Remove dependency on version_info object library
Dependending on version_info is unnecessary and forces an epan
rebuild every time the git commit id changes, which can be slow,
especially with LTO enabled, and again is unnecessary.

Printing the VCS version to the TLS debug log is a minor convenience
that doesn't justify the cost to relink epan with every commit.
2021-07-04 10:37:49 +00:00
Pascal Quantin aa5df68171 NR RRC: fix dissection of MeasTriggerQuantityOffset element 2021-07-04 12:03:45 +02:00
Dr. Lars Völker f54efc5608 TECMP: Making IDs for CAN, FlexRay, LIN HEX_DEC
This patch changes the display from HEX to HEX_DEC of important IDs.
2021-07-03 14:46:10 +00:00
Prince Paul 30058542e9 ASTERIX: Fix Data Item 010/091
Fixed Item Number from 110 to 091
2021-07-03 14:29:38 +00:00
Martin Mathieson 9512524ef8 ORAN FH CUS: Fix/update existing supported section extensions 2021-07-02 18:17:08 +01:00
Prince Paul 79f62acbe7 ASTERIX: Fix Value of hf_010_202_VY from VX to VY
Fix typo VX to VY
2021-07-02 11:13:24 +00:00
Pascal Quantin 8f69254638 E1AP: upgrade dissector to v16.6.0 2021-07-02 10:57:29 +00:00
Isaac Boukris 5f8a932338 kerberos: fix compilation without kerberos
regressed_by: 38810b76

Reported-By: @crondaemon <Dario Lombardo>.
2021-07-02 10:32:18 +00:00
Pascal Quantin 498f5bf7d1 F1AP: upgrade dissector to v16.6.0 2021-07-02 10:10:23 +00:00
Pascal Quantin 95bc8cf328 XnAP: upgrade dissector to v16.6.0 2021-07-02 09:35:09 +00:00
Pascal Quantin e1b31629d7 NGAP: upgrade dissector to v16.6.0 2021-07-02 09:19:34 +00:00
Pascal Quantin 6dcb6568ff S1AP: upgrade dissector to v16.6.0 2021-07-02 09:02:58 +00:00
Pascal Quantin b403255234 X2AP: upgrade dissector to v16.6.0 2021-07-02 08:46:29 +00:00
Isaac Boukris 80c57b3d0b Kerberos: add basic dissection of PAC_TICKET_CHECKSUM
per recent MS-PAC update.
2021-07-02 08:18:57 +00:00
Dr. Lars Völker cc2f5825df Signal PDU: Adding config option to unhide raw values
This patch lets the user configure, if the header field for the
raw value is hidden or not.

Default configuration has the behavior as before.
2021-07-02 07:47:48 +00:00
Taisuke Sasaki d8ee53e078 OSPF: Fixed SRLB and SRMS Preference TLV types (rfc8665)
- Fixed TLV types of SRLB and SRMS Preference
- Added type/length for unknown Opaque RI TLV
2021-07-02 07:32:53 +00:00
Dr. Lars Völker 71882f8304 Signal PDU: UAT checks and descriptions
This patch cleans up the naming and description of the configuration.
2021-07-02 07:17:20 +00:00
Nardi Ivan ac49b5aff3 TLS: improve support for "delegated_credentials" extension
Client support was added in bd597dc247.
Now, add decoding of the messages sent by the server.

See: https://www.ietf.org/archive/id/draft-ietf-tls-subcerts-10.txt
2021-07-02 06:29:17 +00:00
Dr. Lars Völker 180063997f Signal PDU: Adding hex display for raw uint values
It is a common use case to look at the signal raw values in hex.
This patch adds this for uint based values. Since the length of
the signal is not necessary 8, 16, 32, or 64 bit, this is done via
append_text.
2021-07-02 06:12:46 +00:00
Graham Bloice 1ca1473de8 DNP3: Add Octet string length to item text
The Octet string is an outlier amongst DNP3 objects as the variation
doesn't define a specific type of string but the length.

Presiously the length was not displayed in the packet details,
this change adds the length to the object header.
2021-07-01 18:55:35 +01:00
Martin Mathieson b8a489e2e3 ORAN FH CUS: Special meaning of numPrbu 2021-07-01 16:52:25 +00:00
Isaac Boukris d833f5c061 krb5: use all_keys to verify PAC server signature to allow U2U
As a U2U ticket can't always be distinguished from a normal ticket,
e.g. in TGS-REP. Revert the old fix which didn't work for that case.
2021-07-01 14:25:02 +00:00
Developer Alexander 09746068a9 websocket: decode as for tcp port
Make websocket dissector available for decode as for tcp port.
2021-07-01 10:52:12 +00:00
Dario Lombardo 481b0ee06c ospf: ensure a sub-tlv has a valid length before using it.
A sub-tlv has a 2-bytes type and a 2-bytes length, that includes
the stlv header. For this reason the full length of a stlv must be
over 4. This must be checked before converting the payload to a
string by subtracting 4 to the length.

Fix: #17459.
2021-07-01 10:20:48 +00:00
Dario Lombardo c0e70f67b3 tvbuff: add a DISSECTOR_ASSERT to tvb_bytes_to_str.
It has been added since its length is signed, while the underlying
bytes_to_str uses a size_t, causing an unwanted cast. Basically
passing a len < 0 is pointless.
2021-07-01 10:20:48 +00:00
Martin Mathieson b4a5470497 MP2T: Make a var static 2021-07-01 09:33:02 +00:00
Oscar Gonzalez de Dios 9255044653 Added {0, NULL} as last string. Values of types udated with IANA codes 2021-07-01 08:39:32 +00:00
Oscar Gonzalez de Dios 67bf076189 PCEP: Implement dissection of ASSOC-Type-list TLV (Type 35) 2021-07-01 08:39:32 +00:00
Tomas Kukosa 5ba8139852 Radiotap: add 'data retries' field (bit number 17) 2021-07-01 08:23:11 +00:00
John Thacker 983306087c DVB-BB: Add the mode adaptation protocol even when L.1 (no bytes)
Add the mode adaptation protocol to the tree even when it is L.1
(no actual bytes), just with no subtree in that case. This is necessary
in order to access the preferences.
2021-07-01 08:06:44 +00:00
Chuck Craft 8226e09fac vss: no active preferences - use prefs_register_protocol_obsolete
Closes #17465
2021-07-01 07:34:27 +00:00
David Fort 3874621667 spnego: also interpret the mechList field
In NegTokenTarg the mechListMIC field can be dissected using the gss_wrap dissector.
2021-07-01 07:18:16 +00:00
Stefan Metzmacher d9328a9839 packet-smb2: dissect the read response data with dissect_smb2_olb_*
Some servers add some padding between fixed read response header and the
actual data.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2021-07-01 07:02:02 +00:00
Isaac Boukris 38810b763b credssp: fully dissect TSRemoteGuardCreds struct 2021-07-01 06:46:55 +00:00
John Thacker 5b74c28dec LDAP: Refresh dissector from ASN.1
Commit 5b248ac4d0 updated LDAP but
didn't update the comment about the included file line number reference.
Commit the result of running asn2wrs.py to keep things consistent.
2021-06-30 21:42:47 -04:00
Martin Mathieson 1fe2b52eb4 ORAN FrontHaul CUS: Beginnings of section ext 11
Getting ready to add full details of this extension,
and add new section extension names to value_string.
2021-06-30 20:16:34 +00:00
John Thacker 0eedab549e MP2T: Use the stream, not the addresses, for reassembly
A frame can have multiple MPEG2 TS packets, and individual TSPs can have
the end of one fragmented higher level packet and the beginning of another.
The higher level packets can have protocols like MPE that set the
address and ports on packet_info for a given frame.

Thus, in order to properly reassemble fragments togther, don't use the
addresses and ports, but do use the stream (conversation + direction) that
assigns the fragment IDs.
2021-06-30 13:28:39 +00:00
Piotr Winiarczyk c8ac8e7407 btmesh: Fix for crash in UAT CBs
Fixing crashes in UAT callbacks. Adding various format checks. Closes #17460.
2021-06-30 12:37:41 +00:00
Clément Notin 5b248ac4d0 ldap: Add Active Directory OIDs
From [MS-ADTS] specification
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/3c5e87db-4728-4f29-b164-01dd7d7391ea
2021-06-30 05:15:41 +00:00
Prince Paul 06aa393df5 ASTERIX: Fix length of I010_042_X and I010_042_Y
I010/042 is Four-octet fixed length with 2 bytes for X and 2 bytes for
Y.
Refer SUR.ET1.ST05.2000-STD-07-01 Edition 1.1 page 19.
2021-06-29 19:11:22 +00:00
Joakim Karlsson 1329081379 MP2T: fix might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] 2021-06-29 09:49:20 +02:00
Joakim Karlsson d2c91439df NAS-5GS: handle of n1SmInfo(From/To)Ue 2021-06-29 04:11:36 +00:00
Nardi Ivan f6be02cd8d QUIC: explicitly show stream initiator and direction
See: https://datatracker.ietf.org/doc/html/rfc9000#section-2.1
2021-06-28 19:11:59 +00:00
Anders Broman 58ada8b529 NGAP: Catch dissection of containers that may be test data.
In test environments the octet stering may be filled with junk data.
2021-06-28 16:04:19 +00:00
Thomas Dreibholz 1c40f936e2 Using col_append_sep_fstr() instead of prepending "NetPerfMeter" label. 2021-06-28 14:39:04 +00:00
Thomas Dreibholz f4c48c5350 NetPerfMeter display improvement:
Prepend protocol name "NetPerfMeter" with col_prepend_fence_fstr(), instead of
overwriting the underlying Transport Layer protocol name.
2021-06-28 14:39:04 +00:00
Joakim Andersson 9728438929 nordic_ble: Update display name of nordic_ble dissector
Replace all instances of "Nordic BLE Sniffer" with
"nRF Sniffer for Bluetooth LE" which is the name used by
nordic semiconductor for the development tool on the homepage.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-06-28 11:52:14 +00:00
Thomas Dreibholz 8e256b7e69 Bugfix for S101 dissector:
Make sure that the packet has an S101 header, before setting the protocol name
with col_set_str(). Otherwise, all TCP packets on port 9000 may be
misidentified as S101 packets.
2021-06-28 11:12:59 +00:00
Martin Mathieson 20491ae1d6 ESP: Free error string on UAT copy
CID: 1477519
2021-06-28 10:12:53 +01:00
Dr. Matthias St. Pierre 1e04fb3001 ipsec: calculate and verified the AEAD ICV only if enabled
AEAD ciphers should behave in the same way as the classical
cipher+hmac methods: the ICV should be calculated and verified
if the user has enabled the authentication check in the ESP
protocol options.
2021-06-28 07:43:38 +00:00
Dr. Matthias St. Pierre 67dad02eb0 ipsec: fix alignment check for encrypted payload data
This commit fixes the alignment check for the encrypted payload data
which prevented the decryption of ESP packets for 'stream ciphers'
like AES-GCM and AES-CTR, and adds an error indicator to the dissection
tree in case the check fails. The encrypted payload data needs to satisfy
the following two conditions:

- The ciphertext length needs to be a multiple of the cipher block size.

- the ciphertext needs to terminate on a 4-byte boundary.
  (RFC 2406, section 2.4)
2021-06-28 07:43:38 +00:00
Pascal Quantin 029a7fcec5 DNP: use the proper free function
g618661b22e introduced a free for a so called memory leak (which wasn't
a real leak due to the pinfo->pool garbage collector) but used the wrong
free function. Let's keep the explicit free but use the right function.

Closes #17462
2021-06-26 10:31:59 +02:00
João Valverde 7aae691f7d wsutil: Rewrite ws_assert() to minimize dependencies
This includes as little as possible in the assertion header, so
that it can be included globally in every file without pulling
any unwanted definitions. In particular pulling stdlib.h is
avoided because that can have side effects if it wants to
include non-portable extensions.

It is possible to have side-effects from include glib.h too, for
example because of G_LOG_DOMAIN.

These side-effects are usually avoidable with careful ordering
of pre-processor directives but with multiple levels of indirections
it can be hard to track. Better to make it robust to these kinds
of failures in the first place.

Also integrate with our logger for a cohesive experience (but
keep it a private dependency).
2021-06-25 22:06:32 +00:00
Guy Harris 11d4da9ef6 fpp: get rid of variable with a name that a C function once had.
I'm not sure in what OSes we'd get the really old name for strchr(),
index(), defined, causing compiler whining about a local variable
shadowing a function declaration, but the source checking script
complains about it, so use the name offset instead (that's the name
typically used for offsets into a tvbuff).
2021-06-25 14:25:10 -07:00
Martin Mathieson bbcd42be87 Snort config: Avoid leaks when fail to open config file.
CID: 1477713
CID: 1477850
2021-06-25 11:50:24 +00:00
Joakim Andersson 72d331cfdc btle: Fix parsing of empty extendend advertising header
Fix parsing of extended advertising when the extended advertising header
is empty. The flag field is excluded when none of the fields are present
and the extended header length field is 0.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-06-25 11:34:17 +00:00
Joakim Andersson 23d3e0bdde btle: Fix parsing of CTE Info field in extended advertising header
Fix parsing of the CTE Info field in the extended advertising header.
The bit-mask of the different fields was wrongly placed.
The text of the different fields all said "CTE Info".
The CTE Time field was added twice.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-06-25 11:34:17 +00:00
John Thacker 16d9f8948c MP2T: Conversation direction matters for analysis stats
In the fairly rare case where we have multiple MP2T streams in
opposite directions on the same UDP (or other) conversation, keep
their analysis stats and assigned fragment IDs separate. Otherwise
the fragment IDs will be incremented at the wrong time and reassembly
will fail in edge cases.
2021-06-24 20:56:43 +00:00
Dr. Matthias St. Pierre 3ce390a8f9 ipsec: display the encryption and authentication algorithm names 2021-06-24 20:39:20 +00:00
Dr. Matthias St. Pierre 1d38a72db3 ipsec: implement ICV verification for AEAD ciphers
After all the previous refactoring, the ICV verification for AEAD
ciphers is rather straightforward.

Currently, the only supported AEAD cipher is AES-GCM.
2021-06-24 20:39:20 +00:00
Dr. Matthias St. Pierre 70a93118d6 ipsec: refactor the decryption and dissection of ESP packets
Adding full support for AEAD ciphers like AES-GCM (including the
verification of the ICV) turned out to be difficult with the
current implementation of the ipsec dissector, because it does not
separate the dissection and decryption steps well enough and has
too many special cases depending on the crypto algorithms.

From a dissector's viewpoint there shouldn't be much difference
between an authenticated encryption method and a combination of
a classical encryption method with an authentication method.
What matters is how the data is structured, so much how it is
calculated.

       HEADER || IV || ENCRYPTED DATA || ICV      (Frame Data)
                               |
                               v
                       DECRYPTED DATA             (Decrypted Data)

This commit tries to refactor the implementation with the goal to
minimize the differences between the different crypto operations,
in particular their operation modes (like AES-CBC,AES-CTR,AES-GCM).
It follows the example of the isakmp dissector for IKEv2 packets,
which already has a functional AES-GCM support.

The most significant changes are:

- Display the IV and ICV as part of the original Frame Data, not
  as part of the Decrypted Data.

  - Display the location of the encrypted data, together with
    information about encryption and authentication algorithms.

  - Use gcry_cipher_setiv() to set the IV for AES-CBC instead of
    copying the IV into the decryption buffer as a prefix which
    subsequently gets discarded.

  - Don't copy the ICV into the decryption buffer where it gets
    "decrypted" accidentally and needs to be restored afterwards.

- Strip the nonce from the encryption key for AES-GCM and AES-CTR
  at an early stage, to reduce special treatment for those modes
  due to the different key lengths.

- Add some missing dissection tree items to get full coverage
  of all bytes in the Frame Data and Decrypted Data.

- Don't report dissector bugs to stderr. Instead, use the
  REPORT_DISSECTOR_BUG() macro which will raise an exception.
  (If the WIRESHARK_ABORT_ON_DISSECTOR_BUG environment variable
  is set, the program will call abort() instead, to make it easier
  to get a stack trace.)

With these changes, AES-GCM encrypted payloads now get dissected
correctly after decryption, provided the ICV length is specified
correctly. The ICV verification is still missing, it will be added
in a followup commit.
2021-06-24 20:39:20 +00:00
Dr. Matthias St. Pierre c5f1fbd1fc ipsec: rename some variables in the packet-ipsec.c
The renamings serve the purpose to improve the readability of the
code and make it more consistent with the names in packet-isakmp.c.
They are part of the refactoring but where split off into a
separate commit in order to reduce the diff noise in the following
commit, which contains the important changes of the refactoring.
2021-06-24 20:39:20 +00:00
Dr. Matthias St. Pierre 23ef47336c ipsec: add encryption types for AES-GCM with 8,12,16 octet ICV
The current "AES-GCM" encryption type in the `esp_sa` uat file does
not specify an ICV length, contrary to the `ikev2_decryption_table`.
The ICV does not get stripped from the encrypted data before
decrypting and dissecting it, whence the protocol type of the
decrypted frame is looked up at the wrong location. In most cases,
an invalid protocol number is found and the dissection stops, in
other cases the wrong protocol is dissected, showing garbage.

This commit adds the following new encryption types

  IPSEC_ENCRYPT_AES_GCM_8:  "AES-GCM with 8 octet ICV [RFC4106]"
  IPSEC_ENCRYPT_AES_GCM_12: "AES-GCM with 12 octet ICV [RFC4106]"
  IPSEC_ENCRYPT_AES_GCM_16: "AES-GCM with 16 octet ICV [RFC4106]"

which are currently mapped to IPSEC_ENCRYPT_AES_GCM. In other words,
the new entries load without errors but the ICV is ignored.
The rationale is to have an unchanged reference implementation for
testing which does not bail out on the new uat encryption types.
2021-06-24 20:39:20 +00:00
John Thacker 18f6c8b058 MP2T: Only call fragment_get the first pass
Only call fragment_get() on the first pass when determining in
progress fragment length. Since we're using fragment_add_check, on
subsequent passes call fragment_get_reassembled_id(). Otherwise
dangling fragments at the end of the capture will be returned on the
second pass, causing unusual behavior and inconsistencies from the
first pass to subsequent ones.

Don't free a TVB returned from fragment_get; that can cause segfaults
when a single TSP contributes to two different reassemblies.
Also check for a too short length to prevent exceptions in cases of
dropped or out of order that would disturb the fragmentation analysis.
2021-06-24 14:34:53 -04:00
Developer Alexander 0112c9b735 pdu_transport: dissector handles registered by name
Dissector handles are registered by name so that they become accessible from
lua scripts via Dissector.get()
2021-06-24 07:39:30 +00:00
Gerald Combs a59501c0a3 ErlDP: Fixup some format strings.
Use G_GUINT64_FORMAT where needed.
2021-06-23 11:58:12 -07:00
Andreas Schultz 8ce5618c72 ErlDP: add support for fragmented distribution messages 2021-06-23 16:58:17 +00:00
Chuck Craft 701d0565c5 Qt: Undo MR 3422 (filter button separator hint)
See discussion attached to !3422
2021-06-23 05:12:08 +00:00
John Thacker 784b9f44a4 NAS 5GS: Use 5GSTAI MCC/MNC fields
Use 5GS TAI (and not just TAI) where appropriate in the 5GS TAI, 5GS TAI List,
and 5GS Service Area List.
2021-06-22 21:17:14 -04:00
Alexis La Goutte c2bcb295ac twamp: Fix extra parenthese 2021-06-22 20:30:13 +00:00
Alexis La Goutte 1ad0721c8c twamp: Fix Dead Store found by Clang Analyzer
packet-twamp.c:252:18: warning: Although the value stored to 'list' is used in the enclosing expression, the value is never actually read from 'list'
2021-06-22 20:30:13 +00:00
Alexis La Goutte 558a32ba86 dcerpc: Fix warning found by Clang Analyzer
packet-dcerpc.c:4381:17: warning: Assigned value is garbage or undefined [core.uninitialized.Assign]
2021-06-22 20:30:13 +00:00
Martin Mathieson 2371d2722d RDP-drdynvc: Make a variable static 2021-06-22 19:04:09 +00:00
ZhongYao Luo 64155132ea Fix null pointer
In some cases, the fds parameter of frame_data_sequence_find is invalid,
causing the software to crash, For example, this command
echo'{"req":"frame","bytes":"yes","proto":"yes","frame":"1" }'|sharkd-
2021-06-21 18:12:45 +00:00
Chuck Craft 54baebad48 Lua: reconcile expert info groups; add PI_ASSUMPTION 2021-06-21 15:27:51 +00:00
Eugene Adell c3b280df8f TCP: Introduce an alternative method for the in-flight calculation.
Historically Wireshark evaluated the TCP in-flight value from the
payload actually seen all along the traffic captured.
We introduce another method to meet an observer paying greater
interest in the in-flight deduced from a ponctual SEQ analysis. It
may result in another value when analyzing incomplete conversations,
particularly when the beginning is missing.
The latter is activated by a User Preference setting added in this
release. Closes #7703.
2021-06-21 14:24:02 +00:00
Pascal Quantin 3ea51dba87 NGAP: fix dissection of multiple NGAP messages in the same HTTP2 packet
Also add dissection for more containers
2021-06-21 13:33:55 +00:00
Stig Bjørlykke 553e9e83d2 Lua: Add redissect_packets()
Add Lua function redissect_packets() to redissect packets in live
capture. The use case is to reload packets after a preference change.
2021-06-21 09:52:46 +02:00
Chuck Craft 79bdde7c82 Qt: Filter button label syntax for groups - add hint 2021-06-21 05:41:32 +00:00
João Valverde 7dea683bf1 wslog: Shorten ws_log_message_is_active() name 2021-06-21 00:07:21 +00:00
Mikael Kanstrup 95e7c06d58 dot11decrypt: Cleanup debug log level usage
The debug log levels used in dot11decrypt are pretty much random.
Cleanup how the different levels are used and at the same time change
to standard wslog log levels.

With this change log levels are used as follows:

WARNING - Allocation failures or unexpected (but handled) errors.
DEBUG - Debug messages mainly related to key derivation.
NOISY - Debug messages related to packet decryption.
2021-06-20 23:32:17 +02:00
João Valverde 72ea33ae20 epan: Change bytes_to_str() length argument to a size_t 2021-06-20 18:58:10 +00:00
Gerald Combs 3d18e1d439 [Automatic update for 2021-06-20]
Update manuf, services enterprise numbers, translations, and other items.
2021-06-20 16:48:15 +00:00
Developer Alexander cf10c766d2 signal_pdu: dissector handles registered by name
Dissector handles are registered by name so that they become accessible from
lua scripts via Dissector.get()
2021-06-20 12:48:07 +02:00
Guy Harris 98b72220f4 Remove uninteresting information from REPORT_DISSECTOR_BUG() etc. messages.
ws_warning() logs the source file name, source line number, and calling
function name for the ws_warning() call; for errors reported by
REPORT_DISSECTOR_BUG() and macros that call it, the message isn't
reported directly by the macro - the macro formats the error message
into a string, saves the string, and throws a DissectorError exception,
to terminate the dissection, and the exception handler uses the
formatted string in its messages.

Thus, the location in the exception handler isn't interesting; it's not
where the error occurred, it's just where the message is logged, which i
the same for all such errors.

Don't use ws_warning(); instead, directly call ws_log() with
WS_LOG_DOMAIN and LOG_LEVEL_WARNING, which doesn't log the location of
the ws_log() call.
2021-06-19 04:37:26 -07:00
João Valverde 8cf9791679 Replace some lingering references to g_log() 2021-06-19 02:34:36 +00:00
João Valverde 0e50979b3f Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +00:00
Uli Heilmeier d195847bb1 Prefs: Mark gui.packet_editor.enabled obsoleted
Preference has been removed with fca78f9f1f
without obsoleting it.
2021-06-18 20:11:31 +00:00
João Valverde 051a74378d wslog: Use NULL for empty/default domain 2021-06-18 10:43:39 +01:00