Commit Graph

26334 Commits

Author SHA1 Message Date
Evan Huus fde0dbe660 fix warning: 'cipher_hd' may be used uninitialized in this function
I don't think it's an actual issue, but the new compiler on the mac buildbots
isn't smart enough to tell that.

Change-Id: I759e1afe9c4011d5612be0d15282076be6f5a331
Reviewed-on: https://code.wireshark.org/review/3355
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-02 14:50:19 +00:00
Guy Harris 2a3dba5ea8 Add a cast to squelch a warning.
Change-Id: Id8eba103b9edd54bdfdea9144c807c3fbe0cb4e4
Reviewed-on: https://code.wireshark.org/review/3353
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-02 11:27:37 +00:00
Guy Harris 0734ac385f Rename buffer_ routines to ws_buffer_ to avoid name collisions.
In particular, epan/wslua/lrexlib.c has its own buffer_ routines,
causing some linker warnings on some platforms, as reported in bug
10332.

(Not to be backported to 1.12, as that would change the API and ABI of
libwsutil and libwiretap.  We should also make the buffer_ routines in
epan/wslua/lrexlib.c static, which should also address this problem, but
the name change avoids other potential namespace collisions.)

Change-Id: I1d42c7d1778c7e4c019deb2608d476c52001ce28
Reviewed-on: https://code.wireshark.org/review/3351
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-02 11:01:29 +00:00
Evan Huus 41e322594b Revert "Make Lua taps work in out-of-source-tree builds."
Breaks on windows...

This reverts commit 6b11cd97f2.

Change-Id: I1caf5500da993d7988e09fc0758950469f8252cf
Reviewed-on: https://code.wireshark.org/review/3346
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-02 02:14:17 +00:00
Evan Huus fade4b4d97 Fix another (valid) complaint from the mac buildbot
What mystical new compiler upgrade is this?

Change-Id: I89b3bfb53b9a19bbfb1cc8339d38cdc4a4652c62
Reviewed-on: https://code.wireshark.org/review/3347
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-02 02:14:12 +00:00
Jeff Morriss 6b11cd97f2 Make Lua taps work in out-of-source-tree builds.
make-taps.pl needs to know where to find the source files otherwise none of
the tap data gets built correctly.

This makes the wslua test suite run in out-of-source-tree builds too.

Change-Id: I059474d90d59e87bd57dba18530a66a927a014cf
Reviewed-on: https://code.wireshark.org/review/3337
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-02 01:00:05 +00:00
Matthieu Texier 45f3deed0b Fixing indentation with tabs in isis dissector
Change-Id: I4f6296f1cb988dca8c94ca5089ff6aa03439da32
Reviewed-on: https://code.wireshark.org/review/3333
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-01 22:55:59 +00:00
Sean O. Stalley 2fbd9e128b Fix variable-length managment packet dissection
Before, several managment packets were dissected incorrectly as
EPHandleDeleteReq's. Now they are dissected with the generic managment
packet dissector.

Change-Id: Id2f0951b91b99ba2340ff77c6285f382436788ef
Reviewed-on: https://code.wireshark.org/review/3328
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-01 19:37:07 +00:00
Alexis La Goutte fbc1a9af14 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I847c7217b520a5f7ec581e6170fe3dc77c628e96
Reviewed-on: https://code.wireshark.org/review/3322
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-01 18:02:20 +00:00
Peter Wu 84e2abc927 tcp: detect invalid window scale shift value
According to RFC 1323, the window scale shift value must not exceed 14.
Detect this and cap at 14 to prevent undefined behavior (shifting by a
too large value).

Caught by `clang -fsanitize=undefined`.

Change-Id: I1acad252b86c7f23e497575b48d9496346327e00
Reviewed-on: https://code.wireshark.org/review/3312
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-01 14:28:44 +00:00
Evan Huus a644744fb9 Use packet_scope instead of a stack local
As clang pointed out we end up storing a reference to it in a global and (more
relevantly) pushing that global to a tap which would run after the current frame
has returned.

Thanks to Alexis for bringing this to my attention.

Change-Id: I3aac43a806d217b0dc8a973f6bb2fa48cdd041bb
Reviewed-on: https://code.wireshark.org/review/3289
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-01 09:32:30 +00:00
Martin Kaiser d05e6797d4 sync and behaviour are defined only for isochronous endpoints
Change-Id: Ic7755a7756589167b4fea5cf42a21419f59ecdae
Reviewed-on: https://code.wireshark.org/review/3301
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-31 21:00:02 +00:00
Martin Kaiser f3982ee183 defines for endpoint transfer types
Change-Id: Iffd5d81dde15eba12511dc89664d7ea06a70436f
Reviewed-on: https://code.wireshark.org/review/3300
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-31 20:59:46 +00:00
Martin Kaiser 9a032279ef this is the _URB_ transfer type - which is different from the
transfer type in the endpoint descriptor

Change-Id: I9e23d9825efb30311cd3e04d01548c03b163c276
Reviewed-on: https://code.wireshark.org/review/3299
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-31 20:59:31 +00:00
Jeff Morriss a91dbf7aa7 proto_add_subtree_format(): initialize tree_item to 'tree' rather than NULL.
... As would be the case if proto_tree_add_text() + proto_item_add_subtree()
were used.  (This initialization value is only used when TRY_TO_FAKE_THIS_ITEM()
shortcuts us out.)

As reported/discussed on -dev:

https://www.wireshark.org/lists/wireshark-dev/201407/msg00031.html

Change-Id: I4af63e3cf0a70607d58b4641597b2ce7907fbb8b
Reviewed-on: https://code.wireshark.org/review/3271
Reviewed-by: Michael Mann <mmann78@netscape.net>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-31 14:39:46 +00:00
Peter Wu a69a63f5d1 ssl: fix SSL keylog file live-capture use case
Patch "ssl,dtls: simplify keyfile handling" did not account for the use
case where packets are captured and decrypted on the fly using
SSLKEYLOGFILE.

This patch restores that functionality by reading additional lines from
the keylog file when needed (to preserve the benefit of not having to
read the full file) and by watching the open file for deletions.

"Deletion" is detected by comparing st_dev and st_ino. Since these may
be useless on Windows, the size is also checked.

Change-Id: Ieadaef1426a9270587293db28f4dda33b3d17334
Reviewed-on: https://code.wireshark.org/review/3190
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-31 11:09:07 +00:00
Peter Wu 7939d32ce2 ssl,dtls: simplify keyfile handling
Previously, the keylog file would be fully parsed when an encrypted
pre-master secret is encountered or in the ChangeCipherSpec stage. There
was also a lot of duplication in the key logfile parsing.

This patch simplifies the key logfile parsing by using regular
expressions. Rather than scanning the key logfile for a specific key,
do this scan once at ssl init and save the results to a hashtable. The
map for session ID/tickets to master keys already existed, another one
for client random to master key and encrypted pre-master to pre-master
was added. This could later also be wired to the "Export SSL Keys"
menu item for improved reliability (when no session ID or tickets are
available, the client random could be used).

The ssl_{save,restore}_session{,_ticket} functions have been converted
to a single function that looks up a key (sid / client random / encr.
pre-master) to a (pre-)master secret.

Other minor changes: return booleans for some functions that can only
fail/pass. Remove some functions from the ssl-utils header that have
become private a few commits ago. Remove some outstanding issues
from the comments in packet-ssl as they are already done, add myself
to the ssl-utils header.

These changes pass the test suite and the sample Session Ticket-enabled
capture from https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5963

On-the-fly decryption are broken with this patch since keylog files are
read once at the start of a capture. This will be solved in a future
patch.

Change-Id: Idb343abe161950b5f3ff61bee093d0f4ef9655bd
Reviewed-on: https://code.wireshark.org/review/3057
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-31 11:08:18 +00:00
Michael Mann a1032fa62e Convert hf_packetbb_error filter (packetbb.error) to expert info.
Also make dissector "new style" using it's already built in basic heuristics.

Change-Id: I8b9b02d1f32cec96a1104c99647795d6fbda4804
Reviewed-on: https://code.wireshark.org/review/3275
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-31 11:06:01 +00:00
Guy Harris 3ac49be96c Add more files to the release tarball.
Change-Id: I02ce275154979ff56f8f8929e5909f3035f62c47
Reviewed-on: https://code.wireshark.org/review/3286
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 08:55:52 +00:00
Guy Harris 7f3d97c669 Include the gnm dissector.
Change-Id: Icc6090cdc8a6321677aaa82df7dd2bb408166c91
Reviewed-on: https://code.wireshark.org/review/3285
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 08:27:16 +00:00
Guy Harris 7e2dc50891 Nobody uses packet-t125.h, so don't bother building it, and delete it.
Change-Id: I10f8889a64024114106cd8058525cb21c6078279
Reviewed-on: https://code.wireshark.org/review/3284
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 07:53:08 +00:00
Peter Wu 9ed85d1de9 Fix use of uninitialized field
ssl_print_string uses out->data_len to determine the length of the
printed data, but this was not set. Use ssl_data_set for that and add an
additional DISSECTOR_ASSERT just in case we change something here.

Reported by Alexis La Goutte, found by Clang static analyzer.

Change-Id: I630a9193ff1ece86a0a46924dd86591fedf5c595
Reviewed-on: https://code.wireshark.org/review/3261
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-30 16:25:33 +00:00
Michael Mann dcf6d44b7f Apply refactored "conversation" (tap) data to TShark.
I intentionally left the fields displayed alone (so they don't exactly match Wireshark GUI), because as Guy points out in bug 6310, not sure its A Bug or A Feature.  But at least all types of conversations allowed are in sync with Wireshark GUI.

Bug:6310
Change-Id: I722837df510a39dadc1f9a07a99275509516698c
Reviewed-on: https://code.wireshark.org/review/3212
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-30 16:12:54 +00:00
Pascal Quantin 82bb8008ce GED125: remove a wrong comment regarding the default TCP port
Change-Id: I53aa2053c65280385e13da875979ed09b37fb725
Reviewed-on: https://code.wireshark.org/review/3258
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-30 09:10:19 +00:00
Jeff Morriss 054bff4f27 Fix up some white space.
Change-Id: Ie8f1006d6b3a27fe0c8187ce99051c09dea09b66
(cherry picked from commit a3a5c33dad8669e37502f2ce4d0687f7ff7e87a1)
Reviewed-on: https://code.wireshark.org/review/3257
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-07-30 02:56:41 +00:00
Martin Kaiser 9d0e4f6fdb don't add nonprinting \000 characters to tftp option strings
Change-Id: I81e43fac5176fdd0805001636991efb7f588a3c0
Reviewed-on: https://code.wireshark.org/review/3252
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-29 21:49:10 +00:00
Martin Kaiser 5dd7cfeed2 remove unnecessary return; statement
Change-Id: Icefbaf632e888e84bcb2cc20ae3a6c4744b82fae
Reviewed-on: https://code.wireshark.org/review/3251
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-29 21:48:36 +00:00
Martin Kaiser 54d503078a (trivial) modify, indent a comment
Change-Id: I64bb64787c83ffe712ffd348cceb5449690dd6d0
Reviewed-on: https://code.wireshark.org/review/3247
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-29 16:02:41 +00:00
Evan Huus d786ed8e5d Remove unused variable
Change-Id: I590d4c2d79ee44309cd512057c7eae6df15913e9
Reviewed-on: https://code.wireshark.org/review/3240
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-29 01:56:02 +00:00
Lukas Emersberger eece1c521d EPL: Fix for Write Multiple by index
Write multiple by index now correctly resolves OD names.

Change-Id: I4d2aad584a47e3682716b95bdda0bc49c3a29d96
Signed-off-by: Lukas Emersberger <lukas.emersberger@gmail.com>
Reviewed-on: https://code.wireshark.org/review/3223
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Lukas Emersberger <lukas.emersberger@br-automation.co.at>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-29 01:49:12 +00:00
Matthieu Texier 4a1bd421c4 Bug 10302 - BGP attribute AIGP (draft-ietf-idr-aigp) not decoded - Fix
Change-Id: Ib8b3c5666932777218e33b74cca33b791c883fc9
Reviewed-on: https://code.wireshark.org/review/3226
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-29 01:45:56 +00:00
Evan Huus 0aa4cb2d0e Fix possible uninitialized session key in netlogin auth
Bug:10312
Change-Id: Ia2be812e81b54d6df5a928312cca86ecd95aa6b2
Reviewed-on: https://code.wireshark.org/review/3236
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-29 01:43:12 +00:00
Michal Labedzki 75c7b154a2 Bluetooth: Fix OBEX over L2CAP detection
There are two cases:
1. btl2cap -> btrfcomm -> btobex
2. btl2cap -> btobex

Case 2 is rare, so according to its name and to avoid confusion
I based on it.

Bug:10316
Change-Id: Ibeabeaf2f8376425460c56bad8fb980b460dd940
Reviewed-on: https://code.wireshark.org/review/3225
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-29 01:26:25 +00:00
AndersBroman 0f85608d3a Use wmem for application Ids
Remove soft deprecated APIs

Change-Id: Iecd2f552c1abb7bb2c6969073b3c245af22f4fcd
Reviewed-on: https://code.wireshark.org/review/3230
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-28 18:27:45 +00:00
AndersBroman ff01321da2 Sort diameter.applicationId fix a typo.
Change-Id: Id585371df929cdff17f98dddbebf063fa000ff56
Reviewed-on: https://code.wireshark.org/review/3229
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-28 17:36:37 +00:00
Kevin Cox 34e413f66d Make value_string_ext const-correct.
There is still some const-incorrect usage of them but those can be ironed
out after this change has been made.

Change-Id: Iba0631c804bdab34d7c0232b49967130e3370488
Reviewed-on: https://code.wireshark.org/review/3199
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-27 22:02:42 +00:00
Joerg Mayer 4658109690 Fix incorrect whitespace. Why this wasn't spotted during review?
Change-Id: I54be42e020e2febf2e15d5eb0e772153eae1ba32
Reviewed-on: https://code.wireshark.org/review/3213
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-07-27 19:09:58 +00:00
Graham Bloice ec08f3458e Added function dnp3_header_check() to check the validity of a DNP3
packet as far as possible, called from both dissect_dnp3_tcp and dissect_dnp3_udp.

Bug: 10287
Change-Id: Iaa988258b3614cb1b408dec41a987fbd61c9727c
Reviewed-on: https://code.wireshark.org/review/3096
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-07-27 17:41:30 +00:00
Gerald Combs 8762c78395 [Automatic manuf, services and enterprise-numbers update for 2014-07-27]
Change-Id: I07f7d2340c70fb3dbacf6d2792f5fab194212e22
Reviewed-on: https://code.wireshark.org/review/3208
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-27 15:05:25 +00:00
Evan Huus d95d7752fa Fix yet another openflow underflow issue.
I thought I'd found all of these but I guess I hadn't; good thing the fuzz-bot
kept looking.

Bug:10314
Change-Id: I2cc209a6c87781d10cae28f2cb91400d759f5091
Reviewed-on: https://code.wireshark.org/review/3205
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-27 01:40:37 +00:00
Michael Mann 31ecdf5b06 Refactor "common" Conversation table functionality.
Refactor (non-GUI) conversation table functionality from gtk/Qt to epan.  Also refactor "common GUI" conversation table functionality.

The idea is to not have to modify the GUI when a dissector adds a new "conversation type"

Change-Id: I11f08d0d7edd631218663ba4b902c4a4c849acda
Reviewed-on: https://code.wireshark.org/review/3113
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-26 20:59:42 +00:00
Michael Mann 507d07eda6 Allow severity levels of expert info items to be configured by the user.
UAT was the easiest way to do this and I like the "file format" of the data, but the presentation doesn't seem that great.

Bug:10180
Change-Id: I7e6bc9e148bc47585a0a7eb8f96900a5c374e673
Reviewed-on: https://code.wireshark.org/review/3082
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-26 01:03:07 +00:00
John Miner c3e42cc6b4 OptoMMP Dissector
Change-Id: I754335b9944a9de169e37c16a3e37a86d35543a6
Reviewed-on: https://code.wireshark.org/review/3110
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-25 19:54:21 +00:00
Jakub Zawadzki 788ff153ba Empty proto_reg_handoff_* are not needed, remove some.
Change-Id: I957b01aa00bbff3c48192388c7ad9e601d79c778
Reviewed-on: https://code.wireshark.org/review/3196
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-25 11:51:07 +00:00
moraney.jalil 0501465a3a Fixing a bug in add_ff_action_public_fields(), by removing the start argument and defining it inside the function.
Change-Id: I6205384b3bcf38128912baf413b4455357d25347
Reviewed-on: https://code.wireshark.org/review/3184
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-25 02:59:43 +00:00
Martin Kaiser cca0fd35fe add the flags to all FullBoxes
Change-Id: I6e0109bc1d1acf200fd0c1a9f8ddd3a3d98f5908
Reviewed-on: https://code.wireshark.org/review/3189
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-24 20:01:47 +00:00
Martin Kaiser 0b15ec8cdc start dissecting the MP4 stsd box
Change-Id: I589a6ced098d1d224e86386f028c92fc0797164e
Reviewed-on: https://code.wireshark.org/review/3188
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-24 20:01:20 +00:00
Martin Kaiser fb9851ea57 dissect the MP4 url box
Change-Id: Ibeaf5ba5d104e7f9bc9291e83923f8675abf0099
Reviewed-on: https://code.wireshark.org/review/3187
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-24 20:00:41 +00:00
Martin Kaiser 7d219fdd7d dissect the MP4 dref box
Change-Id: I342f283bbab3052337e00502769150cf3f4a8800
Reviewed-on: https://code.wireshark.org/review/3186
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-24 20:00:11 +00:00
Martin Kaiser 476f49cd0f dissect the MP4 hdlr box
Change-Id: I467bfae2db7d3a119b58505b43b3d9bb59615ee9
Reviewed-on: https://code.wireshark.org/review/3185
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-24 19:59:34 +00:00