Commit Graph

79710 Commits

Author SHA1 Message Date
Guy Harris 4715f5021c epan: don't print nanoseconds if seconds isn't representable.
Fix for previous fixes to #17179.
2021-01-27 23:56:22 -08:00
Guy Harris bf265d7e7a epan: don't use gmtime_s().
It has the "feature" that, if handed a negative value, it might just
exit.  gmtime() doesn't have that "feature", and is sufficiently
thread-safe for our purposes; use it instead, and check to make sure it
doesn't return a null pointer.

The previous fix for #17179 still used gmtime_s(); this doesn't, so it's
a better fix for #17179.
2021-01-27 22:16:47 -08:00
Guy Harris 4e4a7c11c7 epan: don't assume gmtime_s() or gmtime_r() succeed.
At least on Windows, gmtime_s() will *not* succeed if passed a negative
value.

Fixes #17179.
2021-01-27 21:46:11 -08:00
Simon Holesch 6508b02ec4 D-Bus: Improve signature validation
An invalid signature ("a{sa}") caused a segfault when the array inside
the entry had a length of zero. An array signature code ("a") must be
followed by a single complete type, and "}" is not one of them. Check
additional restrictions for structs and dict entries, which aren't
related to this bug.

Fixes #17176
2021-01-28 02:04:16 +01:00
Simon Holesch 266e99e11a D-Bus: Handle variants with empty signatures
This triggered a dissector bug:
epan/dissectors/packet-dbus.c:796: failed assertion "DISSECTOR_ASSERT_NOT_REACHED"

Fixes #17176
2021-01-28 02:04:16 +01:00
Simon Holesch 96169c25f6 D-Bus: Pop subtrees on error in D-Bus header
Not popping all subtrees triggers a dissector bug:
epan/proto.c:1136: failed assertion "ptvc->pushed_tree_index == 0"

Fixes #17176
2021-01-28 02:01:46 +01:00
Guy Harris 8e1e28623b Add an encap_table entry for WTAP_ENCAP_ETW.
Fixes #17183.
2021-01-27 23:23:37 +00:00
Jaap Keuter 616d44cbb6 ZVT: Use standard TCP segment reassemble support function
Fixes #17177
2021-01-27 23:05:23 +00:00
Guy Harris 93a472575d Rename WTAP_ENCAP_ETL to WTAP_ENCAP_ETW.
It corresponds to LINKTYPE_ETW in pcap and pcapng files; the structures
in the record format come from the Event Tracing for Windows (ETW) API
rather than directly from Event Trace Log files.

While we're at it, explain what extcap/etl does.
2021-01-27 14:33:09 -08:00
Martin Mathieson efcaa68807 More checking of non-static symbols. 2021-01-27 20:16:21 +00:00
João Valverde be0171019c UDP: Clean up handling of zero-valued UDP checksums
Replace the somewhat weird field format
    "[Checksum: [missing]]"
with
    "Checksum: 0x0000 [ignored or illegal value]"

Improve code redability and fix XXX comment.
2021-01-27 16:46:15 +00:00
João Valverde 1ef2077904 UDP: Add preference to ignore zero checksum over IPv6
Closes #16972. See also #6232.
2021-01-27 12:25:19 +00:00
Joey Salazar d7ffd8f014 git: parse Git Protocol version from pkt-lines
In Git's packfile transfer protocol[1], the initial server response
contains the version of the Git Protocol in use; version 1 or version 2
[2].

Parse out this information following up on work started in MR !805 [3]
by Izabela Bakollari and advice provided by Ronnie Sahlberg, add it as a
field for ease of reading and filtering.

[1] https://www.kernel.org/pub/software/scm/git/docs/technical/pack-protocol.html
[2] https://www.kernel.org/pub/software/scm/git/docs/technical/protocol-v2.html
[3] https://gitlab.com/wireshark/wireshark/-/merge_requests/805

Related to #17093
2021-01-27 09:09:51 +00:00
Martin Mathieson ca4e5c2962 Next batch of unused globals. 2021-01-27 08:42:27 +00:00
Guy Harris c26addae44 One more check for connection_info being non-null is needed.
This fixes issue #17182.
2021-01-27 00:15:24 -08:00
Thomas Sailer 76abe23f6d Bluetooth BR/EDR RF: header decoding according to specification
According to the LINKTYPE_BLUETOOTH_BREDR_BB Packet Structure specification
(http://www.whiterocker.com/bt/LINKTYPE_BLUETOOTH_BREDR_BB.html), the
Bluetooth header should be formatted according to the Bluetooth
specification Volume 2, Part B, Section 6.4. However, right now
wireshark expects the header to be in a weird format,
specifically it expects the header fields to be MSB but the bits
within each header field to be LSB. (Bluetooth standard is all
LSB). Furthermore, it computes the HEC (header check, i.e. the header
CRC) with 4 bits arbitrarily masked.

This patch decodes the header according to the spec. It still accepts
the old format (if the broken HEC matches), and displays a warning.
2021-01-27 06:23:52 +00:00
Jaap Keuter 7664748e72 BT_EVT: Codecs are not vendor codecs 2021-01-27 05:49:20 +00:00
Gerald Combs cd278f5fd9 wiretap: Fixup the sdjournal block length in pcapng.
Fix our entry length check and put our trailing '\0' in the right
location. Fixes #17174.
2021-01-27 02:23:24 +00:00
Martin Mathieson 795dce3a6e NR-RRC: Use mac-nr UEId to configure algorithms 2021-01-26 17:36:02 +00:00
Rubin Gerritsen 277890d7e1 Bluetooth: Fix NULL pointer dereference crash
Occured when a control procedure packet was logged without connection
context.

The bug was introduced in 0dab2494ca

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2021-01-26 10:53:35 +00:00
mbutkereit d536d11a28 QUIC: Add dissection of MP-QUIC draft-deconinck-quic-multipath 2021-01-26 09:18:38 +00:00
Eugene Adell f255f6c683 TCP: Taking SACK's into account for in flight calculation
TCP in flight calculation was based on Sequence analysis only.
We now also look at the SACK blocks and give a more accurate
view of the in flight reality. Closes #6683.
2021-01-26 08:20:43 +00:00
Rubin Gerritsen 32cadbacb1 Bluetooth: Detect invalid control procedure collision resolution
See Bluetooth Core Spec, Vol 6, Part B, Section 5.3

If the event counter is available, the procedure is marked as complete
when the instant is reached.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2021-01-26 07:05:08 +00:00
Martin Mathieson 619b3128a1 Make some symbols static or delete them. 2021-01-26 06:30:38 +00:00
Gerald Combs 785e291c1b USB HID: Avoid allocating a huge amount of memory (second try).
10204490d7 / MR 80 ensured that we didn't grow field.usages due to an
underflow, but it neglected to check for a sane array size. Add another
check to make sure we don't wmem_array_grow() too much. Fixes #17165 and
fixes #16809 more completely.
2021-01-26 05:20:04 +00:00
Gerald Combs 26f0db01a7 USB HID: Fix a memory leak.
Replace mismatched g_strdup() + g_free()s with
wmem_strdup_printf(wmem_packet_scope(), ...). Fixes #17124.
2021-01-26 00:33:37 +00:00
Grzegorz Niemirowski 6a860c979a Fix TID bitmap name 2021-01-25 22:50:37 +01:00
Christian Krump 420c0aea1e EPL: various extensions
- fixed some datatype issues (detected by scripts of gitlab environment)
- shift some flag informations of info-column
2021-01-25 15:23:05 +00:00
Carl Hörberg 846985afba AMQP protocol method Exchange#unbind-ok got method id 51
Reference: https://www.rabbitmq.com/resources/specs/amqp0-9-1.extended.xml
It's obviously a copy paste error from way back, but method id 51 is what
rabbitmq sends back on Exchange#UnbindOk so they've kept the "error".
2021-01-25 13:29:19 +00:00
Martin Mathieson aa78bb8546 tools/check_spelling.py: Fix args handling 2021-01-25 12:25:54 +00:00
Moshe Kaplan 748d63712e rdps.py: Use string equality for comparing strings
In Python, `is` is meant for checking object equality,
not string equality. For more info, see
https://docs.python.org/3/reference/expressions.html#is
2021-01-25 11:32:12 +00:00
Moshe Kaplan 31546ad35d check_tfs.py: Avoid duplicating list entries
Avoid duplicating list entries and modifying a list during
iteration.
2021-01-25 11:14:22 +00:00
Moshe Kaplan e69a20f5c8 check_spelling.py: Avoid duplicating list entries
Avoid duplicating list entries and modifying a list during
iteration.
2021-01-25 10:54:31 +00:00
Moshe Kaplan 009ce4b331 check_typed_item_calls.py: Avoid duplicating list entries
Avoid duplicating list entries and modifying a list during
iteration.
2021-01-25 10:08:45 +00:00
Moshe Kaplan 9592d3fee9 check_typed_item_calls.py: Avoid mutating default arguments
Python only creates the default argument once and reuses it for
further invocations. Instead, of mutating the default list,
set the default argument to be None and then create a
list, if needed. For more info, see
https://docs.python-guide.org/writing/gotchas/
2021-01-25 09:27:59 +00:00
Moshe Kaplan 5693ca8d50 packet-someip.c: Fix copy-paste error
Fixes Coverity 1472261
2021-01-24 19:56:30 +00:00
Rubin Gerritsen 0dab2494ca Bluetooth: Match control procedure requests with responses
This makes it easier to read logs where both the master
and slave initiate control procedures at the same time.
Retransmitted packets are not part of the request/response
tracing.

In order to perform the analysis, direction information must
be available.

The matching is implemented by storing control procedure contexts
for each direction for each connection object as each direction
may initiate its own procedure.

Limitations:
- When there is a control procedure violation where a device
  initiates a new procedure before the previous is complete,
  only the first procedure is traced.
  It would be possible to create more advanced tracing by
  storing a list of contexts per frame.
  However, as this is anyways a specification violation, this
  adds unnecessary complexity.
- Control procedures involving an instant are marked as completed
  when the last frame is sent even though the control procedure
  is completed when the instant is reached.
  This is the best possible approach when the event counter is
  not available.
  Due to this limitation, we are not able to detect the control
  procedure violation where a device initiates a new procedure
  before the instant is reached.

The following control procedure violations are detected:
- Starting a control procedure before the previous is complete.
  Control procedure violations where a new procedure is started
  before the instant is reached is currently not detected.
  That requires knowing the event counter.
- Control procedure packets that are not valid responses to an
  existing ongoing control procedure.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2021-01-24 14:12:20 +01:00
Gerald Combs d50d075f88 [Automatic update for 2021-01-24]
Update manuf, services enterprise numbers, translations, and other items.
2021-01-24 09:48:31 +00:00
Fulko Hew bc530a355d Added dissector for TP-Link SmartHome protocol 2021-01-24 08:48:06 +00:00
Jim Young a7ad6c271f tshark: Fix typo in comment from ascci to ascii 2021-01-23 23:50:36 -05:00
Enrique Giraldo 506f1c650f tshark: Unconditionally call extcap_register_preferences
extcap_register_preferences is only called with the -G option
(to dump information) and extcap preferences are not loading,
loading it unconditionally avoids this, as it is done in the
GUI startup.
2021-01-24 02:32:22 +00:00
Stijn Last 9ba1053237 packet-vnc: resolve issues reported by check_typed_item_calls.py
./tools/check_typed_item_calls.py --commits 1 | tee item_calls_check.txt
Examining:
epan/dissectors/packet-vnc.c

epan/dissectors/packet-vnc.c:1289 proto_tree_add_item called for hf_vnc_tight_tunnel_type  -  item type is FT_UINT8 but call has len 16
epan/dissectors/packet-vnc.c:1532 proto_tree_add_item called for hf_vnc_vencrypt_auth_type  -  item type is FT_UINT8 but call has len 4
epan/dissectors/packet-vnc.c:1545 proto_tree_add_item called for hf_vnc_vencrypt_auth_type  -  item type is FT_UINT8 but call has len 4
3 issues found

As explained here:
https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#tight-security-type

The capability consists of a code, a 4 byte vendor string and an 8 byte signature string
2021-01-23 16:07:41 +00:00
Alex Nik b523ae8d74 added the description for Bluetooth devices windows 2021-01-23 07:45:00 +00:00
Vadim Yanitskiy 884158fd24 GSM A-bis/RSL: fix SRR bit dissection in L1 Information IE 2021-01-23 02:24:59 +01:00
Alex Nik c8115695fa description for the Bluetooth ATT server attributes menu 2021-01-22 22:25:35 +00:00
Gerald Combs c69553216e dot11decrypt: Try to fix builds with Libgcrypt < 1.6.0.
Try to fix

    run/libwireshark.so.0.0.0: undefined reference to `dot11decrypt_derive_pmk_r1'
    run/libwireshark.so.0.0.0: undefined reference to `dot11decrypt_kdf'
    run/libwireshark.so.0.0.0: undefined reference to `dot11decrypt_prf'
    run/libwireshark.so.0.0.0: undefined reference to `dot11decrypt_derive_pmk_r0'
    run/libwireshark.so.0.0.0: undefined reference to `dot11decrypt_derive_ft_ptk'
2021-01-22 21:12:14 +00:00
Alex Nik 18013a8968 added the description for Bluetooth HCI Summary 2021-01-22 20:11:34 +00:00
Gerald Combs bb48a9da99 CMake: Fixup rpmbuild verbosity.
546dc0270c made things too quiet. Pass '-v' to rpmbuild if
CMAKE_VERBOSE_MAKEFILE is set. Don't pass '--quiet'.
2021-01-22 18:57:23 +00:00
Dr. Lars Völker c1527c5d22 SOME/IP: Adding support for filtering parameters
This patch allows each configured parameter to be filtered and
therefore to be used in io graphs as well.

Fixes #17122

Be aware that this patch changes the format of:
- SOMEIP_parameter_list
- SOMEIP_parameter_arrays
- SOMEIP_parameter_structs
- SOMEIP_parameter_unions
2021-01-22 15:11:20 +00:00
Alexis La Goutte 229148a168 ieee80211: Update Reduced Neighbor Report with 802.11ax (WiFi 6)
following tbtt length, there is some field (BSSID, Short SSID, BSS Parameters)
2021-01-22 14:50:26 +00:00