Commit Graph

80435 Commits

Author SHA1 Message Date
Roman-Koshelev 0304d5ec27 TFTP: strengthen heuristic for RRQ/WRQ 2021-03-25 06:28:29 +00:00
Roman-Koshelev 5e2080131d TFTP: heuristic fix for RRQ/WRQ
Before that, it worked incorrectly for all valid RRQ/WRQ
2021-03-25 06:28:29 +00:00
João Valverde 291a8b8bc1 Replace g_assert(FALSE) with g_assert_not_reached() 2021-03-24 22:24:37 +00:00
Ranjeet Kumar Singh ebf670692a Protobuf: Allow all protobuf fields to have a plugin dissector 2021-03-24 21:39:01 +00:00
ranjetsih 11f933b446 Protobuf: Provide an option to add plugin subdissectore for fields of all types
As of now a plugin subdissector can register itself for byte or string type only.
This change adds an option to allow a plugin to register a subdissector for any protbuf field.
this subdissector will be able to dissect a protobuf field on top of the existing dissector for that field.
2021-03-24 21:39:01 +00:00
ranjetsih 387ebc955f Protobuf: Provide an option to add plugin subdissectore for fields of all types
As of now a plugin subdissector can register itself for byte or string type only.
This change adds an option to allow a plugin to register a subdissector for any protbuf field.
this subdissector will be able to dissect a protobuf field on top of the existing dissector for that field.
2021-03-24 21:39:01 +00:00
Jirka Novak f10ebb959d VoIP UI: Added shortcuts for dialog buttons
VoIP/SIP Calls, Sequence, RTP Streams, RTP Player and RTP Analysis
dialogs have shortcuts assigned. Shortcuts are same over all dialogs.
2021-03-24 20:02:41 +00:00
Caleb Chiu 4b1dad3f2e USB HID: Removed codes of repeated dissection
For class-specified HID request with data fragment, the original codes perform repeated dissection.
For example, the SET REPORT REQUEST 21 09 02 02 03 00 02 00 02 00 would be dissected as:
Setup Data
    bmRequestType: 0x21
        0... .... = Direction: Host-to-device
        .01. .... = Type: Class (0x1)
        ...0 0001 = Recipient: Interface (0x01)
    bRequest: SET_REPORT (0x09)
    wValue: 0x0202
        ReportID: 2
        ReportType: Output (2)
    wIndex: 3
    wLength: 2
    bRequest: 9
    wValue: 0x0202
    wIndex: 3 (0x0003)
    wLength: 2
    Data Fragment: 0200

And dissected as below after the codes removed:
Setup Data
    bmRequestType: 0x21
        0... .... = Direction: Host-to-device
        .01. .... = Type: Class (0x1)
        ...0 0001 = Recipient: Interface (0x01)
    bRequest: SET_REPORT (0x09)
    wValue: 0x0202
        ReportID: 2
        ReportType: Output (2)
    wIndex: 3
    wLength: 2
    Data Fragment: 0200
2021-03-24 18:46:45 +00:00
Jirka Novak 2a4859bd14 RTP Player: UI improvements
Changes:
- all waveforms has common scale therefore louder/quiter signal is visible
- when stream/streams are deleted from view, Y axis is rescaled and
  waveforms are rearranged to reuse empty space
2021-03-24 09:23:52 +00:00
Uli Heilmeier 2e6d3b571b LDAP: SASL Buffer doesn't include Length field
SASL Buffer starts after the SASL Buffer Length field. Therefore
we should only mark the bytes without the Length field.

Sample capture can be found in wireshark/wireshark#15128
2021-03-24 08:28:20 +00:00
Uli Heilmeier 337bdf8eb3 DNS: Fix pointer for is_multiple_responses
As discussed in wireshark/wireshark!2497 there is no need
for a pointer to a pointer.
2021-03-23 12:32:42 +01:00
Martin Mathieson 4981b10d0b Add a commit-msg that may be installed to verify commit msg line length. 2021-03-23 09:09:19 +00:00
ranjetsih 5177437f30 "GTP: add option to decode T-PDU Data with a plugin dissector"
As of now GTP dissector provides option to decode T-PDU data ether, async, and with some heuristics.

But there is no option present to decode a new protocol with a plugin.

This change adds an option to decode T-PDU data with a plugin, to help develop and test new protocols that are
encapsulated as GTP T-PDU data.
2021-03-23 08:02:43 +00:00
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