Commit Graph

77218 Commits

Author SHA1 Message Date
Guy Harris cd6134da90 Add ws_strtoi() and ws_strtoui() routines and use them.
Those fetch gint and guint values, respectively, rather than values with
specified sizes in bits.

This should squelch Coverity CID 1457357.

Change-Id: Ia8f100bd3fe90c266e24a4346f80b2667c653b93
Reviewed-on: https://code.wireshark.org/review/36177
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2020-02-25 08:27:52 +00:00
Dongle Su f2a64e9559 RTP: Add support for RTP over TCP (RFC 4571)
Fix the dissector error of RTP over TCP(RFC4571)

Bug: 16392
Change-Id: I517daee0cf1ff47484d9b5ea5007ecde9fe16a44
Reviewed-on: https://code.wireshark.org/review/36091
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-24 15:34:03 +00:00
Anders Broman 4e98225198 GTPv2: Dissect more flags
Change-Id: I42907c1d339e105efd45d248a94d041afebc6a75
Reviewed-on: https://code.wireshark.org/review/36170
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-24 15:33:06 +00:00
Anders Broman 301cb9956b gtpv2: 8.12 Indication, add new bit decoding.
Change-Id: I9791bc901cc88288963a31c36b4660595e23d470
Reviewed-on: https://code.wireshark.org/review/36169
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-24 09:47:59 +00:00
Dylan Ulis 7b99a82bf8 Edit Resolved Name: Don't add duplicate IPs
1. Switch list of manually resolved names from a list to a map
   (IP Address --> Custom Hostname)
2. If an address was already in the list, just update the old entry.
Previously this added a new entry anytime somebody would edit a
hostname.
3. Display the previous hostname in the GUI
4. Remove unused manually_resolve_cleanup()

Bug: 11221
Change-Id: I42d5b6267eb6613bdf7783865bc2d30d6bda1147
Reviewed-on: https://code.wireshark.org/review/36059
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-24 07:45:00 +00:00
Vasil Velichkov 2c4fc32913 smpp: Set the column fence before dissecting the PDU
Set the fence before dissecting the PDU because if the PDU is invalid it
may throw an exception and the next PDU will clear the info about the
current PDU.

Change-Id: Ib8ad2e6e5b99c53fc75a8e55e86375a3cead1678
Reviewed-on: https://code.wireshark.org/review/36131
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-24 07:44:46 +00:00
Tomasz Moń c86e995aa2 FTDI MPSSE: Improve command descriptions
Describe commands that trigger BadCommand response on target device as
"Bad Command" instead of "Unknown".

Split command value strings into four categories:
  * Common to all devices
  * FT2232D only
  * FT232H, FT2232H, FT4232H only
  * FT232H only

Describe undocumented data shifting commands that do not trigger
BadCommand response as "Undocumented Data Shifting Command".

Ping-Bug: 11743
Change-Id: If876b54184a5c21f0581c67d9b875ba635a3440c
Reviewed-on: https://code.wireshark.org/review/36162
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Filipe Laíns <lains@archlinux.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-24 07:44:22 +00:00
Jambukumar Kulandaivel 59130ed824 ieee80211: Adding dissect of 60GHz Information Element
Dissect the 60GHz information element which is part of the
WI-FI alliance (WFA) 60Ghz technical specification version 1.0.

Change-Id: Ib5a7f0e137a8ef11b389253026ee9fb1b54cdfa3
Signed-off-by: Jambukumar Kulandaivel <jambukumar@codeaurora.org>
Reviewed-on: https://code.wireshark.org/review/35975
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-24 07:44:09 +00:00
Tomasz Moń 6b80979faf FTDI MPSSE: Display pin name alongside signal name
Pass chip and interface information from FTDI FT to MPSSE dissector.

Set usb_conv_info_t field deviceVersion to bcdDevice field from DEVICE
DESCRIPTOR so USB dissectors can use it. In case of FTDI FT chips, the
bcdDevice value is used to determine chip.

Ping-Bug: 11743
Change-Id: I4f2cf5d50355d914fef51cf7e268064b02bc02ed
Reviewed-on: https://code.wireshark.org/review/36147
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Filipe Laíns <lains@archlinux.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-24 07:43:41 +00:00
Gerald Combs e54bcb0100 editcap: Remove an arbitrary time boundary.
As pointed out by @debookee in

https://twitter.com/debookee/status/1229711779648933888

if you pass a start time (-A) and no stop time (-B) to editcap, it will
set the stop time to December 31, 2035. Adjust our logic to work without
a stop time instead.

Change-Id: Ic724ce8ee6d8c346be1d4caf2899d3e10e68fa94
Reviewed-on: https://code.wireshark.org/review/36138
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-24 07:43:22 +00:00
Jason Cohen 0875845e90 f5ethtrailer: Continued clean-up from plug-in import
This dissector was iniitally a plug-in and was converted to a built-in
on Change: https://code.wireshark.org/review/#/c/26428/
There is still a fair bit of clean up necessary.  I'm attempting some of
that here.  Detailed below are steps of each of the consecutive patch
sets as I work through it.  They are in a top (oldest) down (newest)
order.  If there is another way I should do this please let me know.

f5ethtrailer: Fix indiscriminate consumption of trailers

Dissector was not discriminating in consuming trailers.  Rewrote
the heuristic to look for specific signatures and return if they
are not found. Setting heuristic back to enabled since it now only
consumes trailers that it should be able to dissect.

f5ehtrailer: remove unneeded () from around return values

f5ethtrailer: Remove macros

Macros were left over from using the same same code base to compile the
plugin against differed API versions (versions of Wireshark).  Now that
the code is part of the core repository, it only needs to apply to the
branch it exists in.

f5ethtrailer: Correct FILEINFO mappings

f5ethtrailer: Eliminate compile time option to exclude POP_OTHER_FIELDS

This is now a runtime pref that is disabled by defualt.

Remove unnecessary NULL check

f5ethtrailer: Comment clean up

Clean up a few comments, make sure every function has a doc comment

f5ethtrailer: Trailer detection improved

Skip over leading zeros
Add prefrence to walk remaining data looking for trailer.
Disabled (default) Only look for trailers at first non-zero byte
Enabled start at first non-zero byte looking for trailers.  Walk the
remaining data byte-by-byte looking for a matching trailer.

Change-Id: I6499ed6c6a760b668efe86632011cd07a7e447b2
Reviewed-on: https://code.wireshark.org/review/36012
Reviewed-by: Jason Cohen <kryojenik2@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-24 07:42:59 +00:00
Gerald Combs 8bda8642df EAP: Remove a couple of string length assumptions.
Don't assume our MNC and MCC string lengths are > 3.

Bug: 16397
Change-Id: I0759dcb9d0c5f078cf3a98e9323d9cb741e15dd4
Reviewed-on: https://code.wireshark.org/review/36146
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-24 07:42:38 +00:00
Anders Broman 8953da8975 rpm-setup: Get rid of unary operator expected warning.
Change-Id: Id43f39c4d662d69a292ac433ee48fab72256a156
Reviewed-on: https://code.wireshark.org/review/36168
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-24 07:42:27 +00:00
Martin Mathieson ce0d780c3f Some more issues spotted by PVS-Studio in bug 16335.
Trivial, mostly just redundant assignments or
format specifiers.

Change-Id: Iaf33f24d2af5a48a5e1b797e582bf936914c8daa
Reviewed-on: https://code.wireshark.org/review/36154
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-02-23 21:43:51 +00:00
Tomasz Moń a9d7ce53b1 FTDI FT: Add Amontec JTAGkey USB VID/PID
Ping-Bug: 11743
Change-Id: I5fd08362e468abf4f2d94f10ef16107d52144357
Reviewed-on: https://code.wireshark.org/review/36165
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Tomasz Moń <desowin@gmail.com>
2020-02-23 11:35:10 +00:00
Gerald Combs 7620ba7f72 [Automatic update for 2020-02-23]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I1293c3db1c2739a9db34507eba6f8ab5eea8005c
Reviewed-on: https://code.wireshark.org/review/36160
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-02-23 08:20:06 +00:00
Aurelien Aptel 1702e59b55 test/suite_decryption.py: update SMB3+ decryption tests
Update existing tests to the new smb2_seskey_list syntax and add new
tests for decrypting using different combinations of provided keys.

Change-Id: I86fda351ff736cae6029ec2321c45a02c1917226
Reviewed-on: https://code.wireshark.org/review/36137
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-02-23 06:14:06 +00:00
Aurelien Aptel b8f9448c78 SMB2: try to guess encryption settings when not available
When dissecting a capture made in the middle of an existing encrypted
session we cannot decrypt the traffic because we don't know:

* what SMB dialect and encryption algorithm was picked during the
  session establishment
* which host is the server and which host is the client

Since we know the decrypted payload always starts with a valid header
we use this as an heuristic and try all possible decryption settings.

Change-Id: I1daa297ced98e62cf361b9022871c668e56f8f4b
Reviewed-on: https://code.wireshark.org/review/36136
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-02-23 06:13:30 +00:00
Aurelien Aptel 95a37ff2fe SMB2: allow users to give decryption keys directly
Previously users could only give a session key via

    uat:smb2_seskey_list:<id>,<seskey>

which was used to generate the decryption keys, as long as the trace
contained the session establishement.

Users have often asked about how to decrypt traffic captured in the
middle of an existing session but this wasn't possible.

This commit extends uat:smb2_seskey_list with 2 extra columns to store
decryption keys so that traffic can be decrypted at any point of the
session.

This has the side effect of changing the current syntax from:

    ... -o uat:smb2_seskey_list:<id>,<seskey>

To:

    ... -o 'uat:smb2_seskey_list:<id>,<seskey>,"",""'

(make sure the quoting is right)

Change-Id: I810d464b6f3e749de39b4428d73e0d6be29f3152
Reviewed-on: https://code.wireshark.org/review/36135
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-02-23 06:12:32 +00:00
Aurelien Aptel de665417ab SMB2: ipv4 address is stored in big endian
when expanding QUERY_NETWORK_INTERFACE_INFO responses completely IPv4
addresses show up backwards. Fix this by setting the right
endianess (BE).

Change-Id: I94897290f4052bc1e2471bc26d72dce8012b3e3a
Reviewed-on: https://code.wireshark.org/review/36144
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-02-23 06:10:40 +00:00
Peter Wu 1403c09105 DNS: Add DoT ALPN (RFC 7858)
This codepoint was not registered in RFC 7858, but requested later by
Jon Reed at 2019-12-12, in "[dns-privacy] ALPN protocol ID for DoT":

    Tne primary use case we have is supporting both DoT and DoH on port
    443, when port 853 is blocked between clients and the servers (this
    is by mutual agreement, as discussed in RFC 7858 § 3.1).

Change-Id: Ic993023eedf6f40565a208033703aa1575710c17
Reviewed-on: https://code.wireshark.org/review/36151
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-02-23 06:10:18 +00:00
Peter Wu a2530f740d WireGuard: ignore messages with invalid lengths
A UDP payload of 543 bytes can never be a valid Handshake Initiation
message for example. Reject such messages to avoid user confusion.

Bug: 16394
Change-Id: Ia40ae24f8ff8abaf2bead54cbf091db907b66373
Reviewed-on: https://code.wireshark.org/review/36149
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-02-23 06:09:28 +00:00
Peter Wu b2ee7a2876 WireGuard: fix null pointer crash
It was assumed that the WireGuard dissector is always called on the
first pass before the second pass. That might not be the case when the
heuristics dissector sets a conversation dissector later in the stream.
Be prepared to handle this case. Do not simply abort, the previous
packets may be valid data messages.

Bug: 16394
Change-Id: Id5bf38c07f4d1bffd4b372e92d9a8784e094829a
Reviewed-on: https://code.wireshark.org/review/36148
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-02-23 06:08:08 +00:00
Guy Harris c268e9b0d5 Use "must" instead of "should" to avoid ambiguity.
As I said in

    https://ask.wireshark.org/question/10361/how-to-properly-use-heuristic-dissector-for-tcp/?answer=10363#post-id-10363

  "Should" has multiple meanings; there's "Used to indicate obligation,
  duty, or correctness, typically when criticizing someone's actions.", as
  in "I think we should trust our people more", and there's "Used to
  indicate what is probable.", as in "the bus should arrive in a few
  minutes". You're reading it in the latter sense; it was intended in the
  former sense.

  That sentence should probably be changed to "Wireshark must be then set
  up..." to avoid the ambiguity.

Make it so (over half a year later, sigh), and change another case where
"should" is meant in the first sense while we're at it.

Change-Id: I90198d1616619c75802deeeb703ceee0c8bac1bf
Reviewed-on: https://code.wireshark.org/review/36155
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2020-02-23 04:36:23 +00:00
Peter Wu e4138a3b98 QUIC,TLS: update transport parameter encoding (draft-27)
Use heuristics to distinguish TP encoding of older drafts from draft 27.
Tested with a draft-24 and draft-27 capture.

Bug: 13881
Change-Id: I0426f2b3afeab974104f0363b25dcf6387101d1f
Reviewed-on: https://code.wireshark.org/review/36150
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-02-22 19:57:36 +00:00
Aurelien Aptel 31cf648423 SMB2: add (disabled) debug code
Add debug macros to help development. These macros are disabled by
default.

Change-Id: I9abdfdf58bbfb47f1d9145b6f4156708bee01512
Reviewed-on: https://code.wireshark.org/review/36134
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-02-21 23:38:55 +00:00
Vasil Velichkov b45b53bd10 smpp: Implement export PDU functionality
Change-Id: I216c8f205f3e1d7a58bbc8a60fb4c622c7ec15d1
Reviewed-on: https://code.wireshark.org/review/36132
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-19 07:24:14 +00:00
Gerald Combs ae1d569322 macos-setup: Update Gcrypt to 1.8.5.
This is required for WireGuard decryption.

Change-Id: I8d27ac198a8bac161c1675e87c3685c8d73c9246
Reviewed-on: https://code.wireshark.org/review/36129
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-02-18 23:54:26 +00:00
Gerald Combs b3efeb2573 Test: Bump the WireGuard Gcrypt version requirement.
WireGuard decryption requires Gcrypt 1.8 or later.

Change-Id: I4a9e910df61a2d8f375e3f90b22511fe59be922c
Reviewed-on: https://code.wireshark.org/review/36128
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-02-18 23:33:29 +00:00
Anders Broman 645f05bafa EVS: Fix display of A.2.1.3 Special case for 56 bit payload size
Change-Id: I5557e9d2efffaa1ff747f1132b065fe202222ad6
Reviewed-on: https://code.wireshark.org/review/36126
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-18 11:23:24 +00:00
Alexis La Goutte 498644ef61 mp4(file): Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I4f07d18cef039d671ca3bbade8ca956be1341b56
Reviewed-on: https://code.wireshark.org/review/36082
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-18 09:34:41 +00:00
Orgad Shaneh d582640336 ACDR: Move TPNCP registrations to TPNCP dissector
Requires less lookups, and allows overriding the registration in plugins.

Change-Id: I8fe78bf69d992737d9363ac79ed865b1d6490cda
Reviewed-on: https://code.wireshark.org/review/36124
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-18 09:33:59 +00:00
Vadim Yanitskiy 2abba7ad62 csn1: fix csnStreamDissector(): catch unknown CSN_CHOICE values
Some CSN.1 definitions may contain so-called unions that usually
combine two or more choices. The exact element to be chosen is
determined by the value encoded in one or more bits preceeding
it. Here is an example of an identity union:

  {   0   < Global TFI : < Global TFI IE > >
    | 10  < TLLI / G-RNTI : bit (32) >
    | 110 < TQI : bit (16) > }

So if a given bitstream starts with '0'B, the Global TFI IE follows.
Otherwise either TLLI / G-RNTI or TQI is to be chosen. But what if
neither of the choice items matches? For example, what if a given
bitstream starts with '111'B?

Most likely we should treat the bitstream as malformed, stop further
decoding and report an error. And that's how Pycrate's [1] CSN.1
decoder [2] behaves. Hovewer, as it turns out, Wireshark would
simply skip the whole choice element and start decoding the next
one from the same bit position.

Here is an example of a malformed packet:

  GSM RLC/MAC: PACKET_POLLING_REQUEST (4) (Downlink)
    01.. .... = Payload Type (DL): RLC/MAC block contains an RLC/MAC control block
                                   that does not include the optional octets of
				   the RLC/MAC control header (1)
    ..00 .... = RRBP: Reserved Block: (N+13) mod 2715648 (0)
    .... 1... = S/P: RRBP field is valid
    .... .001 = USF: 1
    PACKET_POLLING_REQUEST (4) (downlink)
      0001 00.. = MESSAGE_TYPE (DL): PACKET_POLLING_REQUEST (4)
      .... ..11 = PAGE_MODE: Same as before (3)
 ---! ID  <--- This is wrong! '111'B is unknown
      1... .... = CONTROL_ACK_TYPE: PACKET CONTROL ACKNOWLEDGEMENT
                                    message format shall be an RLC/MAC control block
      Padding Bits
        .110 0000  0000 1000  0101 0000  1000 1000 = Padding: 1611157640
        0100 0000  0001 0011  1010 1000  0000 0100 = Padding: 1075030020
        1000 1011  0010 1011  0010 1011  0010 1011 = Padding: 2334862123
        0010 1011  0010 1011  0010 1011  0010 1011 = Padding: 724249387
        0010 1011  0010 1011  0010 1011  0010 1011 = Padding: 724249387
        0010 1011 = Padding: 43

Let's fix this, so after this patch we get:

  GSM RLC/MAC: PACKET_POLLING_REQUEST (4) (Downlink)
    01.. .... = Payload Type (DL): RLC/MAC block contains an RLC/MAC control block
                                   that does not include the optional octets of
                                   the RLC/MAC control header (1)
    ..00 .... = RRBP: Reserved Block: (N+13) mod 2715648 (0)
    .... 1... = S/P: RRBP field is valid
    .... .001 = USF: 1
    PACKET_POLLING_REQUEST (4) (downlink)
      0001 00.. = MESSAGE_TYPE (DL): PACKET_POLLING_REQUEST (4)
      .... ..11 = PAGE_MODE: Same as before (3)
      ID
        STREAM NOT SUPPORTED (PacketPollingID)
          [Expert Info (Warning/Protocol): STREAM NOT SUPPORTED (PacketPollingID)]
            [STREAM NOT SUPPORTED (PacketPollingID)]
            [Severity level: Warning]
            [Group: Protocol]

[1] https://github.com/P1sec/pycrate
[2] https://github.com/P1sec/pycrate/wiki/Using-the-pycrate-csn1-translator-and-runtime

Change-Id: I7096c294e0d04d6afb3414874d3404cbb637fdae
Reviewed-on: https://code.wireshark.org/review/36077
Reviewed-by: Pau Espin Pedrol <pespin@sysmocom.de>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-18 06:27:56 +00:00
Peter Krystad 22e617d862 mptcp: correctly parse v1 ADD_ADDR suboption
RFC6824bis-18 (MPTCP version 1) removes the IP version field and
replaces it with an Echo bit that provides a reliability
mechanism for the ADD_ADDR option. This change allows either
v0 or v1 ADD_ADDR options to be displayed correctly.

Change-Id: I375bcf6e54c07f88ca8877a2c4b4220cf4157a64
Reviewed-on: https://code.wireshark.org/review/36095
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-18 06:26:44 +00:00
Dario Lombardo c544f7e3f4 Qt: initialize members (CID: 1457926).
Change-Id: I4c890db567a3668525bcf9915cb5687e2019c5c1
Reviewed-on: https://code.wireshark.org/review/36125
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-02-17 20:52:43 +00:00
Orgad Shaneh ed0e320611 ACDR: Fix value display for XML media types
Wrong value used for the value string map.

Change-Id: I320f1d0bfc967beed84770efa75dee98c5f68e70
Reviewed-on: https://code.wireshark.org/review/36123
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-17 14:03:55 +00:00
Jaap Keuter 9ea4bd2b96 doc: Apply proper capitalization to the Wireshark name
Change-Id: I9d29cd705c9af39bae6cffdefaba0b9c8b4bb2e6
Reviewed-on: https://code.wireshark.org/review/36081
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-17 04:40:16 +00:00
Peter Wu 52de94394e acdr: remove private gtypes.h header to fix the build
Gisle Vanem reported a build issue:

    In file included from epan/dissectors/packet-acdr.c:25:
    In file included from ./epan/dissectors/packet-acdr.h:13:
    f:/Programfiler/Gtk-Plus/Gtk3-3.6.4/include/glib-2.0\glib/gtypes.h(28,2): error: "Only <glib.h> can be included directly."

glib.h is already included elsewhere, so it can be safely dropped.

Change-Id: I943ffb58099253048dba3d46b520b2338c99443a
Reviewed-on: https://code.wireshark.org/review/36121
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-16 18:26:13 +00:00
Tomasz Moń d400dbe476 Qt: Remove unnecessary processEvents() call
MainWindow::captureFileReadStarted() is called inside event handlers.
There isn't any actual processing after the captureFileReadStarted() is
called so in most cases the code will quickly return to the event loop.
In case of cf_read() callbacks, there is dedicated "slow processing"
detection implemented that eventually leads to processEvent() call in
update_progress_dlg().

Change-Id: Icfefa0ba7bf1bec43014e30756d0eec4078d389c
Reviewed-on: https://code.wireshark.org/review/36113
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-02-16 13:51:34 +00:00
Martin Mathieson 7e02165453 More issues spotted by PVS-Studio in bug 16335.
Only the change to packet-imap.c really represents a bug.

Change-Id: Ie270f97f3d94c338ea3c84a712f8f4d43ffd36f4
Reviewed-on: https://code.wireshark.org/review/36115
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-16 11:51:55 +00:00
Gerald Combs fbd88490dd [Automatic update for 2020-02-16]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Iafb3ddef40951bd50f2695ae87e6e9f7b9a0965e
Reviewed-on: https://code.wireshark.org/review/36116
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-02-16 08:19:46 +00:00
Jeremiejig 18a7e64c85 get_dns_name: fixup some missing change introduced with c397adda8a
Following commit c397adda8a there was some missing change

* Some `cur_offset += name_len` instead of `cur_offset += used_bytes`
* Some missing format_text

I took a look at the code after observing a bug with RRSIG record.
The signature in RRSIG was dissecting with some strange offset.

You can easily generate some pcap with those commands

delv @1.1.1.1 A www.cloudflare.com
and/or
dig @1.1.1.1 +dnssec www.cloudflare.com

Change-Id: Ibd6a6248b7497b8409d7797dc320035c8c2d1ed8
Reviewed-on: https://code.wireshark.org/review/36080
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-15 21:19:09 +00:00
Tomasz Moń c129c28d3a Qt: Allow creating new files in extcap fileselect
If mustexist property is absent or set to false, allow the user to
specify the filename.

Add Clear button next to file selection. Previously cancelling file
selection when mustexist was false would clear the entry. However,
if mustexist was true, there was no easy way to clear the entry.

Change-Id: I367756fb868b4040a7203f1eb8c92b6bfaf29901
Reviewed-on: https://code.wireshark.org/review/35643
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2020-02-15 15:43:32 +00:00
Gerald Combs d7bbe384f5 Test+Qt: Add an automatic update check.
Add software_update_info() to the software update module, which returns
the name of our update library if we have one. Use it to add automatic
update information to the compiled information in `wireshark --version`.

Add a "release" test suite, which contains a test for automatic updates.

Ping-Bug: 16381
Change-Id: I867a96bdcfde8be541eca2dc0e84b5000276e7dd
Reviewed-on: https://code.wireshark.org/review/36107
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-15 11:13:25 +00:00
Gerald Combs 7247b98d45 wsutil: Strip the processor brand string.
The processor brand string returned by CPUID is left-padded in some
cases. For example, adding

g_warning("==>%s<==\n", CPUBrandString);

to get_cpu_info() on a test machine here returns

** (tshark.exe:3808): WARNING **: ==>       Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz<==

Make sure it's stripped before we add it to our version information.

Change-Id: Idf9f9574477043a5e7fe4ff1ecb7890d6da90e0a
Reviewed-on: https://code.wireshark.org/review/36108
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-15 11:11:50 +00:00
Peter Wu 273ec3ffef QUIC: explicitly report verified Retry Integrity Tag values
When verification fails, it is reported, but when verification
succeeded, it was not entirely sure whether this happened. Change it:

    ...
    Retry Token: a1146aad02d817fec13d6cb95e48b0e3a4d8bd7eb1029588ac9dc55434381cea9c5cec6b…
    Retry Integrity Tag: 0b299146c79957dff224ecec33d8b2fc [verified]

Change-Id: I7b99e74d091c28677be91cc6544a0e2cdc1d9ae1
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/36111
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-15 11:10:58 +00:00
Jason Cohen 9a5bb0705c packet-lldp: Report only the consumed octets
Allow unconsumed octets to be passed back to the caller so that possible
trailer dissctors can be ran.

Bug: 16387
Change-Id: I289b4b077d40581d5d0f884e30c2f882d58fccf1
Reviewed-on: https://code.wireshark.org/review/36097
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jason Cohen <kryojenik2@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-15 11:10:23 +00:00
Jason Cohen a64d926ebf packet-lacp: Report only the consumed octets
Allow unconsumed octets to be passed back to the caller so that possible
trailer dissctors can be ran.

Bug: 16388
Change-Id: I022fb2e714a687390259037ac2885751d24619f7
Reviewed-on: https://code.wireshark.org/review/36096
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jason Cohen <kryojenik2@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-15 11:10:05 +00:00
Richard Sharpe 5d1f89f10c iee80211: Conform to the spec and handle Anti-Clogging Token container.
My previous patch was broken and did not handle the new Anti-Clogging Token
container. It was broken because I did not realise that Table 9-42 specified
the order of elements in the SAE Fixed Field. Table 9-43 specifies when
elements will be in which type of SAE request. However, 9-42 specifies the
order.

This has been tested with captures from WFA and Jouni Malinen.

Change-Id: Icbaa53560036c421299c74867ec04d9a28ea8aa0
Reviewed-on: https://code.wireshark.org/review/36098
Petri-Dish: Richard Sharpe <realrichardsharpe@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-15 11:09:28 +00:00
Tomasz Moń 2c1d660940 Qt: Access I/O Graph settings via UAT interface
All I/O Graph instances share the same configuration. The code was
accessing the UAT underlying number of items variable (num_io_graphs_)
directly but the actual rows were accessed indirectly via UAT interface.
This could lead to UAT missynchronization and in turn an out of range
index access in IOGraphDialog::createIOGraph().

Fix the issue by not using the num_io_graphs_ directly.

Bug: 16373
Change-Id: Ifbc0fddb619d23f31f32aa46c4ae613954a8b780
Reviewed-on: https://code.wireshark.org/review/36106
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-15 11:08:44 +00:00