metze/wireshark/wip.git
5 years agoDocs: AUTHORS formatting updates.
Gerald Combs [Fri, 17 Aug 2018 17:33:45 +0000 (10:33 -0700)]
Docs: AUTHORS formatting updates.

Switch the AUTHORS heading markup from underscores to equals. This makes
it easier to transform to Pod headings.

Update the AUTHORS-SHORT-FORMAT output so that the author lists are
verbatim paragraphs. Add a style for the author lists instead of
wrapping everything in a <pre>.

The AUTHORS files are UTF-8 and wireshark.pod sets "=encoding utf8".
There's no need to translate characters.

Change-Id: I43cf18ff86774421b08edb84d968a9410be177fe
Reviewed-on: https://code.wireshark.org/review/29181
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>
5 years agoAT: Add CGSN/GSN Commands
Darien Spencer [Sat, 18 Aug 2018 10:37:21 +0000 (13:37 +0300)]
AT: Add CGSN/GSN Commands

Change-Id: Ie383c0de07e4114f00e6c8833b6c18fcbaa4a07f
Reviewed-on: https://code.wireshark.org/review/29185
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agopfcp: fix no previous prototype for ‘pfcp_is_cause_accepted’ [-Wmissing-prototypes]
Alexis La Goutte [Sat, 18 Aug 2018 16:20:02 +0000 (16:20 +0000)]
pfcp: fix no previous prototype for ‘pfcp_is_cause_accepted’ [-Wmissing-prototypes]

Change-Id: I0d5da3e747e45b815c8a99ea5d41c19d4fa32624
Reviewed-on: https://code.wireshark.org/review/29188
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoDocs: Make our Pod documentation encoding uniform.
Gerald Combs [Fri, 17 Aug 2018 18:34:57 +0000 (11:34 -0700)]
Docs: Make our Pod documentation encoding uniform.

We've set "=encoding utf8" in wireshark.pod for a long time. Do so in
the rest of our .pod files.

Change-Id: I3ef0fb3a88ed63275b4ff4362b6afbf13d79a0bc
Reviewed-on: https://code.wireshark.org/review/29182
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agopfcp: added session tracking
Joakim Karlsson [Mon, 13 Aug 2018 22:43:30 +0000 (00:43 +0200)]
pfcp: added session tracking

PFCP session tracking follows the Session Endpoint Identifier, SEID.
Function is Disable by default.

Change-Id: I14ebe0745d8159ec90f31a985bcf46e6453c1361
Reviewed-on: https://code.wireshark.org/review/29168
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoIf we run out of lines, stop dissecting.
Guy Harris [Sat, 18 Aug 2018 07:33:14 +0000 (00:33 -0700)]
If we run out of lines, stop dissecting.

Change-Id: I19cbbd0af9debff33f1382f77272aeecd54a9cd2
Reviewed-on: https://code.wireshark.org/review/29184
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agotshark: free exp_pdu_filename and capture_opts->save_file
Vasil Velichkov [Thu, 9 Aug 2018 00:38:36 +0000 (03:38 +0300)]
tshark: free exp_pdu_filename and capture_opts->save_file

valgrind --tool=memcheck --leak-check=full ./run/tshark -r sctp.pcap -U "OSI layer 3" -w exported.pcap

13 bytes in 1 blocks are definitely lost in loss record 20 of 93
   at 0x4C2EBAB: malloc (vg_replace_malloc.c:299)
   by 0xB27B3C5: g_malloc (gmem.c:99)
   by 0xB294D22: g_strdup (gstrfuncs.c:363)
   by 0x117B5D: capture_opts_add_opt (capture_opts.c:889)
   by 0x118C0E: main (tshark.c:1112)

Change-Id: I9b794015aa4d2626b43a5743864c2d732c6acaa1
Reviewed-on: https://code.wireshark.org/review/29125
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoGTPv2: Document parsing of 8.107 Node Identifier
Anders [Fri, 17 Aug 2018 10:47:31 +0000 (12:47 +0200)]
GTPv2: Document parsing of 8.107 Node Identifier

Change-Id: I81b11d1d1b667f94e0a73765c339e653910a751e
Reviewed-on: https://code.wireshark.org/review/29173
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoSyslog: skip timestamp field if not present
Pascal Quantin [Fri, 17 Aug 2018 11:02:53 +0000 (13:02 +0200)]
Syslog: skip timestamp field if not present

Bug: 15063
Change-Id: I08ca03be495ee172e0995fc949e0ba06c49b0dae
Reviewed-on: https://code.wireshark.org/review/29177
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
5 years agotds: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Fri, 17 Aug 2018 11:17:27 +0000 (11:17 +0000)]
tds: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I8d21c81c86dc63cbc9035fb26372b373191baeb8
Reviewed-on: https://code.wireshark.org/review/29179
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoieee80211: fix spelling-error-in-binary found by lintian
Alexis La Goutte [Fri, 17 Aug 2018 10:57:43 +0000 (10:57 +0000)]
ieee80211: fix spelling-error-in-binary found by lintian

Paramater -> Parameter

Change-Id: I88c6a273c03dbde4c0b7964762aeef82f8fef2d6
Reviewed-on: https://code.wireshark.org/review/29174
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agodocsis-macmgmt: fix spelling-error-in-binary found by lintian
Alexis La Goutte [Fri, 17 Aug 2018 11:01:13 +0000 (11:01 +0000)]
docsis-macmgmt: fix spelling-error-in-binary found by lintian

Comparision -> Comparison

Change-Id: Ica9e68b987e857f51751fa212ca7b81f32b46605
Reviewed-on: https://code.wireshark.org/review/29175
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agogtp: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Fri, 17 Aug 2018 11:42:11 +0000 (11:42 +0000)]
gtp: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: Ic94da3e34b52663c315ed22dc9e3b4be1066b1a3
Reviewed-on: https://code.wireshark.org/review/29180
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoAT: Reorder commands dissection functions
Darien Spencer [Fri, 17 Aug 2018 07:41:59 +0000 (10:41 +0300)]
AT: Reorder commands dissection functions

Now in alphabetical order

Change-Id: I9c572e04e422cc595c66681ff77cd37a944383b9
Reviewed-on: https://code.wireshark.org/review/29171
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agolpp: fix error found by conflit check
Alexis La Goutte [Fri, 17 Aug 2018 11:08:46 +0000 (11:08 +0000)]
lpp: fix error found by conflit check

Field 'smoothingInterval-r15' (lpp.smoothingInterval_r15) has a conflicting entry in its value_string: 3 is at indices 3 (1-2 min) and 4 (2-4 min)
Field 'smoothingInterval-r15' (lpp.smoothingInterval_r15) has a conflicting entry in its value_string: 3 is at indices 3 (1-2 min) and 5 (4-8 min)
Field 'smoothingInterval-r15' (lpp.smoothingInterval_r15) has a conflicting entry in its value_string: 3 is at indices 4 (2-4 min) and 5 (4-8 min)
Field 'smoothingInterval-r15' (lpp.smoothingInterval_r15) has a conflicting entry in its value_string: 3 is at indices 3 (1-2 min) and 6 (> 8 min)
Field 'smoothingInterval-r15' (lpp.smoothingInterval_r15) has a conflicting entry in its value_string: 3 is at indices 4 (2-4 min) and 6 (> 8 min)

Change-Id: Ib4ec9c7efd894d40487ee123fb0c07b5be88bf1f
Reviewed-on: https://code.wireshark.org/review/29176
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
5 years agoTLS13: add final tests for RFC 8446
Peter Wu [Thu, 16 Aug 2018 22:36:55 +0000 (00:36 +0200)]
TLS13: add final tests for RFC 8446

Add TLS 1.3 tests that verify decryption of handshake, application and
early data. Add another test that shows that early data is properly
skipped. This completes TLS 1.3 (RFC 8446) decryption support.

The trace was created using boringssl c4131a4a23a1.

Bug: 12779
Change-Id: Iddd266ecd3f428c95aa3f69616ce55e75d4ccca0
Reviewed-on: https://code.wireshark.org/review/29170
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoTLS13: properly skip over failed decryption of early data
Peter Wu [Thu, 16 Aug 2018 22:36:07 +0000 (00:36 +0200)]
TLS13: properly skip over failed decryption of early data

When early data is present but undecryptable (due to lack of keys), it
should not result in incrementing the sequence number or the following
application data from the client will fail to decrypt.

Change-Id: I8016a30508d96c14cbd6a3b9c4af1591a6c437c3
Ping-Bug: 12779
Reviewed-on: https://code.wireshark.org/review/29169
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoNIST-CSOR: ASN.1 dissector for NIST Computer Security Objects Register defined OIDs...
Martin Peylo [Thu, 16 Aug 2018 17:58:15 +0000 (20:58 +0300)]
NIST-CSOR: ASN.1 dissector for NIST Computer Security Objects Register defined OIDs and their parameeters

Could also be integrated elsewhere, e.g. AES OIDs used by CMS for encryption,
but usage will exist accross many different crypto protocols.

CSOR available at
https://csrc.nist.gov/projects/computer-security-objects-register/algorithm-registration

Change-Id: Ia9e38f683567e2a8f0ecf85a87f3bb9eb0b278b6
Reviewed-on: https://code.wireshark.org/review/29166
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoDo not pass pipe handle to WaitForMultipleObjects
Tomasz Moń [Thu, 16 Aug 2018 19:06:41 +0000 (21:06 +0200)]
Do not pass pipe handle to WaitForMultipleObjects

The Remarks section in WaitForMultipleObjects describes what kind of
handles the function can wait for. Pipe handles are not listed there.

The problem was introduced in c18459e66e8e71a8765bb9b8e2b3d2ba61855a3f

While it might be possible to setup overlapped reads on the pipe handles
and then wait on overlapped events, it would result in quite complex
code. As a tradeoff, simply keep peeking at the pipes every 100 ms.

Change-Id: I6ba4f4bf4c1d2af856027cca36ffd6d4f7f49f36
Bug: 14657
Reviewed-on: https://code.wireshark.org/review/29163
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
5 years agoNBAP: Support IB_SG_DATA Encoding Variant 2
Darien Spencer [Wed, 8 Aug 2018 15:14:23 +0000 (18:14 +0300)]
NBAP: Support IB_SG_DATA Encoding Variant 2

The code was decoding IB_SG_DATA according to Encoding Variant 1.
Added parsing of the second variant and a preference to let the user choose
between the two.

Bug: 15054
Change-Id: I45efcb84c48d599b46037488792dbc5dad97ebd1
Reviewed-on: https://code.wireshark.org/review/29018
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoAT: Reorder commands dictionary
Darien Spencer [Thu, 16 Aug 2018 08:28:59 +0000 (11:28 +0300)]
AT: Reorder commands dictionary

Now in alphabetical order

Change-Id: I28d863fc176518a2c26c417257f657f9d888ceb7
Reviewed-on: https://code.wireshark.org/review/29156
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoTDS: Handle TDS 5.0 MSG token.
Craig Jackson [Thu, 16 Aug 2018 04:35:39 +0000 (00:35 -0400)]
TDS: Handle TDS 5.0 MSG token.

Add support for the TDS_MSG token, used in TDS 5.0.
This requires support for TDS_PARAMS and TDS_PARAMFMT
tokens in the response stream as well as the request
stream. Add support for the TDS 5.0 LONGBINARY type.

Change-Id: I49b70f8b03881767283fcc41610517a08ee7c4e7
Reviewed-on: https://code.wireshark.org/review/29160
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoFix extcap initialization deadlock
Tomasz Moń [Thu, 16 Aug 2018 16:04:07 +0000 (18:04 +0200)]
Fix extcap initialization deadlock

On Windows the code calling extcap worked as follows:
1. Create stdout and stderr pipes with default buffer size
2. Execute extcap redirecting output to the pipes
3. Wait for extcap process to exit
4. Read the data from stdout pipe

This resulted in deadlock when the extcap wrote more data than the pipe
could buffer. This was especially seen with USBPcap as it is quite
normal to have plenty of USB devices connected.

Fix the issue by contantly reading the stdout data and storing it in
GString. To prevent similar deadlock on the stderr, the stderr data is
being constantly monitored as well (and discarded).

Change-Id: I0f93e6d79617cef0e828aef2b96fad2757227923
Bug: 14657
Reviewed-on: https://code.wireshark.org/review/29159
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
5 years agontp: fix mixed indentation.
Dario Lombardo [Thu, 9 Aug 2018 12:54:45 +0000 (14:54 +0200)]
ntp: fix mixed indentation.

Change-Id: I2575fbe94aeae5a726e7a3f76406d5c90356c8b9
Reviewed-on: https://code.wireshark.org/review/29042
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
5 years agoCMS: adding algor OIDs and respective parameters
Martin Peylo [Thu, 16 Aug 2018 06:56:11 +0000 (09:56 +0300)]
CMS: adding algor OIDs and respective parameters

According to RFC 3278 / RFC 5753 and RFC 3370 / RFC 5911

Renaming where RFCs differ (e.g. id-alg-des-ede3-cbc to des-ede3-cbc)

Change-Id: Ib221136c6a64cc6dd5dac8b4b5e7baa5aae47a9c
Reviewed-on: https://code.wireshark.org/review/29157
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoAT: Add CFUN command
Darien Spencer [Wed, 15 Aug 2018 13:55:29 +0000 (16:55 +0300)]
AT: Add CFUN command

Change-Id: Ia2b69fa6c72a12ace5b27dc868c7853c2f8d7c52
Reviewed-on: https://code.wireshark.org/review/29151
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agopacket-mq: Fix LPOO Strucxt + Add MQV91 Def
Robert Grange [Wed, 15 Aug 2018 15:08:34 +0000 (17:08 +0200)]
packet-mq: Fix LPOO Strucxt + Add MQV91 Def

Add MQ V9.1 Def
Fix LPOO Struct Display

Change-Id: I14ff534b7117e65dcc4b096aa478c0c16a863f67
Reviewed-on: https://code.wireshark.org/review/29153
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agogtp: Create a dissector table for GTP header extensions.
AndersBroman [Wed, 15 Aug 2018 08:00:19 +0000 (10:00 +0200)]
gtp: Create a dissector table for GTP header extensions.

Change-Id: Ied39f7c1f37fba7aeaf5fdebfbb7e03d8456588c
Reviewed-on: https://code.wireshark.org/review/29150
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoWindows: upgrade USBPcap to 1.2.0.4
Pascal Quantin [Wed, 15 Aug 2018 20:31:15 +0000 (22:31 +0200)]
Windows: upgrade USBPcap to 1.2.0.4

Change-Id: I1ab4bbc410f2f896aea323c3d4884207150f9beb
Ping-Bug: 14657
Bug: 14982
Reviewed-on: https://code.wireshark.org/review/29154
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
5 years agoReplaced "wireshark-win32-libs/" and "wireshark-win64-libs/" by "wireshark-win??...
Ralf Nasilowski [Wed, 15 Aug 2018 05:43:13 +0000 (07:43 +0200)]
Replaced "wireshark-win32-libs/" and "wireshark-win64-libs/" by "wireshark-win??-libs*/" in ".gitignore"

Change-Id: I154163847f54f2bce35ac5fa681d323290d6d7bf
Reviewed-on: https://code.wireshark.org/review/29147
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
5 years agoSGSAP: Fix Service-Abort-Request msg
Swapnil Roy [Wed, 15 Aug 2018 14:35:15 +0000 (20:05 +0530)]
SGSAP: Fix Service-Abort-Request msg

Change-Id: I39868a37e537687824c0a8e3ef4f517f11069192
Reviewed-on: https://code.wireshark.org/review/29152
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoMove common code into a routine.
Guy Harris [Wed, 15 Aug 2018 07:51:43 +0000 (00:51 -0700)]
Move common code into a routine.

Change-Id: Ia3b7e35e469a3231bb749025debe11d3ba2de99a
Reviewed-on: https://code.wireshark.org/review/29148
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agobluetooth: Update Assigned Numbers
Stig Bjørlykke [Tue, 14 Aug 2018 17:55:27 +0000 (19:55 +0200)]
bluetooth: Update Assigned Numbers

Change-Id: Ib97a2b762873ed8cdb1960d103e9513cca53492b
Reviewed-on: https://code.wireshark.org/review/29145
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoH.265: Fix incompatible use of proto_tree_add_bits_ret_val with field 'h265.reserved_...
Asaf Kave [Tue, 14 Aug 2018 14:00:25 +0000 (17:00 +0300)]
H.265: Fix incompatible use of proto_tree_add_bits_ret_val with field 'h265.reserved_zero_2bits'

Change-Id: Ic4c9c8fd7676e9eada3ace59f5eb81b6fa339adc
Reviewed-on: https://code.wireshark.org/review/29141
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
5 years agoNAS 5GS: IE value fixes
Swapnil Roy [Tue, 14 Aug 2018 13:51:16 +0000 (19:21 +0530)]
NAS 5GS: IE value fixes

Change-Id: I3b936c054d6294553888a589d67323d99dc28c25
Reviewed-on: https://code.wireshark.org/review/29140
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoICMPv6: Add support for RPL DIO MC NSA optional TLVs
Remous-Aris Koutsiamanis [Tue, 17 Jul 2018 12:11:39 +0000 (14:11 +0200)]
ICMPv6: Add support for RPL DIO MC NSA optional TLVs

Change-Id: I5cff197ad15ce5848cfa764c8b3dd23bea56f048
Reviewed-on: https://code.wireshark.org/review/28740
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agobtatt: Fix Temperature Measurement Value unit
Stig Bjørlykke [Tue, 14 Aug 2018 12:59:26 +0000 (14:59 +0200)]
btatt: Fix Temperature Measurement Value unit

Display correct temperature unit for the Temperature Measurement Value.

Bug: 15058
Change-Id: I310c2fabfb1a824cb84f6f4182e881d7a22495cb
Reviewed-on: https://code.wireshark.org/review/29139
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoFixing, adding PKIX AuthorityInfoAccess OID names
Martin Peylo [Tue, 14 Aug 2018 12:14:22 +0000 (15:14 +0300)]
Fixing, adding PKIX AuthorityInfoAccess OID names

RFCs 2459 / 5280 define the name for Authority Information Access as
id-pe-authorityInfoAccess, and the sequence as AuthorityInfoAccessSyntax. This
was mixed up - fixed.

Adding related "Access Description" OID names id-ad-caIssuers and id-ad-ocsp
from RFCs 2459 / 5280.

Example certificate containing this extension and access descriptions e.g. used
by https://www.google.com

Change-Id: Ic6881531a2f6d8e318e8d3a47bcb1f7ea38e5236
Reviewed-on: https://code.wireshark.org/review/29138
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agogtp: Bugfix teid as HEX.
AndersBroman [Tue, 14 Aug 2018 14:14:58 +0000 (16:14 +0200)]
gtp: Bugfix teid as HEX.

Change-Id: I32573d75b1d657c736c91c1ea3da7310ea3c2a62
Reviewed-on: https://code.wireshark.org/review/29142
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoGTP: comment unused UAT field
Pascal Quantin [Tue, 14 Aug 2018 12:27:11 +0000 (14:27 +0200)]
GTP: comment unused UAT field

Change-Id: I52386210088719420279ed2f39fbd832bca0cf15
Reviewed-on: https://code.wireshark.org/review/29137
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
5 years agoBT A2DP: fully initialize sep_entry_t structure
Pascal Quantin [Tue, 14 Aug 2018 09:03:09 +0000 (11:03 +0200)]
BT A2DP: fully initialize sep_entry_t structure

Bug: 14884
Change-Id: Id409563d5e8869596db7b479132045bf8cf88f16
Reviewed-on: https://code.wireshark.org/review/29128
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoexport_pdu.c: Fix a memory leak
Vasil Velichkov [Mon, 13 Aug 2018 18:48:06 +0000 (21:48 +0300)]
export_pdu.c: Fix a memory leak

Allocate the exp_pdu_data using the wmem_packet_scope allocator so the
epan_dissect_run_with_taps will free it after calling all registered tap
listeners.

valgrind --tool=memcheck --leak-check=full ./run/tshark -r sctp.pcap -U "OSI layer 3" -w exported.pcap

32 bytes in 1 blocks are definitely lost in loss record 48 of 76
   at 0x4C2EBAB: malloc (vg_replace_malloc.c:299)
   by 0xB3FC3C5: g_malloc (gmem.c:99)
   by 0x68C2BE1: export_pdu_create_tags (exported_pdu.c:251)
   by 0x68C2D5E: export_pdu_create_common_tags (exported_pdu.c:231)
   by 0x70AA54E: create_exp_pdu_proto_name (packet-sctp.c:3240)
   by 0x70AA54E: export_sctp_data_chunk.part.23 (packet-sctp.c:3268)
   by 0x70AB76B: export_sctp_data_chunk (packet-sctp.c:3256)
   by 0x70AB76B: dissect_data_chunk (packet-sctp.c:3509)

Change-Id: I6e247ab2861bbb053f0958faf253913b28dbcbeb
Reviewed-on: https://code.wireshark.org/review/29126
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoWIP GTP: Make it possible to configure PDCP parameters to dissect
AndersBroman [Thu, 9 Aug 2018 13:08:43 +0000 (15:08 +0200)]
WIP GTP: Make it possible to configure PDCP parameters to dissect
NR_RAN_CONT

Change-Id: I7b3234e5a90ca61ede9f95e1078c92ec3b28634d
Reviewed-on: https://code.wireshark.org/review/29043
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agodxl: get msgpack handle in the proper place.
Dario Lombardo [Mon, 13 Aug 2018 20:08:30 +0000 (22:08 +0200)]
dxl: get msgpack handle in the proper place.

Change-Id: Ia777e89a9633310ad64c582acddf5fe39fb7fba6
Reviewed-on: https://code.wireshark.org/review/29127
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
5 years agogtpv2: Dissect CSG Information Reporting Action.
AndersBroman [Mon, 13 Aug 2018 14:46:44 +0000 (16:46 +0200)]
gtpv2: Dissect CSG Information Reporting Action.

Change-Id: I70eea2fea47d45c94bc2f0fed4b463206c969456
Reviewed-on: https://code.wireshark.org/review/29124
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoradiotap: Implement L-SIG support based on the RFC.
Richard Sharpe [Wed, 1 Aug 2018 14:55:22 +0000 (07:55 -0700)]
radiotap: Implement L-SIG support based on the RFC.

The RFC was posted in the Radiotap mailing list.

Change-Id: I8ddb1cd474d05c94d1b5a51eb5e16d548a313a86
Reviewed-on: https://code.wireshark.org/review/28923
Petri-Dish: Richard Sharpe <realrichardsharpe@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
5 years agossl: Remove SSL_VER_UNKNOWN from ssl_version_short_names
Stig Bjørlykke [Mon, 13 Aug 2018 08:21:14 +0000 (10:21 +0200)]
ssl: Remove SSL_VER_UNKNOWN from ssl_version_short_names

This will let val_to_str_const() choose the given 'unknown_str'
instead of always showing 'SSL' when the version is unknown.

This is relevant for DTLS when only having a 'Client Hello' packet.

Change-Id: I3931460e70278241aee0b7782025bc7bfd9bf93d
Reviewed-on: https://code.wireshark.org/review/29118
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
5 years agoieee80211: add the start of the TWT parsing
Emmanuel Grumbach [Mon, 23 Jul 2018 12:50:14 +0000 (15:50 +0300)]
ieee80211: add the start of the TWT parsing

Target Wake Time has been added 11ah but is enhanced in 11ax.
Start to implement the parsing of TWT elements based on
ieee80211ax/D3.0

Since TWT is defined in 11ah, it uses the S1G (sub 1 Giga Hertz)
Action Frame Category. Add the boiler plate code to parse those.

An S1G Action frame can have different actions, add them all,
but only parse TWT teardown for now, the other TWT actions will
come later.

Ping-Bug: 15009
Change-Id: Id645a666d06658dbdc6cb460c79b38a65ad2ae81
Reviewed-on: https://code.wireshark.org/review/28829
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoHTTP: create dissector table for HTTP Upgrade
Peter Wu [Sun, 12 Aug 2018 16:51:10 +0000 (18:51 +0200)]
HTTP: create dissector table for HTTP Upgrade

Based on an idea from David M. Lloyd, let subdissectors register
themselves with the HTTP dissector based on the Upgrade header instead
of the other way round.

Tested with SSTP (bug 82390), WebSocket (bug 13889), HTTP2 PRI without
Upgrade (bug 11331), h2c (from HTTP2 wiki), spdy/3.1 (bug 12874).

Change-Id: I1425b7119d4d85e626032408504fc2c6b2f2eeb8
Reviewed-on: https://code.wireshark.org/review/29112
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoHTTP: start dissecting upgraded connections right after upgrade
Peter Wu [Sun, 12 Aug 2018 15:38:54 +0000 (17:38 +0200)]
HTTP: start dissecting upgraded connections right after upgrade

After a HTTP upgrade, some data may already follow the headers. Be sure
to dissect this. Tested with a SSTP capture (bug 8239), HTTP proxy
capture (bug 15043), no regressions were found. WebSocket traffic from
the attached bug is now properly dissected.

Bug: 13889
Change-Id: Icc32871b4ebb2520769cb17505517d9d11543684
Reviewed-on: https://code.wireshark.org/review/29111
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoHTTP: really choose the correct server port for tunnels
Peter Wu [Sun, 12 Aug 2018 15:23:28 +0000 (17:23 +0200)]
HTTP: really choose the correct server port for tunnels

The very first message after a 200 OK response to a CONNECT request
likely originates from the client. So assume that this destination is
actually the server.

This reduces the probability of address and port collisions. Previously
the proxy port (e.g. 3128) and server port (443) identified each
conversation, now it will use the client and server port instead.

Bug: 15043
Change-Id: Ib73f370334873efd773ac6b49e2db57146bc20b0
Fixes: v2.9.0rc0-1420-g2f126db3fe ("HTTP: set correct server port for tunnels")
Reviewed-on: https://code.wireshark.org/review/29110
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoHTTP: ignore large Content-Length values
Peter Wu [Sun, 12 Aug 2018 11:17:29 +0000 (13:17 +0200)]
HTTP: ignore large Content-Length values

The SSTP capture from bug 8239 failed to be recognized as SSTP.  Its
large Content-Length was parsed as -1 which triggered reassembly due to
tvb_bytes_exist returning FALSE for negative lengths.

Test:

    # Expect 'SSTP_DUPLEX_POST /' in the output of:
    tshark -r sstp.pcapng -ossl.keys_list:localhost,443,http,sstp.pem, -Y frame.number==174 -Px

Change-Id: I40afaff8554f34f24e09bab184121ced59045954
Fixes: v2.9.0rc0-531-gd80acae40d ("tvbuff: make tvb_bytes_exist fail with negative values")
Reviewed-on: https://code.wireshark.org/review/29109
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoPut the interface descrptions into the IDB when capturing to pcapng.
Guy Harris [Mon, 13 Aug 2018 03:32:01 +0000 (20:32 -0700)]
Put the interface descrptions into the IDB when capturing to pcapng.

capture_opts_add_iface_opt(), when called in a program acting as a
capture child, will fetch the description for the interface, and will
also generate a "display name" for the interface.

In the process, we clean up capture_opts_add_iface_opt() a bit,
combining duplicate code.

We rename console_display_name to just display_name, as it may also be
used in the title bar of Wireshark when capturing.

Change-Id: Ifd18955bb3cb41df4c0ed4362d4854068c825b96
Reviewed-on: https://code.wireshark.org/review/29117
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoMove get_iface_display_name() to ui/iface_lists.c.
Guy Harris [Mon, 13 Aug 2018 02:02:22 +0000 (19:02 -0700)]
Move get_iface_display_name() to ui/iface_lists.c.

It's only used there, so move it there.

Change-Id: I68472150e020ba94166782e3e4c08cba94c0f9ee
Reviewed-on: https://code.wireshark.org/review/29114
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoInclude dumpcap amongst the programs built with -Werror.
Guy Harris [Sun, 12 Aug 2018 18:04:36 +0000 (11:04 -0700)]
Include dumpcap amongst the programs built with -Werror.

Change-Id: Ia946b4e99d9ddbbced8cc9515a098ca2ce4931ef
Reviewed-on: https://code.wireshark.org/review/29113
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoNSH TTL according to RFC8300
Michael Honsel [Fri, 10 Aug 2018 21:42:31 +0000 (23:42 +0200)]
NSH TTL according to RFC8300

Bug: 15053
Change-Id: Id68cfb2dd4d89855bc79b1dc59e271d96cada680
Reviewed-on: https://code.wireshark.org/review/29068
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years ago[Automatic update for 2018-08-12]
Gerald Combs [Sun, 12 Aug 2018 08:15:36 +0000 (08:15 +0000)]
[Automatic update for 2018-08-12]

Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I76f688cbe75475ef5282fa09a5b5d58609b12eb3
Reviewed-on: https://code.wireshark.org/review/29105
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoLLDP: Add dissection of 802.3BT TLV Extension
Alexis La Goutte [Fri, 10 Aug 2018 17:43:28 +0000 (19:43 +0200)]
LLDP: Add dissection of 802.3BT TLV Extension

Bug: 15035
Change-Id: I6e513b825819843fe8e7bd95bceea2ee4fa5e727
Reviewed-on: https://code.wireshark.org/review/29059
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agollpd: fix indent
Alexis La Goutte [Fri, 10 Aug 2018 06:44:43 +0000 (08:44 +0200)]
llpd: fix indent

remove a space before comma

Change-Id: Ib8ca547d054aa1672557044efc35e865923ffce5
Reviewed-on: https://code.wireshark.org/review/29053
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agolldp: add expert info when there is extra data for 802.3 TLV
Alexis La Goutte [Fri, 10 Aug 2018 06:43:21 +0000 (08:43 +0200)]
lldp: add expert info when there is extra data for 802.3 TLV

Ping-Bug: 15035
Change-Id: I0611dff8cb0da2769ab3ac7e0012f6dd439dc4d8
Reviewed-on: https://code.wireshark.org/review/29052
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoMore comment cleanup.
Guy Harris [Sun, 12 Aug 2018 04:12:45 +0000 (21:12 -0700)]
More comment cleanup.

Change-Id: I0fac7351d204eac1ca5f00fb2f19d275d4d5767c
Reviewed-on: https://code.wireshark.org/review/29101
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoImprove comments.
Guy Harris [Sun, 12 Aug 2018 03:48:01 +0000 (20:48 -0700)]
Improve comments.

Change-Id: Icce916d6d465f80e06ed45e4d5bd98362d63a26a
Reviewed-on: https://code.wireshark.org/review/29097
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoClean up temporary filename generation.
Guy Harris [Sun, 12 Aug 2018 03:43:00 +0000 (20:43 -0700)]
Clean up temporary filename generation.

Don't put identical code in both arms of a conditional - move it out of
the conditional.

Doing that with one line of code means that the conditional is now
*itself* duplicated in both arms of a conditional, so move it out, too.

Change-Id: I07c1d00e7d0053684aa2ef74b460eb008b145015
Reviewed-on: https://code.wireshark.org/review/29093
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoMore interface view cleanups.
Guy Harris [Sun, 12 Aug 2018 01:55:01 +0000 (18:55 -0700)]
More interface view cleanups.

Rename some of the columns - IFTREE_COL_NAME is the interface name,
IFTREE_COL_DESCRIPTION is the description/friendly name, and a new
IFTREE_COL_DISPLAY_NAME column is the display name (which may include
both the description and the interface name).  Rename
IFTREE_COL_INTERFACE_COMMENT to just IFTREE_COL_COMMENT - there's no
*other* type of comment, and "IF" is short for "interface".

In the interface frame, use IFTREE_COL_DISPLAY_NAME, as that's the only
column that shows both and thus has something for all interfaces.

In the "Manage interfaces" dialog, put the description before the
interface name, as it was in earlier versions.

Change-Id: If0d959dcd4ca99913c941df00621da3c478233f6
Reviewed-on: https://code.wireshark.org/review/29090
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoShow just the description in the description column.
Guy Harris [Sun, 12 Aug 2018 00:45:19 +0000 (17:45 -0700)]
Show just the description in the description column.

Don't show the display name, as that may include either the interface
name, which is already in another column, or the column comment, which
is also already in another column.

Change-Id: I12f81d9e4579b82267062bb5e4e745925ed382b7
Reviewed-on: https://code.wireshark.org/review/29087
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoFix the "Manage interfaces" dialog columns.
Guy Harris [Sat, 11 Aug 2018 22:26:41 +0000 (15:26 -0700)]
Fix the "Manage interfaces" dialog columns.

Windows is not the only OS with "friendly" names for interfaces; macOS
has them as well, and some *BSDs let you tag interfaces with names as
well.

The column headings for the "Interface Name" and the "Friendly Name"
were backwards.

Change-Id: I72543505cec9d479d8ab8aab3850daab3667805f
Reviewed-on: https://code.wireshark.org/review/29082
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoMore comments.
Guy Harris [Sat, 11 Aug 2018 20:40:00 +0000 (13:40 -0700)]
More comments.

Change-Id: I1fc6df514983bb73b7e620d05223728496de7919
Reviewed-on: https://code.wireshark.org/review/29078
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoMake a routine static that's not used outside its source file.
Guy Harris [Sat, 11 Aug 2018 19:01:21 +0000 (12:01 -0700)]
Make a routine static that's not used outside its source file.

Change-Id: I5121828c1fb95cbf89e7304dd748f8fcac63ad5a
Reviewed-on: https://code.wireshark.org/review/29073
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoAT: Add CPMS command
Darien Spencer [Tue, 7 Aug 2018 12:56:30 +0000 (15:56 +0300)]
AT: Add CPMS command

Change-Id: Idb4dd32849d1d1c64eab1c5f58e5b268aff43b04
Reviewed-on: https://code.wireshark.org/review/29006
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoTLS13: update references to RFC 8446, remove old extension
Peter Wu [Sat, 11 Aug 2018 10:27:25 +0000 (12:27 +0200)]
TLS13: update references to RFC 8446, remove old extension

TLS 1.3 was finalized as RFC 8446 with registry updates in RFC 8447.
Update references to match the final version.

Bug: 12779
Change-Id: I5390e515179404d4287666330d26252b1f5f1b95
Reviewed-on: https://code.wireshark.org/review/29071
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoAT: Add ^CIMI command
Darien Spencer [Sat, 11 Aug 2018 14:34:19 +0000 (17:34 +0300)]
AT: Add ^CIMI command

AT^CIMI is an alternative form for AT+CIMI for some modems

Change-Id: Id64fb4e0d76396400aa69fceeadba3a87ddf68e1
Reviewed-on: https://code.wireshark.org/review/29072
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agopacket-mq: Fix some struct display add new def
Robert Grange [Thu, 9 Aug 2018 17:21:55 +0000 (19:21 +0200)]
packet-mq: Fix some struct display add new def

Fix display for FCNO Struct
Fix display for ID Struct
Add new DEF
Removed unused variable

Change-Id: Id460ec3d9941d06cae4c400b89b8f979fd7d663f
Reviewed-on: https://code.wireshark.org/review/29050
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoGive a structure a better name.
Guy Harris [Sat, 11 Aug 2018 10:03:18 +0000 (03:03 -0700)]
Give a structure a better name.

It's not a set of command-line options, it's information that's used
when showing summary information about the interface.

Change-Id: Ie1c3d998a3cc7cd8b54945186098ebae726cef11
Reviewed-on: https://code.wireshark.org/review/29070
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoPKIX: support TLS Feature extension (RFC 7633)
Peter Wu [Fri, 10 Aug 2018 22:35:53 +0000 (00:35 +0200)]
PKIX: support TLS Feature extension (RFC 7633)

This extension is used for the OCSP Must-Staple property. For the lack
of a better place, it is currently added to the PKIX1Explicit module.

Bug: 15052
Change-Id: I0bb04f3e446ca4d458683625485ed58c6e64c195
Reviewed-on: https://code.wireshark.org/review/29062
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoGet rid of unused routine.
Guy Harris [Sat, 11 Aug 2018 07:51:31 +0000 (00:51 -0700)]
Get rid of unused routine.

Change-Id: I3f5ff89695cedc57daa8c17018fbe5681053f675
Reviewed-on: https://code.wireshark.org/review/29069
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoAdd support for reading and writing the new if_hardware IDB option.
Guy Harris [Sat, 11 Aug 2018 02:08:40 +0000 (19:08 -0700)]
Add support for reading and writing the new if_hardware IDB option.

Support for writing it in live captures will come later; this change,
but not that one, will be backported so older versions of Wireshark
won't remove it when writing a file out.

Change-Id: I9fd4067991acfd2d18c03d0a373ce8337a9f3a76
Reviewed-on: https://code.wireshark.org/review/29064
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoPDCP LTE: Update rohc_profile_vals
AndersBroman [Fri, 10 Aug 2018 13:46:51 +0000 (15:46 +0200)]
PDCP LTE: Update rohc_profile_vals

Change-Id: I0dba4d226af42e04723c37c79b2734f1e437ffcd
Reviewed-on: https://code.wireshark.org/review/29058
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agodissector/gluster: Add dissector for Gluster 4.0 protocol
Poornima G [Fri, 13 Jul 2018 11:53:19 +0000 (17:23 +0530)]
dissector/gluster: Add dissector for Gluster 4.0 protocol

Change-Id: I9731cb4a08c94650f961dff747a18ff6daff7088
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: https://code.wireshark.org/review/28871
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agontp: use 'seconds' instead of 'sec' for uniformity.
Dario Lombardo [Thu, 9 Aug 2018 09:25:39 +0000 (11:25 +0200)]
ntp: use 'seconds' instead of 'sec' for uniformity.

Change-Id: I40f34a2d1025fe2baf7c492428e7c8ab934fa63f
Ping-Bug: 15049
Reviewed-on: https://code.wireshark.org/review/29037
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoHTTP: set correct server port for tunnels
Peter Wu [Thu, 9 Aug 2018 14:51:55 +0000 (16:51 +0200)]
HTTP: set correct server port for tunnels

The server port must be set or else http_payload_subdissector will
assume two independent flows originating from the client. For example,
client 50813 connects through proxy server 3128 to server 443.
Previously it would result in three conversations: 50813<->3128 (proxy),
50813->443, 3128->443. Now it will see 50813<->3128 and 3128<->443 and
TLS decryption will work again.

Bug: 15042
Change-Id: I50bcef568be320b6512ee6fc5a09d2838d2f7a9a
Reviewed-on: https://code.wireshark.org/review/29046
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agopfcp: code clean up
Joakim Karlsson [Thu, 9 Aug 2018 19:28:16 +0000 (21:28 +0200)]
pfcp: code clean up

Change-Id: Icb114e566a2d94d545049cf67b0be6899c0da0f7
Reviewed-on: https://code.wireshark.org/review/29051
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoWireGuard: fix null-deref in wg_dissect_handshake_initiation
Peter Wu [Thu, 9 Aug 2018 16:14:57 +0000 (18:14 +0200)]
WireGuard: fix null-deref in wg_dissect_handshake_initiation

session can be NULL if no valid session was found in the first pass.
Reproduced crash with attachment 16534 from bug 15050.

Change-Id: I45b9fcc4bfeb79b00075f70417acb17c2e4aede2
Fixes: v2.9.0rc0-1389-g5b61737dc9 ("WireGuard: implement initiation message decryption with static keys")
Reviewed-on: https://code.wireshark.org/review/29047
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
5 years agoGTPv2: add dissection of newer geographic location types
Pascal Quantin [Thu, 9 Aug 2018 14:43:48 +0000 (16:43 +0200)]
GTPv2: add dissection of newer geographic location types

Bug: 15050
Change-Id: I3ecf9715fa5950262b68caff61e55abf943cebca
Reviewed-on: https://code.wireshark.org/review/29045
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
5 years agoMAC-NR: Fix length tracking of SRS ACT/DEACT CE
Martin Mathieson [Mon, 6 Aug 2018 15:40:07 +0000 (16:40 +0100)]
MAC-NR: Fix length tracking of SRS ACT/DEACT CE

Change-Id: I21384e5223ed11f6139a370fafd9026a0c444dd1
Reviewed-on: https://code.wireshark.org/review/28996
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
5 years agoproto.c: allow more field types for proto_tree_add_item_ret_uint64()
Pascal Quantin [Thu, 9 Aug 2018 14:42:00 +0000 (16:42 +0200)]
proto.c: allow more field types for proto_tree_add_item_ret_uint64()

Let's make the function accept FT_UINT40, FT_UINT48 and FT_UINT56 types.

Ping-Bug: 15050
Change-Id: I35440a7c0b9cbf25bd8d903c425b6026d6a987f0
Reviewed-on: https://code.wireshark.org/review/29044
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agowin-setup.ps1: verify integrity of downloaded files
Peter Wu [Sat, 4 Aug 2018 09:05:27 +0000 (11:05 +0200)]
win-setup.ps1: verify integrity of downloaded files

If for whatever reason a download got corrupted, detect this and
reattempt the download. This protects the developer against server
compromises. Additionally, if an uploaded file was wrong and needs to be
replaced, then this check ensures that the updated file is used.

The -Force option is removed as there is no point in downloading the
same file twice (well, except maybe for verifying that all checksums are
correct, but that can be done with a new destination directory as well).

Change-Id: I770cc8917c49f7fab7209121b2a059dea8f21a58
Reviewed-on: https://code.wireshark.org/review/28954
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoROHC: Move defines to .h file.
AndersBroman [Thu, 9 Aug 2018 10:29:14 +0000 (12:29 +0200)]
ROHC: Move defines to .h file.

Change-Id: I4b0e8dbf94756d969b9c55f17895fa8ec2162364
Reviewed-on: https://code.wireshark.org/review/29040
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoNAS 5GS: add dissection of IPv4v6 PDU address
Pascal Quantin [Thu, 9 Aug 2018 08:47:15 +0000 (10:47 +0200)]
NAS 5GS: add dissection of IPv4v6 PDU address

Change-Id: If0d9f09a447b3b10a94f4552251ecb4072b2e227
Reviewed-on: https://code.wireshark.org/review/29036
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
5 years ago"It's not a valid text line" means "it's not an RFC 7468 file", not "it's bad".
Guy Harris [Thu, 9 Aug 2018 10:04:19 +0000 (03:04 -0700)]
"It's not a valid text line" means "it's not an RFC 7468 file", not "it's bad".

Don't return an error unless we get a read error.  If the line could be
read, but isn't a valid text line, that just means it's not an RFC 7468
text file.

Change-Id: I04f48294cac213cf61b8dcb851b99dc6dd776df8
Reviewed-on: https://code.wireshark.org/review/29039
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoGTPv2: update geographic_location_type_vals array
Pascal Quantin [Thu, 9 Aug 2018 09:36:13 +0000 (11:36 +0200)]
GTPv2: update geographic_location_type_vals array

Bug: 15050
Change-Id: I6c8cd5bd0ca701cbf36a370666b248b824968e4a
Reviewed-on: https://code.wireshark.org/review/29038
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
5 years agoNAS 5GS: Various IE fixes
Swapnil Roy [Wed, 8 Aug 2018 17:39:48 +0000 (23:09 +0530)]
NAS 5GS: Various IE fixes

Change-Id: I24ce485bfbd3351c61160926532ddeaf30425474
Reviewed-on: https://code.wireshark.org/review/29021
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agogsup: Don't print IEI + Length twice for unknown IEs
Harald Welte [Tue, 7 Aug 2018 14:47:00 +0000 (16:47 +0200)]
gsup: Don't print IEI + Length twice for unknown IEs

The handling for unknown IEs was flawed in that it printed
the IEI and the IE Length lines twice: Once the general code before
the switch statement, and then a second time inside the default
case handling.

Change-Id: Ic845bfb79e9ff881b39f709e3bff407e352c49fd
Reviewed-on: https://code.wireshark.org/review/29005
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agogsup: Fix dissecting wildcard APN names
Harald Welte [Tue, 7 Aug 2018 15:00:08 +0000 (17:00 +0200)]
gsup: Fix dissecting wildcard APN names

In general, GPRS APN names are encoded like DNS strings.  However,
there is one exception: The wildcard APN '*'.  If we feed this
into the DNS decoder, it will throw an exception.

Let's explicitly check for '*' as a special case.

Change-Id: I2b346f8b067fa176b80613fdbcdada8c8a8eaa52
Related: https://osmocom.org/issues/3450
Reviewed-on: https://code.wireshark.org/review/29004
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoNSIS: fix uninstaller for Qt 5.10
Peter Wu [Mon, 6 Aug 2018 14:25:05 +0000 (16:25 +0200)]
NSIS: fix uninstaller for Qt 5.10

Since Qt 5.10, platform styles are no longer part of QtWidgets. Be sure
to delete the separate plugin (styles\qwindowsvistastyle.dll). See
https://bugreports.qt.io/browse/QTBUG-65177

Change-Id: I20376f787339c9a2072ef8127b3ea5cc55be8b06
Reviewed-on: https://code.wireshark.org/review/29003
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agosharkd: Add support for hidden and generated fields
Michał Łabędzki [Sun, 22 Jul 2018 12:54:36 +0000 (14:54 +0200)]
sharkd: Add support for hidden and generated fields

New json option for frame request to output hidden fields:
"hidden": true

Output has two new optional keys: "g" for generated fields and
"v" for hidden fields.

Change-Id: If51fa5601c1193a03fff378bbe37dc9ab8f5e66d
Reviewed-on: https://code.wireshark.org/review/28955
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoTDS: Add support for non-nullable datetime and money types.
Craig Jackson [Tue, 31 Jul 2018 01:46:20 +0000 (21:46 -0400)]
TDS: Add support for non-nullable datetime and money types.

This was accomplished by factoring out the existing code supporting nullable
datetime and money types. The non-nullable versions are older and more often used
with TDS 4 and TDS 5.

Change-Id: I1bbf942d2b5ff3ec6bb9f1a607f0c579949f6131
Reviewed-on: https://code.wireshark.org/review/29008
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoprefs: fix range preferences-related crash after switching profiles
Peter Wu [Wed, 8 Aug 2018 18:00:48 +0000 (20:00 +0200)]
prefs: fix range preferences-related crash after switching profiles

The HTTP dissector could crash (use-after-free) after switching
profiles. In reinit_http, it would assign the return value from
prefs_get_range_value to a global variable which is consulted during
dissection. This value is invalidated while switching profiles (via the
"prefs_reset" function), but is not reinitialized (because the
reinit_http function was not called).

A similar issue exists in the Kafka, UAUDP, VNC, TFTP, Gopher and TDS
dissectors. To reproduce using a capture from the SampleCaptures wiki,
start "wireshark -r vnc-sample.pcap -ovnc.tcp.port:1" and switch
profiles. For the HTTP crash, load any HTTP pcap and switch profiles.

Change-Id: I8725615504a8a82ae46255625a41e2188c07320a
Fixes: v2.3.0rc0-2097-g21a3b8cc71 ("Internalize struct preference")
Reviewed-on: https://code.wireshark.org/review/29030
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoPass zero-length PSDU type information to the radio dissector.
Guy Harris [Thu, 9 Aug 2018 02:25:30 +0000 (19:25 -0700)]
Pass zero-length PSDU type information to the radio dissector.

We call that dissector even for zero-length PSDUs, so the radio
information is shown.  We also show the zero-length PSDU type.

We don't call the 802.11 dissector for zero-length PSDU frames.

That way, you don't have to open up the radiotap information to find out
about zero-length PSDU frames, we can support zero-length PSDU
information for other pseudo-headers and file types if they support it,
and taps using the radio information can get zero-length PSDU frame
information.

Change-Id: I7d5da4ea978d8ca4889fc76160f11e3416b4d036
Reviewed-on: https://code.wireshark.org/review/29034
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoAlways process the "present flags" bitmaps.
Guy Harris [Thu, 9 Aug 2018 01:16:46 +0000 (18:16 -0700)]
Always process the "present flags" bitmaps.

The loop doesn't just add them to the protocol tree, it also does sanity
checking; we want to do the sanity checking regardless of whether we're
building the protocol tree or not, so that if we skip processing the
radiotap header because it's malformed, we do so regardless of whether
we're building a protocol tree.

This prevents a crash I saw where, on the first pass, we weren't
building a protocol tree, so we didn't check the bitmaps and proceeded
to process the bad radiotap header in a fuzzed file and set the
"zero-length PSDU" flag, and didn't call the 802.11 radio dissector, and
didn't allocate a "wlan radio information" structure and attach it to
the packet, but, when I went to the packet, and thus *did* build a
protocol tree, we *did* check the bitmaps in the process of adding them
to the protocol tree, skipped the part where we processed the rest of
the radiotap header, *didn't* set the "zero-length PSDU" flag, and
*did* call the 802.11 radio dissector, which crashed becaus the "wlan
radio information" pointer was null.

(No, checking the "wlan radio information" pointer isn't the correct
fix; the correct fix is to make sure we do the same processing, other
than adding items to the protocol tree, *regardless* of whether we're
building the protocol tree.)

Change-Id: If3c16f76981448e4f396a4a9730f1d5dce8f8eba
Reviewed-on: https://code.wireshark.org/review/29033
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoWe should be reporting expert infos on invalid radiotap headers.
Guy Harris [Wed, 8 Aug 2018 21:24:01 +0000 (14:24 -0700)]
We should be reporting expert infos on invalid radiotap headers.

Note the places where we should be doing so.

Also, note that two of the tests in ieee80211_radiotap_iterator_init()
are redundant in Wireshark, and that it's irrelevant what versions of
radiotap Linux supports - this is Wireshark code, not Linux code.  (If
there's anything to note, it's that there *is* no radiotap version other
than 0, so there's nothing *to* support.)

Change-Id: Ieabef703638b30649a097269d684f60e79db8ba5
Reviewed-on: https://code.wireshark.org/review/29031
Reviewed-by: Guy Harris <guy@alum.mit.edu>