Commit Graph

79060 Commits

Author SHA1 Message Date
Pascal Quantin 655cb724fd sshdump: fix detection of custom version in Windows
(cherry picked from commit 10377c4d92)
2020-12-10 06:14:14 +00:00
Gerald Combs 19cf6c5600 GitLab CI: Use our images. 2020-12-09 19:11:23 -08:00
Gerald Combs 273eb0efcc GitLab CI: Remove more external dependencies. 2020-12-10 02:42:10 +00:00
Gerald Combs 1bf7c9a693 CI: Fix Ubuntu tests.
The wireshark/wireshark-ubuntu-dev image was recently upgraded to Ubuntu
20.04. Since then the following tests have been failing:

---- FAILED
test/suite_capture.py::case_wireshark_capture::test_wireshark_capture_from_fifo
FAILED
test/suite_capture.py::case_wireshark_capture::test_wireshark_capture_from_stdin
FAILED
test/suite_capture.py::case_tshark_capture::test_tshark_capture_from_fifo
FAILED
test/suite_capture.py::case_tshark_capture::test_tshark_capture_from_stdin
FAILED
test/suite_capture.py::case_dumpcap_capture::test_dumpcap_capture_from_fifo
FAILED
test/suite_capture.py::case_dumpcap_capture::test_dumpcap_capture_from_stdin
FAILED
test/suite_capture.py::case_dumpcap_autostop::test_dumpcap_autostop_filesize
FAILED
test/suite_capture.py::case_dumpcap_autostop::test_dumpcap_autostop_packets
FAILED
test/suite_capture.py::case_dumpcap_ringbuffer::test_dumpcap_ringbuffer_filesize
FAILED
test/suite_capture.py::case_dumpcap_ringbuffer::test_dumpcap_ringbuffer_packets
FAILED
test/suite_capture.py::case_dumpcap_pcapng_sections::test_dumpcap_pcapng_multi_in_multi_out
FAILED
test/suite_capture.py::case_dumpcap_pcapng_sections::test_dumpcap_pcapng_multi_in_single_out
FAILED
test/suite_capture.py::case_dumpcap_pcapng_sections::test_dumpcap_pcapng_single_in_multi_out
FAILED
test/suite_capture.py::case_dumpcap_pcapng_sections::test_dumpcap_pcapng_single_in_single_out
FAILED
test/suite_clopts.py::case_dumpcap_options::test_dumpcap_interface_chars
FAILED
test/suite_clopts.py::case_dumpcap_options::test_dumpcap_invalid_chars
FAILED
test/suite_clopts.py::case_dumpcap_options::test_dumpcap_valid_chars
----

This is because dumpcap can't load our local libraries after setting cap_net_raw+cap_net_admin:

----
-- Begin stderr for command ('/builds/wireshark/wireshark/build/run/dumpcap', '-D') --
/builds/wireshark/wireshark/build/run/dumpcap: error while loading shared libraries: libwsutil.so.0: cannot open shared object file: No such file or directory
-- End stderr for command ('/builds/wireshark/wireshark/build/run/dumpcap', '-D') --
----

Add $(pwd)/run to our rpath.


(cherry picked from commit ef10cc74d1)
2020-12-10 02:20:08 +00:00
Gerald Combs 10a02a65d7 Version: 3.4.1 → 3.4.2.
[skip ci]
2020-12-09 18:09:17 -08:00
Gerald Combs 1a27f40587 Build 3.4.1. 2020-12-09 14:15:23 -08:00
George Powers 295d0a19fa Fix reported_len in Lua framewark when creating tvb from range.
This bug affects Lua plugin dissectors for encapsulation protocols like
GRE.  Typically the dissector creates a range for the payload packet, then
calls the next dissector with a tvb derived from the range, using
TvbRange_tvb().  The original version calls
tvb_new_subset_length_caplen() using the remaining capture length for the
reported_len argument.  The fix passes -1 as the reported length, and
tvb_new_subset_length_caplen() calculates the new reported_len as required.

The bug only affects large packets captured with a snaplen and
truncated, then decoded with a Lua plugin for the encapsulation header.

Here's the typical bug symptom, gleaned from tshark decode of
an encapsulated IP payload:

        [Expert Info (Error/Protocol): IPv4 total length exceeds packet length (114 bytes)]
            [IPv4 total length exceeds packet length (114 bytes)]

Closes #15655.

(cherry picked from commit e7ec6739b6)
2020-12-09 21:53:32 +00:00
Gerald Combs 01fb136ec9 GitLab CI: Stop installing external dependencies.
Remove the last package installation instances from .gitlab-ci.yml. Add
a comment at the top noting that dependencies should be added to our
Dockerfiles instead.
2020-12-09 13:25:10 -08:00
John Thacker 181eb5cf82 epan: Fix format_text treament of Greek, Arabic, etc.
format_text uses the wrong bitmask when checking for two byte UTF-8
characters, resulting in rejecting half the possible two bytes characters,
including all of Arabic and Greek, and substituting REPLACEMENT CHARACTER
for them. Fixes #17070, and add some comments about the current behavior
that doesn't match existing comments.


(cherry picked from commit 770746cca8)
2020-12-09 13:31:23 +00:00
Yoshihiro Ueda 9cee503a87 SOME/IP: Fixed incorrect resetting offset of static array.
Fixed resetting offset of array to enable only when created tvb subset. Fixes #17057


(cherry picked from commit 2ab153527d)
2020-12-09 11:28:10 +00:00
Stig Bjørlykke b668d0a9d5 Qt: Support ampersand in funnel menu and button
An ampersand in the menu item or a button is used as shortcut, so
use "&&" to get a real ampersand.


(cherry picked from commit c84681aca2)
2020-12-09 10:14:35 +00:00
Stig Bjørlykke d5ea403f8d Qt: Fix packet bytes hover rectangle position
For Qt 5.11 and newer use horizontalAdvance() instead of boundingRect().width()
to calculate the width of a QString to position the hover rectangle position,
and to select which byte(s) to highlight.

Closes #17033.

(cherry picked from commit cb3b469d7f)
2020-12-09 09:54:16 +00:00
Stig Bjørlykke 3cd179d007 Lua: Improve Listener error handling
Fix error handlers in Listener draw() and reset() to avoid getting
LUA_ERRERR from lua_pcall(). Added error handler for Listener draw()
callback.

Handle LUA_ERRERR from lua_pcall() to avoid assert on this.
Changed some capitalized words in various error message.

Closes #16974.


(cherry picked from commit d104571e8a)
2020-12-09 07:46:08 +00:00
Uli Heilmeier 41a97c978d SMB/SMB2: FS Name is always Unicode
According to MS-CIFS sections 2.2.8.2.6 [1] FS Name (or Label) string
is in unicode.

[1]: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/1011206a-55c5-4dbf-aff0-119514136940

Fixes: wireshark/wireshark#17064


(cherry picked from commit c876b34ed1)
2020-12-09 00:05:42 +00:00
Gerald Combs 1296e05a52 Prep for 3.4.1. 2020-12-08 22:30:50 +00:00
Gerald Combs 3501e40941 GitLab CI: Update lintian excludes.
Add "copyright-excludes-files-in-native-package" to the lintian exclude
list. The wireshark/wireshark-ubuntu-dev image was updated to 20.04
recently, and its lintian added
https://lintian.org/tags/copyright-excludes-files-in-native-package.html.


(cherry picked from commit 7a8a3a8702)
2020-12-08 21:26:54 +00:00
Gerald Combs fa02a5779f [Automatic update for 2020-12-06]
Update manuf, services enterprise numbers, translations, and other items.
2020-12-06 09:26:00 +00:00
Andrii Vladyka e507bee854 DOCSIS: Add FDX Sub-band TLV support in MDD Downstream Active Channel List
(cherry picked from commit 18ae9bd4e2)
2020-12-05 22:22:11 +00:00
Guy Harris d6be39038c editcap: add IDBs to second and subsequent output files.
Remember all the IDBs we've seen from the input file so far and, if
we're writing multiple files (splitting an input file into multiple
output files), add all those IDBs to each of the output files.

Fixes issue #17060.


(cherry picked from commit a11e5261e1)
2020-12-05 21:50:40 +00:00
Andrii Vladyka c3aef32766 DOCSIS: Fixed FDX Sub-band ID/offset TLVs dissection
(cherry picked from commit 708ada8381)
2020-12-04 20:57:07 +00:00
Guy Harris 2491a8f7f3 wlan: fix a bug-number typo in comments.
(cherry picked from commit 00d45cc71a)
2020-12-04 17:24:04 +00:00
John Thacker db14720d63 qt+export objects: Don't sort the header in with the content types
The Export Objects Content-Type filter combobox should not sort the
header of "All Content-Types" in with the list of content types, but
should ensure that it is always the first item, especially as the first
item position is used to show all content. This is particularly an issue
in some localizations; e.g., すべてのコンテントタイプ alphabetizes
after actual content types. Fixes bug #17048


(cherry picked from commit 2d8dd9ed4f)
2020-12-04 08:30:54 +00:00
Teyut c2d9eb4cfd RadioTap: skip present bits for vendor NS.
An error messages was shown when more than 1 present bits was set for a vendor NS because these bits were not skipped properly. Closes https://gitlab.com/wireshark/wireshark/-/issues/17047


(cherry picked from commit 96e31cb116)
2020-12-03 23:05:26 +00:00
Guy Harris 787e19080e wlan: never treat DMG frames as if they have an HT Control field.
At least one ns-3 capture has DMG frames (as indicated by the channel
number being in the 60 GHz band - radiotap currently has no DMG metadata
field) that have the +HTC/Order flag subfield set but have no HT Control
field, causing them to be misdissected.

802.11-2016 says that DMG frames should never have +HTC/Order set; if it
*is* set in a QoS frame known to be a DMG frame, flag it with an expert
info item and don't treat it as having an HT Control field.

Update a bunch of comments to give more information, put comments in the
appropriate places, and speak of 802.11-2016 rather than older standards.

While we're at it, update the title and description of the +HTC/Order
flag to reflect its name as of 802.11-2016.


(cherry picked from commit 3c640ca04a)
2020-12-03 20:37:29 +00:00
Guy Harris 1a79e899df PI_MALFORMED is not a valid error severity; fix it to PI_ERROR.
(cherry picked from commit ac0cf10ab0)
2020-12-03 12:36:18 +00:00
Nardi Ivan d88fadf46d QUIC: fix decryption when "loss-bits" feature is enabled
If the "loss bits" feature has been negotiated between the peers, the
algorithm used by Header Protection cipher must be updated.

See: https://tools.ietf.org/html/draft-ferrieuxhamchaoui-quic-lossbits-03

Close #17010


(cherry picked from commit 5798b91c15)
2020-12-02 17:57:28 +00:00
Gerald Combs fa53725469 Kafka: Limit our decompression size.
Don't assume that the Internet has our best interests at heart when it
gives us the size of our decompression buffer. Assign an arbitrary limit
of 50 MB.

This fixes #16739 in that it takes care of

** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in packet 31: ../epan/proto.c:7043: failed assertion "end >= fi->start"

which is different from the original error output. It looks like *that*
might have taken care of in one of the other recent Kafka bug fixes.

The decompression routines return a success or failure status. Use
gbooleans instead of ints for that.


(cherry picked from commit f4374967bb)
2020-12-02 17:36:02 +00:00
Gerald Combs 5edf715c04 epan: Fix a memory leak.
Make sure _proto_tree_add_bits_ret_val allocates a bits array using the
packet scope, otherwise we leak memory. Fixes #17032.


(cherry picked from commit a9fc769d7b)
2020-12-02 16:43:07 +00:00
Harald Welte 970e9bfb2c packet-ehdlc: Fix TEI in COL_INFO
Back in 2017, commit d7bab0b46e introduced
printing the TEI in COL_INFO.  Unfortunatelky it contained a typo and
stated "TEI:1%u" instead of "TEI:%u".  So TEI 0 became TEI 10, etc. -
causing some confusion.

Let's remote that extraneous '1' and at the same time print the sapi
with two digits for better alignment of multiple lines. It is a
two-digit decimal value (0..63).


(cherry picked from commit 9c5ea50b0a)
2020-11-30 20:29:16 +00:00
Orgad Shaneh 29e59a0e20 Qt: fix Qt 5.15 deprecation warning
QFont::ForceIntegerMetrics is deprecated.
2020-11-30 14:51:45 +00:00
Guy Harris 65c6d829db wlan: don't treat non-QoS frames as having an HT Control field.
That's QoS-frame only; for non-QoS frames, the +HTC/Order subfield
doesn't mean there's an HT Control field.

Update the reference to the part of the 802.11 standard mentioning that
subfield to 802.11-2016.


(cherry picked from commit 1fa5687fad)
2020-11-30 07:35:08 +00:00
Guy Harris be38cd2edb wlan: clean up some tests.
It's clearer to say

    if (A) {
        if (B) {
            do this;
        } else {
            do that;
        }
    }

than to say

    if (A && B) {
        do this;
    } else if (A && !B) {
        do that;
    }


(cherry picked from commit baee4a41c7)
2020-11-30 03:00:51 +00:00
Gerald Combs 3d62a28f06 [Automatic update for 2020-11-29]
Update manuf, services enterprise numbers, translations, and other items.
2020-11-29 21:26:37 +00:00
Guy Harris 127f8e47ee 802.11: clean up data frame handling.
Change

    case DATA_FRAME:
        if (condition) {
            do stuff;
            break;
        }
        do other stuff;
        break;

to

    case DATA_FRAME:
        if (condition) {
            do stuff;
        } else {
            do other stuff;
        }
        break;

to make it clearer that it's "do this if condition is true, else do
that".


(cherry picked from commit 258fb14821)
2020-11-29 18:09:47 +00:00
Guy Harris d73b87e52a llc: don't fetch the etype until it's needed and if it's present.
This avoids throwing exceptions in some cases.


(cherry picked from commit ee764b8d7d)
2020-11-29 10:08:12 +00:00
Guy Harris 2f391e81d6 llc: clean up indentation.
(cherry picked from commit 3f8423c267)
2020-11-29 09:21:49 +00:00
Dario Lombardo 5a3c08e27f github: fix actions.
The command add-path within the changed actions has been deprecated
according to

https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

Use shogo82148/actions-setup-perl for strawberryperl on windows.
Upgrade setup-ruby to 1.1.2 on macos.
2020-11-25 22:32:58 +00:00
Pascal Quantin 4d2c7b9940 S1AP: fix decoding of inter eNB transparent container from NGAP
(cherry picked from commit 74c0b2134b)
2020-11-24 13:45:38 +00:00
Pascal Quantin 095cb11a36 QUIC: fix compilation without HAVE_LIBGCRYPT_AEAD
(cherry picked from commit 8c99f4de8d)
2020-11-24 12:47:46 +00:00
Pascal Quantin dcd7a99f1d NAS 5GS: request type field is 3 bits long
(cherry picked from commit 9fdc3fb3ce)
2020-11-23 22:35:10 +00:00
Uli Heilmeier 8fdffc1113 tshark: set cf values when quiet and tempfile
When there is no do_dissection cf is missing some variables
for cf_close() call. Therefore we have to set them explicitly.

Fixes: wireshark/wireshark#17021


(cherry picked from commit 0fad19b7d9)
2020-11-23 20:07:42 +00:00
Pascal Quantin 7097d817a2 NAS 5GS: fix PDU address type, PDU session type and SSC mode bit width 2020-11-23 16:56:17 +01:00
Nardi Ivan 436cddcc84 QUIC: fix handling of Key Update
After a key update, we should update Packet Protection cipher but
we shouldn't touch the Header Protection one.
With the current code, PP and HP ciphers are quite entangled and we
always reset both of them. Therefore, at the second key update we
reset the used 1-RTT HP cipher too; no wonder even header decryption
fails from that point on.

To properly fix this issue, all the ciphers structures has been rewritten,
clearly separating PP code from HP one.

Close #16920
Close #16916


(cherry picked from commit 5e45f770fd)
2020-11-23 08:47:47 +00:00
Gerald Combs e3c543984d [Automatic update for 2020-11-22]
Update manuf, services enterprise numbers, translations, and other items.
2020-11-22 09:25:59 +00:00
Jaap Keuter 5016b41e6a Avoid python deprecation warning
Fixes ad69ec2e11


(cherry picked from commit 68313f4972)
2020-11-21 20:50:20 +00:00
Joakim Andersson 233f80f21b bluetooth: Fix dissecting of packets received on LE Coded PHY
Fix dissecting of packets received on LE Coded PHY. These packets
will include the extra field "coding indicator" after the access
address.
The assignment of phy in the common bluetooth context was missing,
leading to this field being left out and the offset being wrong.

(cherry picked from commit c586f71a5c)
2020-11-21 18:08:12 +01:00
Guy Harris 899899533c PacketListRecord: add an ensureColorized() method and use it.
Don't call the columnString() and discard the result in order to force
colorization; instead, add a separate method to force colorization and
use that.

This avoids the need to choose a column; we were using 1 as the column
number, but column numbers are zero-origin, so that's column 2, which
isn't guaranteed to exist (a crash ensued if it didn't).


(cherry picked from commit 58aea1de62)
2020-11-20 22:52:22 +00:00
John Thacker 793142cbec RFC2190: Fix bitmasks for several fields in mode A
Fixes some errors that the packet diagram helped make obvious.
Closes #17025.


(cherry picked from commit 5d374fed36)
2020-11-19 01:06:11 +00:00
Jaap Keuter dd88e7a90b HTTP: Restore SSTP support
Add exclusion for SSTP having Contents-Length and no body.
Closes #17024


(cherry picked from commit 0250e4e2e4)
2020-11-18 14:46:20 +00:00
Jason Cohen d304fa8431 f5ethtrailer: Replace ingressslot and ingressport with reserved 2020-11-17 11:07:43 -06:00