Commit Graph

81030 Commits

Author SHA1 Message Date
João Valverde 4aff36d501 Replace g_assert() with ws_assert() in places 2021-06-06 20:05:26 +00:00
João Valverde ef0f022f86 wslog: Add a comment 2021-06-06 19:48:54 +00:00
João Valverde 4e4bef09f9 wiretap: Remove some redundant debug information
It is not necessary to include the function name and/or locations,
ws_debug() includes that information,
2021-06-06 19:48:54 +00:00
João Valverde c015257c9f wslog: Include function name in ws_debug() output format
The GLib documentation says G_STRLOC includes the function name
but that is a lie[1]. Change ws_debug() to not use G_STRLOC and receive
__FILE__, __LINE__ and G_STRFUNC separately instead.

[1]https://bugzilla.gnome.org/show_bug.cgi?id=69097
2021-06-06 19:48:53 +00:00
Martin Mathieson abf3c0f2f9 Add some spelling words.
Fix one iee80211 typo.wq
2021-06-06 18:47:38 +01:00
Gerald Combs 154b0aaad8 [Automatic update for 2021-06-06]
Update manuf, services enterprise numbers, translations, and other items.
2021-06-06 17:06:37 +00:00
Stig Bjørlykke 2b29269f5d tshark: Add option to export TLS session keys
Add a new option --export-tls-session-keys <keyfile> to tshark
to export TLS session keys.
2021-06-06 13:32:40 +02:00
Nicolás Alvarez 577282f679 Fix null dereference in ipsec esp_sa_record_add_from_dissector
The esp_sa_record_add_from_dissector function is passing a null pointer to
the err argument of uat_esp_sa_record_update_cb, which then dereferences
it. Apparently esp_sa_record_add_from_dissector is not called anywhere in
Wireshark, but it's exported and available for external code to call it.

Fix by passing a pointer to a local char* instead.

Bug found by clang static analyzer.
2021-06-05 20:22:07 -03:00
Richard Sharpe 1718151a65 ieee80211: Prevent incorrect Ranging Trigger frames from causing problems.
Handle invalid Ranging Trigger subtypes and insert an expert info for
them.
2021-06-05 14:59:43 +00:00
David Fort b1eb5bc16f rdp: fixes and improvements in negotiation packets
The selectedProtocol field in RDP_NEG_RSP packets was not handled correctly,
it's a single value not some flags.
RDSTLS has also been added in the protocols list.
clientRequestedProtocols in TS_UD_SC_CORE has also been adjusted as it's supposed
to be the list of supported protocols sent by the client in the RDP_NEG_REQ packet.
So it's union of flags, not a single value.
2021-06-05 09:11:49 +00:00
John Thacker 174b994031 VLAN: Increase permitted number of tags in a packet
VLAN_MAX_NESTED_TAGS is a misnomer, it sets a maximum on the total
number of tags in a packet, nested or not. It's possible to surpass the
current value of 10 with legal packets, e.g. jumbo frames that carry
entire DVB Base Band Frames with GSE (or TS/MPE) that have fifteen
PDUs each with a IP/VLAN/ARP. Raise it to a somewhat higher but still
small finite limit.
2021-06-05 08:57:17 +00:00
Christian Reusch 7179e1d1fb tcp: Fix dissection of DSACK
DSACK blocks (the first SACK block in a TCP SACK option, with right edge
being lower or equal to the ACK filed) are now identified correctly.

Closes #17315
2021-06-05 08:42:09 +00:00
John Thacker c5c25a9268 DVB-S2-BB: Add support for TS over BBFrame
Add support for Transport Streams carried over DVB Base Band Frames,
passing them to the MP2T dissector. Add an endpoint type for the ISI.
Update comments. Use standard true false strings in a couple cases.
Create a header file for MP2T, since the BBFrame dissector needs to
know about the MPEG2 TS packet size and sync byte.
2021-06-05 08:12:47 +00:00
João Valverde 783fa48ea6 Cosmetic change to compiler information
Move compiler information from last sentence to "compiled with"
paragraph.

Before:
    Compiled (64-bit) with ...

    Running on Linux ...

    Built using gcc 11.1.0.

After:
    Compiled (64-bit) using GCC 11.1.0, with ...

    Running on Linux ...
2021-06-05 07:57:10 +00:00
João Valverde 0fe551e5e7 dfilter: Disallow embedded NUL bytes in regular strings
When byte escape sequences, that is hex \xhh or octal \0ddd,
are interpreted at the lexical level it is not possible to
use strings with embedded NUL bytes. The NUL byte is interpreted
as a C string terminator. As a consequence, for example, the
strings "AB" and "AB\x00CDE" compare as the same. This leads to
unexpected false matches and a poor user experience.

Disallow embedded NULs for regular strings (strings literals that
do not begin with 'r' or 'R') for this reason.

It is possible to use a raw string instead (eg: r"AB\x00C")
to match embedded NUL bytes, although that only works with regular
expressions. Normal escape rules would also work with regular
expressions (eg: "AB\\x00C"). This is the same string as the previous
one, written in an alternate form.  What won't work is "AB\x00C", this
string is synctatically invalid.

So the expression: data matches r"AB\x00C"
will match the bytes {'A', 'B', '\0', '\C'}.

However the expression: data contains r"AB\x00C"
won't match the fvalue above. Because the "contains" operator
doesn't compile a regular expression it literally tries to
contains-match the bytes {'A', 'B', '\\', 'x', '0', '0', 'C'}.

Therefore raw strings are very convenient but it is still necessary
to be aware that the matches operator has an extra level of indirection
than other string operators (same as in Python).

Fixes #16156.
2021-06-05 02:47:39 +01:00
João Valverde 85c257431f dfilter: Add support for raw strings
Add support for a literal string specification copied from Python
raw strings[1].

Raw string literals are enclosed with r"..." or R"...". Double quotes
can be include in the string but they must be escaped with backslash.
In escape sequences backslashes are preserved in the final result.

So for example the string "a\\\"b" is the same as r"a\"b".

r"\\\a" is the same as "\\\\\\a".

Raw strings should be used for convenience wherever a regular expression
is used in a display filter expression.

[1]https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
2021-06-05 02:46:40 +01:00
Guy Harris eaa4a7022b file-pcapng: redo the way we dissect the data in blocks.
Create a tvbuff that covers the data portion of a block, and use that to
dissect all data in the block, including but not limited to the options.

Catch ReportedBoundsError exceptions and treat them as an indication
that the block length was too short - add an expert info to the block
length item indicating that.

Have separate routines for each block type that dissects the data in
that block type.

While we're at it, check whether the trailing block length is equal to
the  header block length and, if not, report an error in the trailing
block length.

Fix the tests to match.
2021-06-04 16:46:40 -07:00
Guy Harris deb6786ed4 file-pcapng: fix name of expert info.
The entry was copied and pasted, and the variable name and descriptive
text were changed, but the field name wasn't.
2021-06-04 14:48:24 -07:00
Anders Broman 42cb9643aa GTPv2: Update with new IEs from 3GPP TS 29.274 V17.1.1 (2021-03).
Update dissection of IE names and define the metodes to do dissection.
Only Additional RRM Policy Index is fully dissected.
2021-06-04 12:38:29 +00:00
Gerald Combs 6bfab69d14 Windows: Switch from HTML Help to plain HTML.
Switch from HTML Help to plain HTML files. In the NSIS and WiX installers,
place the help assets in a directory with a friendly name.
2021-06-04 08:57:32 +00:00
Piotr Winiarczyk 6846271b76 btmesh: Enhanced messages reassembly
This commit adds enhanced messages reassembly for access and control
message. Closes #17417.
2021-06-04 08:40:31 +00:00
Thomas Dreibholz 6e5081474e SCTP: Display basic TSN information with packets 2021-06-04 08:04:31 +00:00
Chris Brandson 256af1d2f0 added latest Zigbee manufacturer codes 2021-06-03 14:37:00 +00:00
Anders Broman e64bad71be Diameter: Update AVPs from 3GPP TS 29.272 V16.4.0
Amend the xml checking script to exlude one more AVP from the check and
make it easy to add more to the list.
 Courtesy of Christopher Maynard.
2021-06-03 15:49:38 +02:00
Simon Barber 5202119239 ieee80211_radio: Use calculated bitrate if not supplied
For 802.11n if the bitrate is not supplied then the calculated bitrate is used. This change does the same for 11ac and 11ax.

Sniffer traces taken on recent versions of Macos no longer supply the bitrate for 11ac frames in the RADIOTAP header, this change allows the wireless timeline to work with these traces.

Fixes #17419.
2021-06-02 21:47:03 +00:00
John Thacker d648f74550 exported PDU: Fix comment
It's P2P_DIR_RECV not P2P_DIR_RCVD
2021-06-02 01:09:33 -04:00
Guy Harris 2f5c0ffdb2 pcapng: set the length of the options item.
It runs up to either the end of the option data or the terminating
end-of-options option (readers MUST handle lists of options that
contains an end-of-options option and lists of options that don't).
2021-06-01 18:59:29 -07:00
Guy Harris 6542fd7ab2 802.11: move PV1 control and management frame information.
Put the control frame information into the header tree, and put the
management frame information into its own subtree, as we do with PV0.
2021-06-01 17:09:18 -07:00
Guy Harris ea0e04d53d 802.11: clean up the handling of protocol versions.
Put the PV0 dissection into its own routine.

Add a small routine for unknown protocol versions.

Have the top-level dissector just call the PV0, PV1, or unknown version
routines.

Have the PV1 routine create an 802.11-protocol top-level tree item,
rather than putting the header fields at the top level.
2021-06-01 16:30:27 -07:00
Guy Harris 4cf5cb704c ieee80211: prevent an infinite loop.
dissect_ieee80211_ranging_trigger_variant(), when passed a subtype
other than 0 through 3, will return 0, causing
add_he_trigger_user_info() to loop infinitely on a TRIGGER_TYPE_RANGING
frame.

This change checks for a return value of 0 and terminates the loop.

This probably needs a better fix that reports an error (and maybe
requires dissect_ieee80211_ranging_trigger_variant() to handle subtype
4; I don't have the latest 11ax draft to check).

Fixes #17418.
2021-06-01 02:00:57 -07:00
Nardi Ivan ebbea87b1f TLS: add basic support for ALPS (Application-Layer Protocol Settings) extension
See: https://datatracker.ietf.org/doc/html/draft-vvv-tls-alps-01.txt
Based on BoringSSL implementation:
https://boringssl.googlesource.com/boringssl/+/51607f1fe11202f2876ec26486ffbef3cbbf0f35
2021-05-31 19:32:38 +00:00
Luis Colmenero 4941c5bb6d rtps-vt: Fix sizeof(guint..) - replace with numeric value 2021-05-31 20:04:22 +02:00
Guy Harris 7477431325 wiretap: un-export some routines.
wtap_file_get_shb_for_new_file() and wtap_file_get_nrb_for_new_file()
are intended to be used only internally to libwiretap and by libwiretap
plugins.
2021-05-31 04:39:59 -07:00
Guy Harris 162251176a ascend: set rec->rec_type.
REC_TYPE_PACKET is 0, so if it's been initialized to 0, and never gets
overwritten, this fixes code withotu fixing a visible bug, but it should
be done anyway.
2021-05-31 02:44:57 -07:00
Nardi Ivan 26dd456e62 HTTP: fix typo in dissect_http_heur_tls()
Fixes: a1a2b536
Close #17414
2021-05-31 07:56:46 +00:00
Gerald Combs ffc5522a35 Packaging: "Acorn RISC Machine" was a long time ago.
Use "Arm 64" instead of "ARM 64" for our .dmg names.
2021-05-31 07:41:32 +00:00
Nardi Ivan eb71853533 TLS: add decoding of grease versions
See RFC-8701 Sec 2
2021-05-31 07:26:29 +00:00
Graham Bloice 59de442abb MQTT: Revert subdissector call to not pass topic as data
An inadvertent change in f6ad48 caused sub-dissectors to be called
with their data argument set to the message topic.

This isn't required for the SparkplugB heuristic dissector (or any
other it seems).
2021-05-30 19:56:50 +00:00
Chris Brandson a5df597b3d fixed typo 2021-05-30 19:15:25 +00:00
Chris Brandson aed5c63e73 fixed whitespace issues 2021-05-30 19:15:25 +00:00
Chris Brandson 8e97359883 Added expert info to mark depreciated Zigbee ZDO commands and made
dissection of ZDO responses with a status other than SUCCESS more
lenient, i.e. dissect what is possible and avoid reporting malformed
2021-05-30 19:15:25 +00:00
Gerald Combs a714805628 macOS: Name our .dmgs according to our architecture.
In osx-dmg.sh, add "ARM 64" or "Intel 64" to our .dmg name depending on
the architecture of Wireshark.app/Contents/MacOS/Wireshark.
2021-05-30 17:32:32 +00:00
Gerald Combs f4e18241b9 [Automatic update for 2021-05-30]
Update manuf, services enterprise numbers, translations, and other items.
2021-05-30 17:17:00 +00:00
Joerg Mayer bf33998a30 Add missing space before ']' 2021-05-30 18:51:02 +02:00
João Valverde 49e9ddbd28 release notes: Indent some paragraphs. 2021-05-30 10:38:40 +01:00
Lin Sun e058d47734 RTP: fix RTP Player play failed when SDP not exist
* packet-rtp.c: add conversation info for RTP packets to help RTP Player work
without SDP.
2021-05-30 08:29:17 +00:00
Uli Heilmeier a4b598d3d6 MQTT: Fix dissector call for payload
As we don't know which dissector we call we don't know which data type the
subdissector wants. Therefore we should only call with data for specific
dissectors.
2021-05-30 06:44:25 +00:00
Guy Harris 883f159c8b pcapng: fix some more WTAP_ERR_BAD_FILE err_info strings.
Just say "pcapng:", rather than giving the function name, to match the
style used here and for other capture file formats.
2021-05-29 23:17:27 -07:00
Guy Harris 5827009e7a pcapng: remove a second colon from a debug message. 2021-05-29 22:52:59 -07:00
Guy Harris 82dcb9196a wiretap: clean up WTAP_ERR_BAD_FILE error messages.
Consistently give a file type name at the beginning of the message.
2021-05-29 18:08:24 -07:00