Commit Graph

72422 Commits

Author SHA1 Message Date
Guy Harris 149e74b70d 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>
2018-08-13 04:37:00 +00:00
Guy Harris d48262753e 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>
2018-08-13 02:02:59 +00:00
Guy Harris 6409732b77 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>
2018-08-12 19:58:49 +00:00
Michael Honsel bdfce392af 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>
2018-08-12 15:42:31 +00:00
Gerald Combs 5535b4f307 [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>
2018-08-12 08:15:41 +00:00
Alexis La Goutte fd419dd68f 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>
2018-08-12 07:58:20 +00:00
Alexis La Goutte a8001fbd6a 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>
2018-08-12 07:56:59 +00:00
Alexis La Goutte a932fc3eca 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>
2018-08-12 07:56:50 +00:00
Guy Harris fc9d5b7060 More comment cleanup.
Change-Id: I0fac7351d204eac1ca5f00fb2f19d275d4d5767c
Reviewed-on: https://code.wireshark.org/review/29101
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-12 04:13:22 +00:00
Guy Harris d22816d2ba Improve comments.
Change-Id: Icce916d6d465f80e06ed45e4d5bd98362d63a26a
Reviewed-on: https://code.wireshark.org/review/29097
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-12 03:49:01 +00:00
Guy Harris f033cd542e 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>
2018-08-12 03:43:41 +00:00
Guy Harris 991f5a6e85 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>
2018-08-12 01:56:23 +00:00
Guy Harris 713651d9c3 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>
2018-08-12 00:46:02 +00:00
Guy Harris beacbab55a 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>
2018-08-11 22:27:22 +00:00
Guy Harris 530061b66e More comments.
Change-Id: I1fc6df514983bb73b7e620d05223728496de7919
Reviewed-on: https://code.wireshark.org/review/29078
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-11 20:40:33 +00:00
Guy Harris 1b3aaeae72 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>
2018-08-11 19:02:23 +00:00
Darien Spencer 47860f05b4 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>
2018-08-11 15:30:19 +00:00
Peter Wu 0d1d656929 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>
2018-08-11 15:29:03 +00:00
Darien Spencer ab47e8a52f 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>
2018-08-11 15:26:48 +00:00
Robert Grange 59bf4d5b55 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>
2018-08-11 12:01:30 +00:00
Guy Harris 863ba5cd98 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>
2018-08-11 10:04:31 +00:00
Peter Wu e13989fd0a 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>
2018-08-11 09:10:35 +00:00
Guy Harris 254364f7e4 Get rid of unused routine.
Change-Id: I3f5ff89695cedc57daa8c17018fbe5681053f675
Reviewed-on: https://code.wireshark.org/review/29069
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-11 07:52:06 +00:00
Guy Harris 08cbe559b3 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>
2018-08-11 02:09:15 +00:00
AndersBroman f4ac263564 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>
2018-08-10 14:43:44 +00:00
Poornima G 61aaeef2b0 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>
2018-08-10 05:09:36 +00:00
Dario Lombardo 5ac6b3d412 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>
2018-08-10 05:08:52 +00:00
Peter Wu 2f126db3fe 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>
2018-08-10 05:08:08 +00:00
Joakim Karlsson 38c0bedb07 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>
2018-08-10 03:56:35 +00:00
Peter Wu 3d9534d0ee 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>
2018-08-09 18:56:53 +00:00
Pascal Quantin bc6e462c23 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>
2018-08-09 18:55:06 +00:00
Martin Mathieson 0720dedeff 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>
2018-08-09 16:07:49 +00:00
Pascal Quantin 28b7adfadc 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>
2018-08-09 15:18:06 +00:00
Peter Wu c4d76452d3 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>
2018-08-09 14:05:49 +00:00
AndersBroman 52e7344c69 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>
2018-08-09 11:07:22 +00:00
Pascal Quantin a2518e6098 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>
2018-08-09 10:07:21 +00:00
Guy Harris f543d4a2fd "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>
2018-08-09 10:04:56 +00:00
Pascal Quantin 1ac6908cea 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>
2018-08-09 09:50:27 +00:00
Swapnil Roy 73f3f89522 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>
2018-08-09 07:43:31 +00:00
Harald Welte b2d7da58a4 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>
2018-08-09 07:01:23 +00:00
Harald Welte 297a6fe2f7 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>
2018-08-09 07:01:15 +00:00
Peter Wu 299306ab19 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>
2018-08-09 05:00:25 +00:00
Michał Łabędzki a7b56fff7e 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>
2018-08-09 04:59:22 +00:00
Craig Jackson 2fa2947be0 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>
2018-08-09 04:55:24 +00:00
Peter Wu 0be9d149d0 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>
2018-08-09 04:52:53 +00:00
Guy Harris 5e2e9de930 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>
2018-08-09 02:26:17 +00:00
Guy Harris 63126e284b 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>
2018-08-09 01:17:28 +00:00
Guy Harris c7764e235c 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>
2018-08-08 21:24:35 +00:00
Pascal Quantin 739eebd3d2 802.11 Radiotap: add more bound checks in ieee80211_radiotap_iterator_next()
Bug: 15022
Change-Id: Ife413312c88b8d78926c78bdb6707903257e7964
Reviewed-on: https://code.wireshark.org/review/29017
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
2018-08-08 20:22:14 +00:00
Guy Harris f4bc40bc3b The radiotap header length must be >= 8.
Report an error and quit dissecting if it's less than 8.

Change-Id: I297fcb0ca754641a9e197037df1140361000fd25
Reviewed-on: https://code.wireshark.org/review/29022
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-08 20:07:52 +00:00