Commit Graph

80065 Commits

Author SHA1 Message Date
João Valverde 73d793788c Remove and replace obsolete ws_snprintf() definition
Since fe94133f0d ws_snprintf()
and ws_vsnprintf() don't actually do anything anymore.

The return value of ws_[v]snprintf was discarded before,
now it too conforms to C99.
2021-02-28 22:03:42 +00:00
Alexis La Goutte 670fab2ce5 ieee80211: Fix Dead Store found by Clang Analyzer
Value stored to 'offset' is never read
2021-02-28 15:44:15 +00:00
Alexis La Goutte b140ea6f50 ieee80211: Add FILS Discovery to COL_INFO 2021-02-28 15:44:15 +00:00
Alexis La Goutte fc9fe99234 ieee80211: Fix FILS Discovery Offset 2021-02-28 15:44:15 +00:00
Preston Hunt fae1067d59 IEEE 802.11: Add FTM Sync Info extended tag
This tag contains a single element, which is the 4-octet field TSF Sync
Info.
2021-02-28 15:02:57 +00:00
Vahap Emin Agaogullari e247ffa906 PROFINET: Multiple write in record dissection
COContainerContent dissects PDInterfaceMrpDataAdjust and
PDInterfaceMrpDataAdjust dissects remaining COContainerContent
because of offset problem. Offset problem is fixed.
2021-02-28 14:45:55 +00:00
Adam Mitz a23fe56980 RTPS: move PID_DATA_REPRESENTATION dissection
This Parameter ID is in the XTypes spec, not RTI-specific
2021-02-28 14:06:27 +00:00
Grzegorz Niemirowski be68150021 ZVT: Dissect Print Text Block packet 2021-02-28 13:49:15 +00:00
Gerald Combs e075626611 [Automatic update for 2021-02-28]
Update manuf, services enterprise numbers, translations, and other items.
2021-02-28 12:45:18 +00:00
Preston Hunt 76ae08b7b8 WIP: IEEE 802.11: fix ieee80211_tag_rsnx length processing
Use tvb_captured_length() instead of returning integer offset.
Otherwise, the packet is marked as malformed and the rest of the
packet is not processed.
2021-02-28 09:39:08 +00:00
Thomas Dreibholz 23a5ebf2d9 ASAP+ENRP dissector clean-ups.
Moved common definitions and value strings from ASAP and ENRP dissectors
into separate files packet-asap+enrp-common.h/packet-asap+enrp-common.c.
2021-02-28 08:59:31 +00:00
Uli Heilmeier 984f3372c8 DNS: Ignore req/resp tracking when in_error_pkt
Don't handle request/response tracking when pinfo->flags.in_error_pkt
is set (DNS packets contained within ICMP/ICMPv6 error packets).

Fix: wireshark/wireshark#15036
2021-02-28 08:38:15 +00:00
Guy Harris ab7375dc6b Check for CaptureFileDialog::selectedFileType() failing.
Have it return WTAP_FILE_TYPE_SUBTYPE_UNKNOWN, rather than an
undecorated -1, if the hash table lookup fails.

Check for that as a return value, and pop up a "file an issue" dialog if
WTAP_FILE_TYPE_SUBTYPE_UNKNOWN is returned.

This should squelch Coverity CID 1473325; the error Coverity reports is
bogus, as negative file type/subtype values are check for before we try
to use them as suffixes, but this should catch the "this should not
happen" case that caused the error to pop up.
2021-02-27 14:25:55 -08:00
naf 2f31927dcc tls: improve TLS-SRP support with decryption and username dissection
Dissect client hello SRP extension to extract SRP username.

Decryption is already supported by SSLKEYLOGFILE's client random
and pre-master secret. Add ciphers to decryptable cipher list
so that a decoder is created.
2021-02-27 14:52:50 +00:00
Joey Salazar f503117689 git: Add HTTPS support to Git Protocol
Git protocol version 2[1] supports multiple transport mechanisms, one
of which is via HTTPS.

Adapt the existing Git-over-TCP dissector to support Git-over-HTTP for
fetch and clone requests, following Git's http-protocol
specifications[2].

[1] https://www.kernel.org/pub/software/scm/git/docs/technical/protocol-v2.html
[2] https://www.kernel.org/pub/software/scm/git/docs/technical/http-protocol.html

Part of #17093

Based-on-patch-by: Richard Sharpe <realrichardsharpe@gmail.com>
2021-02-26 20:58:04 +00:00
João Valverde 72dcf04a1b plugins.example: Be less terse in the README description 2021-02-26 16:19:51 +00:00
João Valverde e20ca8e9e8 tests: skip plugin count test if feature is disabled 2021-02-26 15:57:10 +00:00
Thomas Dreibholz 404f619ea2 Added decoding of ProtocolID and PPID into Component Status Protocol dissector.
This merge request adds:
* Decoding of ProtocolID and PPID in Component Status Protocol dissector.
* Moved SCTP PPID list from SCTP dissector into separate file sctpppids.c,
  due to reuse in Component Status Protocol dissector.
* Export of sctpppid_val_ext containing the PPID list.
2021-02-26 15:31:44 +00:00
Martin Kaiser 12edf427ab dvb-ci: clean up the protocol column for mime files
Some DVB-CI messages contain a file that can be dissected by the mime-encap
dissector. mime-encap adds itself to the protocol column. We already set a
fence, but things still look messy:

DVB-CIMIME_FILE

This patch adds ", " before the fence and "Data" afterwards. If mime-encap
is enabled, it'll overwrite the Data with its protocol name

DVB-CI, MIME_FILE

If mime-encap is disabled, the embedded file will be handled by the data
dissector, who doesn't touch the protocol column. So we keep

DVB-CI, Data
2021-02-25 22:22:02 +01:00
Gerald Combs eceff254b6 Docs: Recommend EditorConfig.
Note that we use EditorConfig in the WSDG and README.developer, and that
you should make sure your editor uses it. Recommend 4 space indentation
more strongly. Ping #17253.

Reorder and reword the coding style sections of each document while
we're here.
2021-02-25 09:37:49 -08:00
Anders Broman 8ccbdb786a Add support for SRVName SAN extension for TLS certificates
Closes #17256
2021-02-25 10:21:24 +01:00
Nardi Ivan e2ee14ae03 GQUIC: add support for some missing tags
Fix decoding of VER tag
2021-02-25 08:28:07 +00:00
Joerg Mayer 92b3edd798 macos-setup.sh: Starting with major 11, the minor SDK version no longer matters 2021-02-25 07:09:54 +00:00
Prashant Tripathi 525ad67066 The latest power profile C37.237-2017 has IEEE_C37_238 TLV different
from the earlier version C37.237-2011. The previous version of this
standard, IEEE Std C37.238-2011, separated grandmaster time inaccuracy
and what was then called NetworkTimeInaccuracy into two fields. The
first, grandmasterTimeInaccuracy, was located immediately before
totalTimeInaccuracy in this version (now a reserved field). The second,
networkTimeInaccuracy, was located where totalTimeInaccuracy is now
found.
2021-02-25 06:23:21 +00:00
Guy Harris 7665075241 wiretap: make WTAP_FILE_TYPE_SUBTYPE_UNKNOWN -1 rather than an index.
And get rid of the entry for that type in the table of type/subtypes.
2021-02-24 17:30:47 -08:00
Michele Mazzante 715fc20a92 Update packet-mux27010.c following the correct interpretation of the EA bit from the specs https://www.3gpp.org/ftp/tsg_t/tsg_t/tsgt_04/docs/pdfs/TP-99119.pdf where it is described the case of info field bigger than 127 bytes:
* the first octet stores the first 7 LSB bits
 * the second octet stores the other 8 MSB bits (see pg. 18).
2021-02-24 12:53:25 +00:00
Guy Harris 9191746670 wiretap: add a block type for systemd journal entries.
Those are used by more than one file type, so we should provide a block
type for them.  (We don't *currently* use that block type, or the packet
block type, but this makes them available for future use.)
2021-02-24 03:09:03 -08:00
Guy Harris 7ffc11e38f wiretap: add some additional bounds checks for file type/subtype values.
Check to make sure the value is non-negative and less than the number of
file type/subtypes.

Make it clearer than one check is unnecessary:

* pull wtap_dump_open_check() into wtap_dump_init_dumper(), so it's
clear that wtap_dump_init_dumper() ensures the validity of the file
type/subtype value early on (wtap_dump_can_open() fails if it's not
valid);

* pull wtap_dump_alloc_wdh() into wtap_dump_init_dumper(), so that the
allocation and all the initialiation is done there - that makes it clear
that it sets the file_type_subtype member of the wtap_dumper structure
before wtap_dump_init_dumper() returns;

* have wtap_dump_open_finish() use that value rather than being passed
the type/subtype value explicitly, so it's clear that it's dealing with
a validated value.
2021-02-24 10:36:05 +00:00
Jonathan Nieder 23e6b32855 git: show expert info for unrecognized special packet 0003
In Git protocol, a pkt-line consists of a 4-hexdigit pkt-length,
followed by several bytes of pkt-data.  The pkt-length represents the
length of the entire pkt-line including the length field, so for an
ordinary pkt-line the length is always >= 4.  This allows the protocol
to use values less than 4 as special values --- for example, 0000 is a
so-called flush-pkt, representing the end of a command.

There's one particular pkt-length value that should never appear: 0003
is not >= 4 and is not a flush-pkt, delim-pkt, or response-end-pkt, so
it is not permitted in Git protocol.  Currently the dissector handles
this case by returning length 0 so it doesn't show up in wireshark as
Git protocol.  Better to treat it as Git protocol and add expert-info
describing what is wrong in case it shows up in a corrupt capture.

Part of #17093.  Based on a hint from Pascal Quantin at [1].

[1] https://gitlab.com/wireshark/wireshark/-/merge_requests/1946#note_515567051
2021-02-24 08:37:16 +00:00
Preston Hunt a3f1408649 IEEE 802.11: Extend RSNX to dissect octet 2
Refactor existing code to use a similar approach to dissecting as is
used for Extended Capabilities.
2021-02-24 07:49:00 +00:00
Nardi Ivan 7fd7153696 GQUIC: add decoding of CGST tag
Regression introduced by b287e7165e.

To avoid an infinite loop with malformed packets, that commit stops
parsing the tags list after finding an unknown tag.
When this "unknown" tag is perfectly valid but not supported by
Wireshark, we don't decode any subsequent (valid) tags anymore.

GQUIC is going to die soon and it is quite unlikely it will change in
the next future. Therefore the best/quick solution is simply decoding
any valid tag.

Close #17250
2021-02-24 06:22:14 +00:00
Guy Harris ed86f51e49 wiretap: rename wtap_register_file_type_subtypes().
It only registers one file type/subtype, so rename it to
wtap_register_file_type_subtype().

That will also force plugins to be recompiled; that will produce compile
errors for some plugins that didn't change to match the new contents of
the file_type_subtype_info structure.

Also check to make sure that the registered file type/subtype supports
at least one type of block; a file type/subtype that doesn't return
*any* blocks and doesn't permit *any* block types to be written is not
very useful.  That should also catch most if not all other plugins that
didn't change to match the new contents of the file_type_subtype_info
structure.

Don't make errors registering a file type/subtype fatal; just complain,
don't register the bogus file type/subtype, and drive on.
2021-02-23 20:39:16 -08:00
Guy Harris 4cdc6ee573 exp_pdu_open: swap two arguments.
The second argument is the file type/subtype, and the third argument is
the file descriptor, according to the function declaration and all the
calls to it.  Make it so in the function definition.

Fixes Coverity CIDs 1473314 and 1473312.
2021-02-23 18:38:53 -08:00
Guy Harris 0e301fba78 usbdump: update struct file_type_subtype_info.
Update this to match the new layout of that structure, providing a list
of supported packets.
2021-02-23 16:59:44 -08:00
Guy Harris 166159f15d wiretap: eliminate the pcap/nspcap/pcapng WTAP_FILE_TYPE_SUBTYPE_ values.
Register the pcap and pcapng file types/subtypes rather than hardwiring
them into the table.

Call the registration routines for them directly, rather than through a
generated table; they're always supposed to be there, as some code in
Wireshark either writes only one of those formats or defaults to writing
one of those formats.  Don't run their source code through the
registration-routine-finder script.

Have the file type/subtype codes for them be directly exported to the
libwiretap core, and provide routines to return each of them, to be used
by the aforementioned code.

When reporting errors with cfile_write_failure_message(), use
wtap_dump_file_type_subtype() to get the file type/subtype value for the
wtap_dumper to which we're writing, rather than hardcoding it.

Have the "export PDU" code capable of supporting arbitrary file
types/subtypes, although we currently only use pcapng.

Get rid of declarations of now-static can_write_encap and
dump_open routines in various headers.
2021-02-23 21:56:20 +00:00
Jonathan Nieder 3742f921b2 git: read pkt-line length from specified offset
dissect_pkt_line takes an `offset` parameter (passed by reference) to
allow parsing multiple pkt-lines from a single tvbuff.  Currently the
only caller passes an offset of 0, so reading from `0` happens to do
the right thing, but that is about to change when [1] adds support for
dissecting multiple pkt-lines in a buffered HTTP request or response.

Part of #17093.  Noticed by Joey Salazar and explained by Pascal
Quantin.

[1] https://gitlab.com/wireshark/wireshark/-/merge_requests/1946
2021-02-23 21:35:11 +00:00
Alex Nik ef61fd4638 added description for UDP Multicast Streams
fixed UDP Multicast Streams title and also crossref in WSUG_chapter_use.adoc table

applied SME suggestions

minor fixes
2021-02-23 21:14:36 +00:00
Alex Nik c3ec4f52ce added description for the Flow Graph window + screenshot
added SME suggestions

minor fixes

minor fixes

applied SME suggestions
2021-02-23 20:55:00 +00:00
Joerg Mayer 30d14386b4 radius dict aerohive: Add comment about attr 212 (ap mgmt mac) 2021-02-23 20:27:05 +00:00
Joerg Mayer fe4555c3c1 Extremenetwork/Avaya/Lucent/Baynetworks/Wellfleet specific protocol updates 2021-02-23 20:01:13 +00:00
Joerg Mayer aae669118e packet-srt.c: Add link to some network protocol description 2021-02-23 15:43:14 +01:00
Joerg Mayer ba196f550d packet-tftp.c: Fix an incorrect value in a comment. 2021-02-23 14:54:44 +01:00
Martin Mathieson ea7131cee0 Make a couple of dissector vars static.
These are the very last ones that are not mentioned in header files.
2021-02-23 09:33:49 +00:00
Pascal Quantin 20720c8441 MBIM: fix some signedness warnings 2021-02-23 09:34:36 +01:00
Odysseus Yang cf14578c61 MBIM: dissect the commands of MBIM extended version 3.0
MBIM_CID_MS_DEVICE_CAP_V2
MBIM_CID_SUBSCRIBER_READY_STATUS
MBIM_CID_PACKET_SERVICE
MBIM_CID_CONNECT
MBIM_CID_IP_PACKET_FILTERS
MBIM_CID_MS_MODEM_CONFIG
MBIM_CID_MS_REGISTRATION_PARAMS
MBIM_CID_WAKE_REASON
2021-02-23 07:36:12 +00:00
Guy Harris bc3cc17bc4 Lua: add routines to return pcap/nsec pcap/pcapng file type/subtypes.
These will be backported, for the benefit of Lua scripts that want those
specific file types/subtypes (typically in order to write files of those
types); that allows those types to be fetched without having to know the
right string to hand to wslua_wtap_name_to_file_type_subtype().
2021-02-22 22:23:54 -08:00
Grzegorz Niemirowski 69ca16bdf0 ZVT: Dissect list of permitted ZVT commands 2021-02-22 21:28:55 +00:00
Guy Harris d50f712a85 wiretap: fix use of wrong index as array subscript.
"i" and "j" are too similar, so it's easy to use the wrong one if you're
using both as array indices and not easy enough to notice the mistake.

Use somewhat more meaningful names when we fix the index.

Fixes #17252.
2021-02-22 12:55:35 -08:00
Guy Harris 00d2661459 wiretap: fix dependency in CMakeLists.txt.
wtap_modules.c depends on ${WIRETAP_MODULE_FILES} rather than
${WIRETAP_NONGENERATED_FILES}.
2021-02-22 19:45:44 +00:00
Thomas Dreibholz 3a25ebbc42 Updated broken URL in headers. 2021-02-22 18:18:45 +00:00