Commit Graph

80322 Commits

Author SHA1 Message Date
Nardi Ivan e677a909e1 SMB2: fix two memory leaks
* Since c3342930 we don't free anymore the entries in the files hashtables.
The cleanest solution is probably to convert these hashtables into two
wmem_map_t structures and let the wmem core handling any cleanup.

* b0f5b2c174 added supported for chained compression; the uncompressed
tvb must be freed
2021-03-23 07:32:23 +00:00
Joerg Mayer 2af7f913b8 packet-isis-snp.c: Add source-id-circuit to dissection 2021-03-23 08:06:26 +01:00
Guy Harris 3f556a6e76 Do the LFS checks before processing any subdirectories.
That's necessary in order to make sure that the required -D flags show
up when building code from all subdirectories.
2021-03-22 19:13:34 -07:00
Guy Harris a7082e33ff psample: fix formatting of 64-bit integers.
guint64 is *not* guaranteed to be an unsigned long int; on an ILP32
platform, it *can't* be a long, as that's only 32 bits.  Use
G_GUINT64_FORMAT to format guint64 values.
2021-03-22 12:59:55 -07:00
Amit Cohen 146578889e packet-netlink-psample: Add dissector for psample netlink packets
The Linux kernel includes a module called psample which sends sampled
packets to user-space over generic netlink.

This patch adds a dissector for these netlink packets.
The dissector is expected to be invoked by the generic netlink dissector and
during its hand off routine it adds an entry in the 'genl.family' dissector
table.

The various netlink attributes are dissected by calling
dissect_netlink_attributes(), in a similar fashion to the rtnetlink and
net_dm dissectors. The sampled packet itself is encoded in the netlink
attribute 'PSAMPLE_ATTR_DATA' and dissected by invoking a dissector from the
'sll.ltype' dissector table based on the packet's protocol which is
encoded in the 'PSAMPLE_ATTR_PROTO' attribute.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
2021-03-22 13:39:36 +00:00
Jirka Novak 030fbc7740 RTP Player: Fixed incorrect handling of legend in graph
Legend and it's elements were shown only when first waveform requires it.
Patch fixes it and all legend elements are shown when required by any
waveform.
2021-03-22 12:33:43 +00:00
Guy Harris 0cc59d38ab Replace the Large File Support CMake stuff.
The existing stuff doesn't appear to work (I tried it on 32-bit Ubuntu
18.04, and it did *not* add any flags to the compilation, as it appeared
not to conclude that they were necessary, even though they were).

Pull in the stuff from libpcap, which *does* appear to work.  (it does
so in my 32-bit Ubuntu testing).

This should fix #17301.

While we're at it, fix cppcheck.sh so that it doesn't attempt to run
cppcheck on files that have been deleted.
2021-03-22 12:11:26 +00:00
Jirka Novak 3693dd52cc rtp: addedd extended sequence number and timestamp
Extended sequence number added to info structures.
Extended timestamp (from 32 to 64 bit) calculation added and added to
info structures.
Both values simpifies calculations in rest of the code - we don't have
to care about wraparound. Code will be adapted later.
2021-03-22 11:21:15 +01:00
Tomasz Moń 9a3bb60266 IPPUSB: Do not assume every USB traffic is IPPUSB
It is invalid to assume that every unknown and/or vendor specific
traffic is IPPUSB. If a vendor specific class is indeed IPPUSB then
the dissector should be selected based on VID/PID.

The way IPPUSB was registering caused packets from devices without
corresponding dissector in Wireshark (majority of the devices in the
wild) being dissected as IPPUSB and shown as Malformed Packets. For
example the Silicon Labs CP210x UART Bridge was dissected as IPPUSB.
2021-03-22 08:39:19 +00:00
Jirka Novak a123578fd5 RTP Player: Visual waveform shows what is really played
Visual waveform is derived from decoded audio. When audio is decoded
incorrectly, waveform now shows it.
E.g. on issue 14401 is now audio play aligned with waveform, but it
exhibits that decoded audio is incorrect - about two times longer than
pcap!

Changes:
- samplefile_ renamed to sample_file_
- tempfile_ is renamed to temp_file_
- decode() is separated to decodeAudio and decodeVisual
- Frame info stores frame len and frame_num for every frame. We must hold
it per frame as it may change in time. Info is stored in separate temp file
as waveform samples.
2021-03-22 04:43:30 +00:00
Guy Harris fdbe68e3f0 ftypes: an fvalue_t can no longer have a GRegex.
Now that FT_PCRE is gone, a GRegex is not a valid value for a field.  (A
field can be a *string* field whose value is supposed to be a PCRE, but
that's just FT_STRING/FT_STRINGZ/FT_STRINGZPAD/FT_STRINGZTRUNC, and the
value is the string text.)
2021-03-21 20:53:34 +00:00
Pascal Quantin 09707973a9 NR RRC: use _ instead of - in filter names
Like what asn2wrs.py does
2021-03-21 19:31:53 +00:00
Pascal Quantin c5c6a5a9cc LTE RRC: use _ instead of - in filter names
Like what asn2wrs.py does
2021-03-21 18:46:53 +00:00
Pascal Quantin f6b0ff72e7 XnAP: use _ instead of - in filter names
Like what asn2wrs.py does
2021-03-21 17:52:50 +00:00
Pascal Quantin 9df7492627 S1AP: have a single filter for ENB-UE-S1AP-ID or MME-UE-S1AP-ID fields 2021-03-21 17:28:31 +00:00
Gerald Combs 7c0ca88170 [Automatic update for 2021-03-21]
Update manuf, services enterprise numbers, translations, and other items.
2021-03-21 17:13:10 +00:00
Eugene Adell 439ecf98b6 TCP: Obvious Spurious Retransmissions are not always detected
In rare circumstances Spurious Retransmissions are not detected
and the SEQ analysis would instead conclude with a Fast Retransmit
or an Out-Of-Order. As Spurious Retransmissions are more certain
than the latter ones, their respective precedences are changed.
The documentation is updated accordingly. Closes #13863.
2021-03-21 16:56:43 +00:00
Pascal Quantin 51cf733fc6 NGAP: have a single filter for RAN-UE-NGAP-ID or AMF-UE-NGAP-ID fields
Closes #17304

While in the area, replace - by _ in the other renamed filters as this
is what asn2wrs.py does.
2021-03-21 16:39:49 +00:00
Pascal Quantin 048a28e3bc IEEE80211: use G_GUINT64_CONSTANT instead of %ULL
As suggested in doc/README.developer
2021-03-21 17:19:05 +01:00
Pascal Quantin f81572ac09 IEEE80211: remove a shadowed variable 2021-03-21 17:08:43 +01:00
Pascal Quantin 66f35c7130 IEEE80211: squelsh a MSVC warning 2021-03-21 17:05:56 +01:00
Preston Hunt 1abe8cc3ce IEEE 802.11: add FTM ranging NTB-specific
Adds dissection of the non-trigger-based-specific subelement of the FTM
ranging parameters element.
2021-03-21 14:20:39 +00:00
Uli Heilmeier 07fb47111e DNS: IXFR/AXFR queries with multiple responses
IXFR and AXFR queries can have multiple DNS responses. As all responses
belong to one transaction, they have the same transaction ID.

We shouldn't handle them as retransmits.

Fix: wireshark/wireshark#17293
2021-03-21 14:02:27 +00:00
Nardi Ivan 90d9eb2062 TLS: another fix for Google-QUIC-Version Transport Parameters
The TP sent (encrypted) by the server is different from the one sent by
the client.
See: https://quiche.googlesource.com/quiche/+/refs/heads/master/quic/core/crypto/transport_parameters.cc

Fix: 8bcf6783a5
2021-03-21 13:29:29 +00:00
Guy Harris b61fd6d76a dfilter, ftypes: get rid of FT_PCRE.
It's not a valid field type, it's only a hack to support regular
expression matching in packet-matching expressions.

Instead, in the packet-matching code, have a separate syntax tree type
for Perl-compatible regular expressions, and a separate instruction to
load one into a register, and have the "matching" operator for field
types take a GRegex * as the second argument.
2021-03-21 03:27:44 -07:00
Guy Harris ce611792c3 dfilter: clean up indentation. 2021-03-21 02:15:00 -07:00
John Thacker de374722e8 TCP, HTTP: Fix reassembly of odd corner case of HTTP responses
RFC 7230 Section 3.3.3 case 7 allows a (discouraged) behavior
for HTTP responses of desegmenting until connection FIN when the
Content-Length is not given.
(See commit 69e50be150 for details.)

There is an even rarer subcase not currently handled- if the headers
are split aross multiple segments, then we won't know we need to
desegment until FIN until after than the first segment.

In such a case, msp->nxtpdu still needs to get set to some appropriately
large offset, since it didn't happen when processing the first segment.
2021-03-21 08:13:38 +00:00
Chuck Craft 936870d507 WSUG: remove extra "/" after adoc URL attributes
Wikipedia link didn't work
Fix wireshark wiki links for consistency
2021-03-20 17:34:58 -05:00
Thomas Dreibholz a9a476f855
SCTP dissector improvements
* Added a hint when SCTP association indexing is disabled (Closes: #17268)
* Added missing space in labels
2021-03-20 19:54:55 +01:00
Darius Davis 4c513fb4ab Minor doc cleanups.
Here's a grab bag of trivial cleanup to the documentation.  This change:

- Cleans up some comments in the asciidoctor macros which are no longer
  accurate (and do not appear in the build products anyway).

- Fixes a missing space in the text "Wireshark Q&A" in the release notes.

- Allows the "docbook" backend to produce hyperlinks too... That seems to be
  necessary if we want to start using our custom link macros in WSDG, which
  seems like a reasonable thing to do.  And fixes up a wrong variable name in
  the handling of the case where we are not able to produce a hyperlink.
2021-03-20 17:14:07 +00:00
João Valverde 9b3afa0278 Rewrite wmem_strbuf_append_vprintf() using vsnprintf() 2021-03-20 14:23:19 +00:00
João Valverde 392299d9ff wmem_test: Replace some assertions with equivalents 2021-03-20 14:23:19 +00:00
Roman-Koshelev b18bb58a95 json: add application/x-ndjson to the media types handled. 2021-03-20 13:54:20 +03:00
Guy Harris be000686de prefs: use g_error() to report certan errors.
Other errors use g_error(); use it for these errors, so the message is
more meaningful.
2021-03-20 01:33:44 -07:00
Guy Harris 9f04392c0f frame, tcp: don't g_assert while in the middle of dissecting.
Use DISSECTOR_ASSERT calls instead, so that *shark doesn't crash, it
just puts a complaint into the protocol tree.
2021-03-20 00:50:07 -07:00
Guy Harris 6ffbbcefa3 libwireshark: don't allow fields of type FT_PCRE to be registered.
It's a fake "field" type, used only for "field" values in
packet-matching expressions to do regular-expression matching.  There is
*no* reason to allow fields of that type.

Don't bother checking the representation type when generating the string
representation of a field value.  If a developer manages to get past all
the tests for FT_PCRE to register and add an instance of that field to
the protocol tree, either 1) the one and only string representation of
an FT_PCRE value is what they want, in which case, whatever, or 2) it's
*not* what they want, in which case, if they file a bug, ask a question
on a mailing list, or ask a question on the Q&A site, we can explain to
them that what they're doing is bogus.
2021-03-20 00:02:51 -07:00
John Thacker 54c30c8336 TCP: Handle sequence number wraparound in multisegment pdus
msp->nxtpdu might wrap around (particularly if DESEGMENT_UNTIL_FIN
is set), so use the wrap around aware sequence number comparisons
when seeing if seq is in the interval [msp->seq, msp->nextpdu).
Note that with wraparound, we have to take the minimum after subtracting
to get the length desired.
2021-03-19 08:25:23 +00:00
Grzegorz Niemirowski d025bdca05 Dissection of Abort packet and characters number in Authorization 2021-03-18 23:58:07 +01:00
Vojtěch Svědiroh 90da092772 MNDP: Add TLV 17 (IPv4 Address) 2021-03-18 10:48:47 +00:00
Guy Harris 5a4cb7ce33 caputils: pull the includes out of extern "C" { ... }.
Have separate #ifdef HAVE_LIBPCAP ... #endif sections for the includes
and the definitions/declarations.

(There are no good solutions that don't require hopping in a time
machine and changing history.)
2021-03-17 21:22:41 -07:00
Guy Harris 4584b9d1d3 caputils: get rid of the extern "C" { idiom.
Instead, declare each function with EXTERN_C, #defined as extern "C" in
C++ and just extern in C.

This avoids all the thrashing to try to keep headers outside extern "C"
{ by the simple expedient of not *having* extern "C" {.
2021-03-17 14:59:55 -07:00
Dario Lombardo 9ca121bcf8 caputils: fix compilation without pcap.
The extern declaration must be put outside the ifdef to match the
closing statement as well as surrounding al the functions.

Fixes: 2820156fbd (Move still *more* headers outside of extern "C".)
2021-03-17 21:21:21 +00:00
Pascal Quantin f6e0de60db Windows: upgrade Npcap to 1.20 2021-03-17 20:46:52 +00:00
Nardi Ivan 6cdfc087c5 TLS: add support for brotli-compressed certificates 2021-03-17 20:10:08 +00:00
David Perry 02a4d41c10 Fix typo in packet-exported_pdu.c
The hidden entry for `ipv6.addr` was mistakenly being generated as
`ipv6.src` instead.
2021-03-17 14:48:37 +00:00
Anders Broman f5fb60cfdd GTP: Fix the version check in decode_qos_umts() 2021-03-17 10:34:30 +00:00
Preston Hunt eda6acb63b 802.11: add dissection of FTM Ranging Parameters 2021-03-17 10:18:26 +00:00
ranjetsih 83165d0107 PFCP: Add missing dissection of ipv6 pd address in UE IP Address
Dissection of UE IP Address was incomplete with missing ipv6 pd address field. This is added by this change.
refer https://gitlab.com/wireshark/wireshark/-/issues/17300 for more details of the issue.
2021-03-17 13:49:22 +05:30
Alexis La Goutte eee8476acd tls(-utils): Add value from RFC 8998 2021-03-17 07:23:36 +00:00
Guy Harris 7efb2120bc kerberos: regenerate packet-kerberos.h.
We updated the template; regenerate the header.
2021-03-16 14:57:30 -07:00