Commit Graph

79047 Commits

Author SHA1 Message Date
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
Gerald Combs 96d5d2b091 Tools: Update the usb.ids URL in make-usb.py.
The canonical location for the usb.ids file is
http://www.linux-usb.org/usb.ids. Unfortunately that site isn't
accessible over HTTPS so we were using https://usb-ids.gowdy.us/usb.ids
instead. *That* site is down, so switch to the Linux USB project's
SourceForge repository URL, which appears to house the assets for
www.linux-usb.org, including the usb.ids file.


(cherry picked from commit 01d5e8ee51)
2020-11-15 22:48:23 +00:00
Gerald Combs df635a196b [Automatic update for 2020-11-15]
Update manuf, services enterprise numbers, translations, and other items.
2020-11-15 19:12:07 +00:00
Guy Harris f79f407cae Pass an address-family-appropriate socket length to connect().
Some UN*Xes (4.4-lite-derived, such as the obscure, little-known macOS,
FreeBSD, NetBSD, OpenBSD, and DragonFly BSD) have a length field in the
socket address structure.

That was originally done for OSI address support; unlike most transport
addresses, such as IPv4 (and IPv6) addresses, where the size of the
address is fixed, the size of an OSI transport layer address is *not*
fixed, so it cannot be inferred from the address type.

With the dropping of OSI support, that field is no longer necessary in
userland.  System calls that take a socket address argument also take an
address length argument; in newer (all?) versions of the {macOS,
FreeBSD, NetBSD, OpenBSD, DragonFly BSD} kernel, the system call code
sets the length field in the kernel's copy of the address to the address
length field value.

However, that means that you have to pass in the appropriate length; if
you have a sockaddr_storage that might contain an IPv4 address or an
IPv6 address, connect() (and bind()) calls should use the IPv4 address
size for IPv4 addresses and the IPv6 address size for IPv6 addresses,
otherwise, at least on macOS, the call fails.

In cap_open_socket(), report socket() and connect() errors separately,
to make it easier to determine where TCP@ captures fail, if they do
fail.  (That's how I got here in the first place.)


(cherry picked from commit e3047d9b38)
2020-11-15 07:57:41 +00:00
John Thacker cd6afd7c9b Encodings: Fix missing pointer increment in 3GPP TS 28.038 unpacked
The pointer isn't incremented in get_ts_23_038_7bits_string_unpacked
so it just decodes the first octet length times.


(cherry picked from commit 5df3f5d05d)
2020-11-15 07:07:00 +00:00
Pascal Quantin a0ce8fa84d NAS EPS: fix inverted description of 2 N1 UE network capability IE fields
(cherry picked from commit 8c29bfe8b2)
2020-11-14 15:30:45 +00:00
Pascal Quantin 5010face74 NAS-EPS: remove an extra spare bit
It has been replaced by the 15 bearers capability during R15 development


(cherry picked from commit 440d8ceff9)
2020-11-13 18:36:33 +00:00
Pascal Quantin 7e94496598 MBIM: fix mbim.control.ms_app_info.app_name display
(cherry picked from commit ea311f2e21)
2020-11-13 16:05:18 +00:00
Alexis La Goutte f7e8752d2f MMRP: Fix wrong offset for service attribute type
Issue reported by Nils Andersen

Close #17005


(cherry picked from commit 8b512665fc)
2020-11-13 13:15:47 +00:00
Gerald Combs 6ece1c896d RTPS: Fixup our coherent set map.
coherent_set_tracking.coherent_set_registry_map uses a struct as a key,
but the hash and comparison routines treat keys as a sequence of bytes.
Make sure every key byte is initialized. Fixes #16994.

Call wmem_strong_hash on our key in coherent_set_key_hash_by_key instead
of creating and leaking a GBytes struct.


(cherry picked from commit 33e63d19e5)
2020-11-10 22:28:08 +00:00
Gerald Combs d88dc7f29a wiretap: Update pcapng systemd timestamp handling.
It's easy to create systemd blocks with a missing or invalid
__REALTIME_TIMESTAMP= field when fuzz testing. If that's the case, leave
WTAP_HAS_TS unset instead of returning an error. Fixes #16965.


(cherry picked from commit 51145c62e6)
2020-11-10 21:12:47 +00:00
Gerald Combs c8fedf65b2 epan: Limit our bits in decode_bits_in_field.
Limit the number of bits we process in decode_bits_in_field, otherwise
we'll overrun our buffer. Fixes #16958.


(cherry picked from commit d5f2657825)
2020-11-09 17:48:52 +00:00
Gerald Combs 263d7a5272 Tools+test: Call python3 explicitly.
PEP 394[1] says,

"In cases where the script is expected to be executed outside virtual
 environments, developers will need to be aware of the following
 discrepancies across platforms and installation methods:

  * Older Linux distributions will provide a python command that refers
    to Python 2, and will likely not provide a python2 command.

  * Some newer Linux distributions will provide a python command that
    refers to Python 3.

  * Some Linux distributions will not provide a python command at all by
    default, but will provide a python3 command by default."

Debian has forced the issue by choosing the third option[2]:

"NOTE: Debian testing (bullseye) has removed the "python" package and
 the '/usr/bin/python' symlink due to the deprecation of Python 2."

Switch our shebang from "#!/usr/bin/env python" to "#!/usr/bin/env
python3" in some places. Remove some 2/3 version checks if we know we're
running under Python 3. Remove the "coding: utf-8" in a bunch of places
since that's the default in Python 3.

[1]https://www.python.org/dev/peps/pep-0394/#for-python-script-publishers
[2]https://wiki.debian.org/Python


(cherry picked from commit 30c392f166)
2020-11-09 17:11:54 +00:00
Pau Espin 6891c21fe1 rlcmac: Fix EGPRS UL data block TLLI endianess
According to TS 44.060, figure 10.3a.2.1, note 2, the TLLI is
encoded in little endian for EGPRS (while big endian is used in GPRS).


(cherry picked from commit dfa8a3fe5a)
2020-11-09 12:41:59 +00:00