Commit Graph

37221 Commits

Author SHA1 Message Date
Richard Sharpe b6d24bf37d 80211ax: Fixes for Mult-STA Block Acks, searching in MCS sets, a-control
Feedback from the recent test event showed that the code for Multi-STA
block acks did not exist, searching for indovidual MCS set produced
confusing results and A-Control was not correctly handled.

This contains fixes for each of those.

Bug: 13207
Change-Id: I4b18497d9e7642e370d0b6bb34e2180bacea8b8e
Reviewed-on: https://code.wireshark.org/review/27655
Petri-Dish: Richard Sharpe <realrichardsharpe@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
2018-05-20 13:51:02 +00:00
Dylan Ulis e7056e6ce6 CIP: Code cleanup
1. Convert more things to proto_tree_add_bitmask
2. Remove unnecessary pathpos param everywhere
3. Replace some tvb_get_xxx with proto_tree_add_item_ret_uint
4. Remove unused variables, params
5. Remove if(tree)

There are no functional changes. In the area where there is a lot of
diff (eg: pathpos), I verified using the pcap from Bug: 12049, and
compared the PDML output before and after, just as a sanity check.

Change-Id: I9564172ccece558cf1877b667f713b584a00d73f
Reviewed-on: https://code.wireshark.org/review/27642
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-20 05:52:39 +00:00
Guy Harris 8ee56d2982 Get rid of add_async_dns_ipv4().
We don't have add_async_dns_ipv6(), we just do the same stuff inline in
host_lookup6(); this removes an irrelevant difference between
host_lookup() and host_lookup6().

Change-Id: Ib4aa1783ddec1bc390e2a7f64c87f1c8441fa849
Reviewed-on: https://code.wireshark.org/review/27661
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-20 03:00:26 +00:00
Guy Harris 724877497a Make private variables static.
Change-Id: I0844795597cec83dfb6752fb986d2a9957789530
Reviewed-on: https://code.wireshark.org/review/27657
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-20 01:35:52 +00:00
Paul Zander e4edeab1e0 prefs: fix bug in color saving
Colors were only saved and effectuated when all 3 color components are changed.

Change-Id: I0d82ac8d62780e507714bc48c310338e87deefea
Reviewed-on: https://code.wireshark.org/review/27639
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-19 06:19:30 +00:00
Guy Harris b1de8c87a1 Older versions of Clang don't understand -Wpedantic.
Define DIAG_OFF_PEDANTIC and DIAG_ON_PEDANTIC, and have it do nothing on
Clang prior to 4.0.

Change-Id: Ic6b2e607659db66f3210401024bf3f2239665506
Reviewed-on: https://code.wireshark.org/review/27649
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-18 22:31:05 +00:00
Gerald Combs 5fb3385701 maxmind: Process our requests more often.
The answer to

// XXX Should we call maxmind_db_lookup_process first?

in maxmind_db.c is "yes", since it's possible to fill up our pipe
between host name lookup intervals, at least on Windows. Note that we
might want to move request processing to a thread.

Bug: 14701
Change-Id: I8cfb77444d7f999e77571bc6bb61ea7f1f677778
Reviewed-on: https://code.wireshark.org/review/27644
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-18 20:10:38 +00:00
Chaitanya Tata 24baf35566 ieee80211: fix typos related to 802.11ad
fix a few typos related to 802.11ad

1. 802.11-2016 changed the acronym from ECPAC to ECAPC
2. dmp_params to dmg_params

Change-Id: I4e3bc02cdceff826ab334bc93ebfb008c5041f74
Reviewed-on: https://code.wireshark.org/review/27643
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-18 19:33:14 +00:00
Peter Wu 819696eaa7 prefs: remove wimaxasncp.udp.wimax_port compatibility
This fixes a warning when plugins are not built ("Deprecated ports pref
check - module 'wimaxasncp' not found").

This warning was added in v2.9.0rc0-372-gf7296644c5 ("prefs: fix
importing some old protocol preferences") which also corrected the
wimaxasncp module name, but as this broken preference was never noticed
before, just remove the compatibility pref to fix the warning.

Change-Id: I97430fcb00ce0e489bcf0ae3ac47c9b211705518
Reviewed-on: https://code.wireshark.org/review/27632
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-18 12:48:59 +00:00
Pascal Quantin 40dbc0ccf2 proto.c: do not dereference a NULL pointer in proto_item_get_len() on first pass
Like the proto_item_set_XXX functions, check proto_item pointer validity
before using it. It can be NULL on first pass for example.

Bug: 14703
Change-Id: I94957e0738d66f99793682dc0ea1c7c0a65ceecd
Reviewed-on: https://code.wireshark.org/review/27629
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>
2018-05-18 09:19:12 +00:00
Darius Davis ad80dd0831 BOOTP: Disentangle BSDP naming from PacketCable.
BSDP (Boot Server Discovery Protocol, layered upon BOOTP) is entirely Apple's
creation, and has nothing to do with PacketCable as far as I can tell, so let's
not label it as PacketCable.

BSDPD is one possible name for a daemon that speaks the BSDP protocol, and it
seems more reasonable to use the name of the protocol here, so let's replace
"BSDPD" references with "BSDP", and use CLIENT and SERVER to better identify
the Vendor Class ID prefixes.

Change-Id: I6711022f16b37a2864482ba4eb544683865de274
Reviewed-on: https://code.wireshark.org/review/27628
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-18 09:18:25 +00:00
Dario Lombardo 0d39276961 elf: fix unintented sign extension.
Use cast to avoid int promotion as done in
Ibca08ee3766f6c79b933c3db7ccd1f8f906cb3fe

CIDs:
1111807
1111808
1111809
1111810
1111811

Change-Id: I64dfa670b93eda3023109ea105dd2d94f58d91ba
Reviewed-on: https://code.wireshark.org/review/27611
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-18 05:48:01 +00:00
Alexis La Goutte 90887f3367 QUIC: Append colmun info and use small "name"
Bug: 13881
Change-Id: Ibf1d1315dc259726d5990e17df2d141d1cf83784
Reviewed-on: https://code.wireshark.org/review/27032
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-18 04:18:39 +00:00
Peter Wu f440561b8c dot11crypt: add bounds check for TDLS elements
Fixes a buffer overrun (read) of at most 255 bytes which could occur
while processing FTE in Dot11DecryptTDLSDeriveKey.

While at it, according to 802.11-2016 9.4.1.9, "A status code of
SUCCESS_POWER_SAVE_MODE also indicates a successful operation.". No idea
when it makes a difference, but let's implement it too.

Bug: 14686
Change-Id: Ia7a41cd965704a4d51fb5a4dc4d01885fc17375c
Fixes: v2.1.0rc0-1825-g6991149557 ("[airpdcap] Add support to decrypt TDLS traffic")
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8189
Reviewed-on: https://code.wireshark.org/review/27618
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-18 04:13:14 +00:00
antony.bridle 0937979a61 Asterix: Definition for ASTERIX Category 032 - Miniplan Messages
Change-Id: I7a110014ef8089646371ec1b176d710de2e79905
Reviewed-on: https://code.wireshark.org/review/27590
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-18 04:09:50 +00:00
Darien Spencer 2a9886bf09 RRC: Make the U-RNTI field filterable
U-RNTI is defined in ASN.1 as a 'SEQUENCE' of 2 numbers. this update
adds the U-RNTI field to the tree as a UINT32 with the value of the
numbers combined so it could be filtered.

Change-Id: I31e9f39a257aaf98c36eebb2cb7c33eb156a0e9f
Reviewed-on: https://code.wireshark.org/review/27566
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-05-17 21:22:13 +00:00
Peter Wu 64ef1ca87f radius: fix memleaks in dissect_attribute_value_pairs
CLEANUP_PUSH_PFX with "eap_buffer" and "vsa_buffer_table" was
ineffective because these pointers are initially NULL.

Bug: 14429
Change-Id: I5e6c457df714543bd384f93cdfa012f6122f9aa9
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6279
Reviewed-on: https://code.wireshark.org/review/27537
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-17 16:12:25 +00:00
Alexis La Goutte 438c1066d5 GQUIC: Tag are always use LITTLE ENDIAN encoding
Bug: 14462
Change-Id: I141dbc6e404256fda9a445b26f2c8204d4839842
Reviewed-on: https://code.wireshark.org/review/27591
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-17 07:47:28 +00:00
Alexis La Goutte d6eafc0941 GQUIC: Add support of version Q04x
Change-Id: I30d87b1c38ddde1e084338c1b04819ece2f4d97d
Reviewed-on: https://code.wireshark.org/review/27557
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-17 07:46:53 +00:00
Alexis La Goutte 7754c3086b isobus-vt: fix issue found by PVS Studio (V523)
The 'then' statement is equivalent to the 'else' statement.

Change-Id: I49c50208933c00be8bc16b5b8de15ab85e8094f5
Reviewed-on: https://code.wireshark.org/review/27601
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-17 07:44:31 +00:00
Alexis La Goutte c20255e25a rsh: fix issue found by PVS Studio (V519)
The 'hash_info->state' variable is assigned values twice successively

Change-Id: I73fc8e1d6acaa7c68c517e345492f2193ca95ea1
Reviewed-on: https://code.wireshark.org/review/27597
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-17 07:43:51 +00:00
Alexis La Goutte 57ddb2e651 lbmpdm: fix issue found by PVS Studio (V519)
The 'msgid.msg_def_id' variable is assigned values twice successively.
The 'msgid.ver_major' variable is assigned values twice successively.
The 'msgid.ver_minor' variable is assigned values twice successively.

Change-Id: I675d5a0870575ac358173c12920e0c0c920f17b1
Reviewed-on: https://code.wireshark.org/review/27595
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-17 07:43:24 +00:00
Alexis La Goutte 6a95d5251c exec: fix issue found by PVS Studio (V519)
The 'hash_info->state' variable is assigned values twice successively

Change-Id: I0628a9673fb19b6b0db74266e7546f9719521ef5
Reviewed-on: https://code.wireshark.org/review/27594
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-17 07:41:58 +00:00
Alexis La Goutte 4ae76081d5 btavdtp: fix issue found by PVS Studio (V519)
The 'key[2].key' variable is assigned values twice successively.

Change-Id: I420bcde791eb2ebfab68a5c69bccc195e211de01
Reviewed-on: https://code.wireshark.org/review/27593
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-17 07:40:59 +00:00
Alexis La Goutte 4d711c92b1 reasemble_test: fix issue found by PVS Studio (V519)
The 'fd_head' variable is assigned values twice successively.

Change-Id: Ia30f4135f35d5ece369b9648db3ebe5a13e8ccaa
Reviewed-on: https://code.wireshark.org/review/27592
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-17 07:40:04 +00:00
Alexis La Goutte fd85b477d6 opa-mad: fix issue found by PVS Studio (V501)
There are identical sub-expressions to the left and to the right of the '&&' operator: vlSelMskTmp && i < 32 && vlSelMskTmp

Change-Id: I23df4ac9217fe2ddc4b6691530abc609f644511a
Reviewed-on: https://code.wireshark.org/review/27509
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-17 05:29:14 +00:00
Alexis La Goutte 3a0b4d6431 vnc: fix issue found by PVS Studio (V1003)
Consider inspecting the 'for' operator. No more than one iteration of the loop will be performed

Change-Id: I0fe1cb83c8dca935c729a94eb7f6b94d2c0d245a
Reviewed-on: https://code.wireshark.org/review/27508
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-17 05:28:05 +00:00
Роман Донченко 88f7dae986 pkcs1: recognize the ecdsa-with-SHA1 OID
Change-Id: I8c82086570032c862ec1ca6ea25b4e40d1bc3e78
Reviewed-on: https://code.wireshark.org/review/27589
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-05-17 05:02:52 +00:00
Alexis La Goutte d8ab5676dc dcerpc-fileexp: fix issue found by PVS Studio (V523)
The 'then' statement is equivalent to the subsequent code fragment.

Change-Id: I2c44ef7d43468a70e7eb48326af962c908a656be
Reviewed-on: https://code.wireshark.org/review/27600
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-17 04:27:06 +00:00
Alexis La Goutte 780087d996 radius: fix issue found by PVS Studio (V519)
The 'rad_info->code' variable is assigned values twice successively.
The 'rad_info->ident' variable is assigned values twice successively

Change-Id: I53140ee84c053b3950d13c577a3c98479149aa00
Reviewed-on: https://code.wireshark.org/review/27596
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-17 04:22:39 +00:00
Alexis La Goutte b21385b384 rpc: fix issue found by PVS Studio (V523)
The 'then' statement is equivalent to the subsequent code fragment.

Change-Id: Ic25488ec0c8fd98da1d8fa4a94af87694e635865
Reviewed-on: https://code.wireshark.org/review/27602
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-17 04:17:44 +00:00
Pascal Quantin 3bbcd32d95 UMTS FP: fix a load of misaligned address reported by UBSan
load of misaligned address 0x61d00032009a for type 'const guint32', which requires 4 byte alignment

Change-Id: Ie609ead4e2dada97cb1348c8a35c11dbd1624213
Reviewed-on: https://code.wireshark.org/review/27606
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>
2018-05-17 04:15:28 +00:00
Guy Harris d08d0a87c5 Eliminate some unneeded header checks.
sys/stat.h and sys/types.h date back to V7 UNIX, so they should be
present on all UN*Xes, and we're assuming they're available on Windows,
so, unless and until we ever support platforms that are neither UN*Xes
nor Windows, we don't need to check for them.

Remove the CMake checks for them, remove the HAVE_ values from
cmakeconfig.h.in, and remove all tests for the HAVE_ values.

Change-Id: I90bb2aab37958553673b03b52f4931d3b304b9d0
Reviewed-on: https://code.wireshark.org/review/27603
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-16 22:03:09 +00:00
Vasil Velichkov d0823e3920 GSM MAP: Dissect SM-RP-SMEA
According to 3GPP TS 29.002 this parameter contains an address field
which is encoded as defined in 3GPP TS 23.040.

Change-Id: If82a09e43729a90ede1619da34e50ed5d14e869a
Reviewed-on: https://code.wireshark.org/review/27569
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-05-16 18:07:59 +00:00
Guy Harris 8322c5e210 Get rid of a GTK+-only field.
Change-Id: Iab68aaf0507fc94ff85deaf41c8ee23818d568c1
Reviewed-on: https://code.wireshark.org/review/27573
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-16 08:16:15 +00:00
Joakim Karlsson 2dfce3b54b pfcp: add message length check
According to TS 29.244, 7.2.2.4.1, message length shall exlude the
mandatory part of the PFCP header (the first 4 octets)

Change-Id: I46d6ab65d71eb6c6e574b47d0c8f18f7b40a092e
Reviewed-on: https://code.wireshark.org/review/27567
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-16 07:17:21 +00:00
Gerald Combs 9ec5b2b0fe Qt: Implement the capture info dialog.
Add back the capture info dialog. Draw sparklines for each protocol.
Update the User's Guide.

Bug: 12004
Change-Id: I45be8a0df4752255831a8b139ee84bb34d675ba9
Reviewed-on: https://code.wireshark.org/review/27565
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>
2018-05-16 04:26:36 +00:00
Alexis La Goutte d3427b8a65 megaco: fix issue found PVS Studio (V517)
The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence.

Change-Id: Id3e4584d1cafebd6643dd97c21916ef6b1818d9d
Reviewed-on: https://code.wireshark.org/review/27510
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-16 04:21:08 +00:00
Alexis La Goutte 995b0bab09 ldap: fix issue found by PVS Studio (V1001)
The 'offset' variable is assigned but is not used until the end of the function

Change-Id: Ib626b81f78b1b59547f451952cbdfb1bf04d2205
Reviewed-on: https://code.wireshark.org/review/27507
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-16 04:15:34 +00:00
Alexis La Goutte e18d20c728 wbxml: fix issue found by PVS Studio (V1001)
The 'len' variable is assigned but is not used until the end of the function

Change-Id: I98f0cc298e503412e0bdf8919a4a7be8ef45a2f9
Reviewed-on: https://code.wireshark.org/review/27506
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-16 04:15:06 +00:00
Alexis La Goutte 233c27e9dc smpp: fix issue found by PVS Studio (V1001)
The 'offset' variable is assigned but is not used until the end of the function

Change-Id: Idd5bc657bb0c64020fda0833a7eead357b463be7
Reviewed-on: https://code.wireshark.org/review/27505
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-16 04:14:42 +00:00
Alexis La Goutte e2ebd8c72a rtps: fix issue found by PVS Studio (V1001)
The 'offset' variable is assigned but is not used until the end of the function

Change-Id: I699c8ea4c6533b9834aefbd12b920b04876773ee
Reviewed-on: https://code.wireshark.org/review/27504
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-16 04:14:15 +00:00
Alexis La Goutte c05757ff35 h264: fix issue found by PVS Studio (V1001)
The 'bit_offset' variable is assigned but is not used until the end of the function

Change-Id: Id71b12177b6259decd3db801e9833dd46419bdc4
Reviewed-on: https://code.wireshark.org/review/27503
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-16 04:13:45 +00:00
Peter Wu 67c6420473 ber: clamp BER lengths to avoid integer overflow
Many callers treat the length as signed integer, so ensure that the
length fits in such a number. Failure to do so can have unintended
consequences (such as calling "tvb_memdup(tvb, 0, -1)" and assuming that
the length is actually 2^32-1).

Although an exception could be thrown as well, let's give the caller a
chance to handle this themselves.

Change-Id: If92545f7d3603250f75741040435000ba879b7e3
Ping-Bug: 14682
Reviewed-on: https://code.wireshark.org/review/27563
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-15 17:17:33 +00:00
Peter Wu df5a8b29bb ber: fix buffer overrun (read) in dissect_ber_constrained_bitstring
The length is an unsigned integer, but some users (such as tvb_memdup)
expect signed integers and treat negative values specially.

Bug: 14682
Change-Id: Ic3330d23d964b5cc44718b61c8985880f901674d
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8011
Reviewed-on: https://code.wireshark.org/review/27562
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-15 17:17:07 +00:00
Peter Wu 9ee790e99c tvbuff_zlib: reject negative lengths to avoid buffer overrun
Negative lengths and empty buffers are not uncompressable, reject them.
A buffer overrun (read) could occur otherwise due to unsigned "avail_in"
becoming insanely large.

Bug: 14675
Change-Id: I20b686cc6ad6ef8a8d1975ed3d2f52c8eb1f1c76
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7166
Reviewed-on: https://code.wireshark.org/review/27561
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-15 17:16:12 +00:00
Peter Wu e67283ddca ISMP: fix tuple decoding
EDP_TUPLE_HOLD dissection was broken due to a length parameter mixup in
v1.99.1rc0-224-g6720c80bab. The TLV length calculation was changed in
commit ed5453d892, but the only pcap I could find for which it made a
difference includes the TL lengths in the length field.

Since commit 067a076179, the IPXNET type was wrongly decoded, fixed now.
Check IPX address length to avoid a buffer overrun (read) in
get_ether_name by at most 5 bytes.

Bug: 4943
Bug: 14672
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6451
Change-Id: Ia99ab15578ecae6d5a3ec22989507d64f9926933
Reviewed-on: https://code.wireshark.org/review/27554
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-15 17:14:20 +00:00
Dario Lombardo 2af0e81071 dissectors: fix uint to int wrong sign promotion.
The result of guint16 * guint16 can lead to a wrong sign promotion,
when the result is assigned a uint64. Fixed by forcing the operands
to be guint32.

CIDs:
1247713
1111813
1111812
1111811
1111810
1111809
1111808
1111807

Change-Id: Ibca08ee3766f6c79b933c3db7ccd1f8f906cb3fe
Reviewed-on: https://code.wireshark.org/review/27441
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-15 17:12:45 +00:00
AndersBroman d7ea76d1e5 x509: Add decoding of Userid
"0.9.2342.19200300.100.1.1" "id-userid"

Bug 14655
Change-Id: Ia5d9a5655f411fe47ec60ad897254adec2d28b47
Reviewed-on: https://code.wireshark.org/review/27564
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-15 17:10:33 +00:00
Ivan Nardi 2db3db56bf umts_rlc, umts_mac: fix memory leaks (found via ASAN)
Such leaks are triggered by malformed packets

Change-Id: Ie392834b235cf9c5a249ede7fffb5a0dbdb360e5
Reviewed-on: https://code.wireshark.org/review/27556
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-05-15 14:22:34 +00:00
Роман Донченко 3ba56ce586 wiretap: Add a reader for files in the PEM-like format specified by RFC 7468
Change-Id: I8109025120d01c915f3a9d5550aa9272ec83893a
Reviewed-on: https://code.wireshark.org/review/27334
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-05-15 12:47:06 +00:00
Peter Wu 48fac2a18d gsm_a_dtap: fix off-by-one buffer overflow (write)
The output buffer needs one more byte for the string terminator.

Bug: 14688
Change-Id: I7d606aa8fb769fd65ba894f0472ada3543a1e3cd
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6420
Reviewed-on: https://code.wireshark.org/review/27539
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-15 10:30:36 +00:00
Stig Bjørlykke 171d92cc14 lwm2mtlv: Add Resource name tables
Add one fixed table for OMA (Normative) defined resource names and
one table for user defined resource names. All resources are identified
by a object ID and a resource ID.

Show number of elements in arrays instead of number of bytes.

Next iteration will add proper hf entries for OMA elements.

Change-Id: I4d6c053a7c448cc65692ba1d1e92a2033ff3b397
Reviewed-on: https://code.wireshark.org/review/27551
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-15 10:30:18 +00:00
Peter Wu 4c1690ac47 CMake: require at least CMake 3.5
CMake 3.11 with the Ninja generator started complaining about CMP0058
related to ui/qt/CMakeFiles/qtui_autogen.dir/RCCstock_iconsInfo.cmake
amd other files (AUTORCC). While the policy could be set explicitly,
let's try to modernize the CMake configuration:

- Drop CMP0042, if this gives issues with macOS, then it must be solved
  in a different way using non-deprecated methods.
- Drop CMP0054 and ensure that all if("${foo}") and if(${foo}) are
  converted to if(foo).
- Remove string comparison against "-NOTFOUND", it already evaluates to
  false in an if condition.
- Use CXX_STANDARD/CXX_STANDARD_REQUIRED for Qt 5.7 and newer.
- Assume that copy_if_different can accept multiple sources (CMake 3.5).
- Consistency: Out of the 60 CMake 3.11 FindXxx.cmake files that use
  find_library, 34 contain "XXX_LIBRAR" while 16 contain "Xxx_LIBRAR".
  Let's assume uppercase variables (now custom MaxMindDB include dirs
  are correctly used).

CMake 3.5 was chosen as the next version because of its wide support.
Ubuntu 14.04 ships with cmake3 3.5.1, Debian jessie-backports has 3.6.2,
EPEL for CentOS/RHEL6 includes cmake3 3.6.1 and SLES12 SP2 has 3.5.

Change-Id: I2fa7b94bf8cc78411f414987d17bab3a33dfb360
Reviewed-on: https://code.wireshark.org/review/27444
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-15 10:28:09 +00:00
Peter Wu 4413d43962 rtcp: fix buffer overflow in transport-cc dissection
When the packet status chunks cover more packets than advertised in the
packet status count field, fail rather than writing past the end.
https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01#section-3.1.2

Bug: 14673
Change-Id: If90baef3610d8f884b0772a4b81d6dcb4ebc9227
Fixes: v2.5.0rc0-2533-ga584eab239 ("New RTCP dissector for transport-cc")
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6464
Reviewed-on: https://code.wireshark.org/review/27527
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Rui Zhang <rzhang@grandstream.cn>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-14 14:45:12 +00:00
Peter Wu 10306f9a32 Free g_array_free-related memory leaks
g_array_free(a, FALSE) returns "a->data". Callers that do not handle
this will leak memory. Convert other users to use the return value
instead of direct access to "a->data".

Change-Id: I0a29864e8106c0bf09e9573ef29e4474179c4171
Reviewed-on: https://code.wireshark.org/review/27438
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-14 13:44:23 +00:00
Peter Wu bb81e1807b Free g_ptr_array_free-related memory leaks
g_ptr_array_free(a, FALSE) returns "a->pdata". Callers that do not
handle this will leak memory (e.g. "tshark -G plugins"). Convert other
users to use the return value instead of direct access to "a->pdata".

Change-Id: I29835477d587f5f54bf0d94cdae9f375e3da3ce3
Reviewed-on: https://code.wireshark.org/review/27437
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-14 13:42:10 +00:00
Peter Wu d80acae40d tvbuff: make tvb_bytes_exist fail with negative values
tvb_generic_clone_offset_len uses tvb_bytes_exist to check that the
requested tvb data is actually available. It did not expect negative
values, that would result in an overly large memory allocation.

Bug: 14678
Change-Id: Ie80095a381e55ca5dbbd5c9d835243549d0b212e
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7179
Reviewed-on: https://code.wireshark.org/review/27526
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-14 13:07:23 +00:00
Peter Wu 17647c4041 fip: avoid tvb_bytes_exist with negative length
This will no longer be a valid way to check for remaining data.

Change-Id: I5533b8efc3344f0f8e28d873e5363256a014ab05
Reviewed-on: https://code.wireshark.org/review/27525
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-14 11:28:16 +00:00
Peter Wu 8f4072b481 QUIC: fix initial_max_streams_* decoding and rename it
These are 16-bit fields, not 32-bit. Fixes a malformed packet exception.
While at it, rename fields to match draft-ietf-quic-tls-11-6-g4b762033,
these fields were inconssitently named in draft-11.

Bug: 13881
Change-Id: I797d2b4a24a4f4a9b340db736de0000acd52e639
Reviewed-on: https://code.wireshark.org/review/27491
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-14 09:25:55 +00:00
Guy Harris 5fef0e8c37 Fix indentation.
Change-Id: Idb9344f0e08331f9e888a547bff9adf9f01334d5
Reviewed-on: https://code.wireshark.org/review/27524
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-14 08:23:41 +00:00
Darius Davis 6e88943d0e BGP: Validate length of Path Attribute records.
Bug 13741 showed a case where the BGP dissector's failure to validate the
length of the Path Attribute record allowed a pathological BGP UPDATE packet to
generate more than one million items in the protocol tree by repeatedly
dissecting certain segments of the packet.

It's easy enough to detect when the Path Attribute length cannot be valid, so
let's do so.  When the condition arises, let's raise an Expert Info error in
the same style and format as used elsewhere in the same routine, and abandon
dissection of the Path Attributes list.

With this check in place, an incorrect length computation is revealed at a
callsite.  This would only have prevented a small (less than 5 bytes) Path
Attribute from being dissected if it was at the very end of the Path Attributes
list, but the bounds checking added in this change makes this problem much more
apparent, so we fix the length computation while we're here.

Testing Done: Built wireshark on Linux amd64.  Using bgp.pcap from the Sample
   Captures page on the wiki, verified that the dissection of the UPDATE
   packets were unaltered by this fix.  Using the capture attached to bug 13741
   (clusterfuzz-testcase-minimized-6689222578667520.pcap), verified that the
   packet no longer triggers the "too many items" exception, instead we see
   an Expert Info for each oversized Path Attribute length, and eventually an
   exception for "length of contained item exceeds length of containing item".
   30,000 iterations of fuzz test with bgp.pcap as input, and many iterations
   of randpkt-test too.  Crafted a packet with a 3-byte ATOMIC_AGGREGATE Path
   Attribute at the end of the Path Attributes list; Before this change, an
   exception is raised during dissection, but after this change it is dissected
   correctly.

Bug: 13741
Change-Id: I80f506b114a61e5b060d93b59bed6b94fb188b3e
Reviewed-on: https://code.wireshark.org/review/27466
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-14 08:17:09 +00:00
Dylan Ulis d80dbe533c Display configured checksum Expert summary string
Previously, checksum code would override the expert_field summary
string configured by dissectors, and display the generic "Bad checksum"
string in the Expert Information dialog.

This change uses the configured expert_field summary string instead.
eg: "CRC-S1 incorrect [should be 0xff]" instead of "Bad checksum [should
be 0xff]"

This fixes problem #2 in the linked bug.

Bug: 14425
Change-Id: I168b2be92ec2d8d6f956beeaf6292574bc1d9dab
Reviewed-on: https://code.wireshark.org/review/25758
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-14 08:15:39 +00:00
Peter Wu 843735e0ef dns: fix null pointer deref for empty name in SRV record
Per RFC 2782, the name should follow the "_Service._Proto.Name" format.
If a malformed packet does not adhere to this and provides a zero-length
name, then wmem_strsplit returns NULL.

Bug: 14681
Change-Id: I7b9935238a9800a1526c8b694fd2c63d3b488d0b
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7416
Reviewed-on: https://code.wireshark.org/review/27499
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-14 08:14:26 +00:00
Peter Wu 19c4589246 proto: handle split bits covering more than 32 bits
proto_tree_add_split_bits_item_ret_val can handle bits from an arbitrary
sized buffer, as long as it covers no more than 64 bits. If the
octet-aligned mask covers up to 32 bits, then this mask is also shown.
If this mask was larger than 64 bits, then undefined behavior could
occur, so check for that.

For larger masks, instead of "= GmPRS Terminal Type: Unknown (96)",
display "7 bits = GmPRS Terminal Type: Unknown (96)" instead.

Bug: 13613
Change-Id: I111cf6a0705f999e42d83bfe57ac84f414946d0b
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1158
Reviewed-on: https://code.wireshark.org/review/27517
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-14 08:13:47 +00:00
Richard Sharpe b10dbb8614 ieee80211: Conform with IEEE802.11-2016 around VHT MCS Set in VHT Capabilities.
There were a few undissected fields in the VHT MCS Set and some of the fields
were not being placed under the correct sub tree.

Change-Id: I0dc4be1b69d371f59cc74fa06205a3cba2a65c54
Reviewed-on: https://code.wireshark.org/review/27385
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-14 08:03:38 +00:00
Peter Wu d08a53a7b9 Q.931: fix use-after-free (write) of "q931_pi"
The dissect_q931_number_ie (and indirectly dissect_q931_cause_ie_unsafe)
write to the "q931_pi" structure which seems private to the q931
dissector, but can in fact be called through other dissectors (isup) as
well. Normally this structure is initialized in "dissect_q931_pdu" and
invalidated at the end of the function, but a malformed packet can
prevent the cleanup. In the next packet, a different dissector can thus
trigger a use-after-free via "dissect_q931_number_ie".

Rename "dissect_q931_cause_ie_unsafe" since "unsafe" meant that external
dissectors could not call it directly (see commit a83a87e9ca).

Based on commit 197ceddab1, it seems that the intended purpose of the
structure is to provide information to the VoIP Calls dialog, but it
would only be used when called through dissect_q931_pdu. Dissectors like
isup have their own routines to provide call information, but as a
side-effect of code sharing the problematic code path was reached.

Bug: 14689
Change-Id: I871525db560f24690ade9a0b944c6d0e655ed34b
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6711
Reviewed-on: https://code.wireshark.org/review/27495
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-14 04:46:07 +00:00
Martin Mathieson 52f4a2c4d1 mac-nr: check that control elements happen in the appropriate place
Change-Id: I61ac442bfb7a4d81d544eec876d878eacc242239
Reviewed-on: https://code.wireshark.org/review/27501
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-05-13 20:52:48 +00:00
Guy Harris afad14dcfe Get rid of some GTK+-only stuff.
Change-Id: I85806476246a567f747e3911e3d15716e9cfe06b
Reviewed-on: https://code.wireshark.org/review/27514
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-13 20:21:14 +00:00
Guy Harris 3a0dd69d04 Get rid of some GTK+-only stuff.
Change-Id: I841a1cdb637f37673466e4d065474c0f7e2dfc56
Reviewed-on: https://code.wireshark.org/review/27512
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-13 19:46:45 +00:00
Alexis La Goutte bd166c2b08 ieee80211: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I73bc908ab91b7e3b862efefadd6b0d7b7c064689
Reviewed-on: https://code.wireshark.org/review/27502
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-05-13 17:44:44 +00:00
Sven Eckelmann a2376d27d7 batadv: Check checksum for full TT responses
The full translation table responses for the v15 format of batman-adv
contain a list of vlans and then a list of entries for these VLANs. The
VLANs itself contain a checksum that is done over the entries which belong
to these VLANs.

The checkum must be correct or otherwise the receiver will not be able to
finish its synchronization of the remote translation table. Having this
information available for filtering is essential to understand such a
situation and to analyze why a node continues to send full table
requests.

Change-Id: I90f3d3d2c19ac85c1c5a6474cf1877583cfd1139
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-on: https://code.wireshark.org/review/27442
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-05-13 16:16:52 +00:00
Sven Eckelmann 4a8957540d batadv: Accept Multicast TVLV v2
The multicast implementation in batman-adv exists in two different versions
which are incompatible. But their TVLV format for announcing the feature
itself is the same and can be supported by the current dissector.

Change-Id: I0e3012375912355e47adbb9d0e4f91fc7510156b
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-on: https://code.wireshark.org/review/27443
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-05-13 16:16:32 +00:00
Ivan Nardi e6d2f14009 ieee80211: remove unused variable and fix compilation
Fix compilation error:

.../wireshark/epan/dissectors/packet-ieee80211.c:2641:27:
error: ‘ht_info_service_interval_granularity_flags’ defined but not used
[-Werror=unused-const-variable=]

Change-Id: I0e6e8a46b2bd58923847220f675fe6e4d6a34aef
Reviewed-on: https://code.wireshark.org/review/27498
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-05-13 15:41:00 +00:00
Richard Sharpe 761365e574 radiotap: Bring the HE header dissection into conformance with changes.
Johannes made changes in the handling of LTF Symbols and LTF Symbol count
which are sort of backward compatible.

This brings us into conformance with those.

The specification can be found here: http://www.radiotap.org/fields/HE.html

Change-Id: I82e5458fa871b42549fabd0bcb49f6366c10d8bb
Reviewed-on: https://code.wireshark.org/review/27370
Petri-Dish: Richard Sharpe <realrichardsharpe@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-13 12:07:14 +00:00
Richard Sharpe fce04c23ef ieee80211: Bring HT Info into conformance with IEEE802.11-2016.
The HT Information element has changed since IEEE802.11n. This updates
that element to bring it in conformance with IEEE802.11-2016.

Change-Id: Ifa380b9a4dee00e0b2f07f5aabb6a18579aa8f71
Reviewed-on: https://code.wireshark.org/review/27371
Petri-Dish: Richard Sharpe <realrichardsharpe@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-13 12:06:16 +00:00
Peter Wu b1e0cb01b3 coap: fix use-after-free of "coinfo->ctype_str"
A use-after-free is possible through the following path:

    // returns wmem_packet_scope() memory
    coinfo->ctype_str = val_to_str(coinfo->ctype_value, vals_ctype, "Unknown Type %u");
    // leaks packet scoped memory into conversation
    coap_trans = wmem_new0(wmem_file_scope(), coap_transaction);
    coap_trans->req_ctype_str = coinfo->ctype_str;  // <-- oops
    // next packet: use-after-free of packet scoped memory
    coinfo->ctype_str = coap_trans->req_ctype_str;

This could be fixed by duplicating "ctype_str" with wmem_file_scope, but
since all "ctype_str" strings are constant, make the problematic
"ctype_str" assignment also constant for unknown types (the numeric type
is also stored in "ctype_value" if necessary).

Change-Id: I6249e076fa282bbe0982b8c709788e27f6fdf86e
Fixes: v2.9.0rc0-317-g46fcf452ac ("coap: Store ctype values in transaction tracking")
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8196
Reviewed-on: https://code.wireshark.org/review/27477
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-13 12:02:37 +00:00
Guy Harris fb877ef5da Get rid of some GTK+-only stuff.
Change-Id: I6c14429d4d473464ad7bea18dee07c3adf34664d
Reviewed-on: https://code.wireshark.org/review/27479
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-12 23:01:14 +00:00
Guy Harris 4e0de38081 Get rid of GTK+-only structure member.
Change-Id: I93e1a44ff3b22ba6ff0c14853e78c935347ed290
Reviewed-on: https://code.wireshark.org/review/27478
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-12 22:47:24 +00:00
Sven Eckelmann 04fffbbe9f batadv: Fix label for batadv.unicast_tvlv.src
Change-Id: I73c06bb84efc874412b534348b9d1261b8ed5164
Fixes: v1.99.1rc0-546-g4cc4315793 ("batadv: Add dissector support for batadv v15")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Reviewed-on: https://code.wireshark.org/review/27440
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: Dario Lombardo <lomato@gmail.com>
2018-05-12 21:24:19 +00:00
Peter Wu 4d800d7b8a gsm_a_gm: fix potential buffer overrun (read)
When the string "str" is empty, "str+1" is invalid. This function can be
called from functions using SET_ELEM_VARS in packet-gsm_a_common.c which
appear to check the length first, but packet-etsi_card_app_toolkit.c and
packet-camel.c do not. Err on the safe side and do not add the item.

Change-Id: I6bd559593bb10ff0b8bf08a48d828613e3d8ccf5
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4311
Reviewed-on: https://code.wireshark.org/review/27470
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-12 17:36:34 +00:00
Dario Lombardo 65754fa4d7 bluecom: remove dead stores/increments (found by clang).
Change-Id: I07475225ca2e81ba22d0669a7ef474d76b46e2cb
Reviewed-on: https://code.wireshark.org/review/27445
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-05-12 09:28:32 +00:00
Peter Wu 16a52bff6c rtmpt: fix dissection of multiple packets on second pass
The previous fix for the infinite loop in bug 13347 resulted in loop
termination after one round, resulting in ignoring all but the last
packet in a TCP segment.

Observe that the purpose of this loop is to collect all packets where
"tp->seq" refers to the first offset and "tcp->lastseq" refers to the
last position of the packet. If a full packet "tp" is found, then the
previous packet ends at "tp->seq-1" instead of "tp->lastseq-1" (assuming
no overlapping TCP segments).

The infinite loop from bug 13347 occured because of a single packet of
length 1 (tp->seq=0, tp->lastseq=0) and lastseq-1 overflowed. To address
that, terminate the loop once the begin is reached (tp->seq == 0).

Bug: 14650
Change-Id: Ibef382a09c6481b1024dd64dbc8bde904025f057
Fixes: v2.3.0rc0-2153-gee185445f4 ("rtmpt: Ensure sequence count is incremented for stored fragments")
Reviewed-on: https://code.wireshark.org/review/27319
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-12 08:29:14 +00:00
Dylan Ulis e7cd2f8960 CIP Motion: Various Updates
1. Feedback Mode: Should only use the lower 4 bits.
2. Axis Response: Add more enumerated values
3. Axis Status: Add more bit interpretations
4. Add more Motion Attributes
5. Minor cleanup

Change-Id: I0a6568ca263afb8d7827961907cb7d0a42b376f4
Reviewed-on: https://code.wireshark.org/review/27400
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-12 06:31:28 +00:00
Dylan Ulis 03a8e01cfc CIP: Data Type updates
1. Convert lots of things to use the new BASE_UNIT_STRING feature
2. ANSI Symbol: Print size correctly in generated response
3. Attribute Status is a 1 byte value in Get/Set_Attribute_Lists
4. Forward Open: Indicate this is a Safety connection in info column. This is useful because Safety connections aren't obvious from the CIP Class like other connections (eg: Motion)

Change-Id: I8cb00fd0141d75a3e9425d8e618b1f54d12807be
Reviewed-on: https://code.wireshark.org/review/27447
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-11 20:37:32 +00:00
Pascal Quantin 91d173eb13 MAC LTE: fix mac-lte.slsch.format field
Bug: 14669
Change-Id: I7326046e3707867d7dfef2e4eb341c95f1b2cdab
Reviewed-on: https://code.wireshark.org/review/27461
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-05-11 19:55:34 +00:00
Dirk Eibach bfd51199e7 DisplayPort AUX channel protocol dissector
Dissector for the VESA DisplayPort AUX channel protocol.

Bug: 14651
Change-Id: I5c0c7668bda969086d9d6e5069aad87e929f6340
Reviewed-on: https://code.wireshark.org/review/27311
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-10 20:27:36 +00:00
Peter Wu a729c0f173 wslua: fix memleak in Dir.remove_all on error path
While at it, use g_build_filename. Found by Clang Static Analyzer.

Change-Id: I5c50f50abb8c16a553586c548ccd1ae6c3cdd8c1
Reviewed-on: https://code.wireshark.org/review/27439
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-10 06:16:19 +00:00
Sayuri Mizushima 4362276ef3 fp: Avoid changes to info column after payload dissection
Previously info was appended to the end of the info set by
an underlying protocol (mostly rlc/rrc)

Change-Id: I7fe0d8d485f81ed2c108099e76d15c887108164f
Reviewed-on: https://code.wireshark.org/review/27399
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-09 21:25:40 +00:00
Sayuri Mizushima 9a8f44f4bb fp: Fix incorrect framing
A rare case was matching against both dch and pch checks

Change-Id: I1aa01636355a6fb5d0804b184f3f9b58bec99ffd
Reviewed-on: https://code.wireshark.org/review/27367
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-09 21:24:27 +00:00
Dario Lombardo 2800786c16 nas_5gs: remove legacy return (CID: 1435476).
Change-Id: I99be7b1431f564a147ee3f9090ce93792ecf2b1f
Reviewed-on: https://code.wireshark.org/review/27430
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-09 21:22:32 +00:00
Dario Lombardo 0ee4a60bc7 zbee-zcl-general: fix typo (CID 1435473).
Change-Id: I9a5d06c991c6c0f0b8e89f27cf9e06b8df77f44e
Reviewed-on: https://code.wireshark.org/review/27429
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-09 20:52:29 +00:00
Dario Lombardo 957ae1fc48 packet-ieee80211: fix infinite loop (CID 1435463).
Change-Id: I1eee5cc0fa87a6add901f4e86b13e1f4564134cd
Reviewed-on: https://code.wireshark.org/review/27423
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-09 20:50:27 +00:00
Dario Lombardo 4b6224a673 proto: don't overrun buffer.
This is shown by a bunch of coverity reports all pointing at this line.
Every buffer has a ITEM_LABEL_LENGTH, but label_mark_truncated access it
at ITEM_LABEL_LENGTH (off-by-one).

CIDs:
1435461
1435462
1435465
1435466
1435471
1435472
1435477
1435481
1435483
1435484
1435485
1435489
1435492
1435500

Fixes: v1.11.3-rc1-1837-gf94674d2fb ("truncate UTF-8 strings only at the boundary between two characters")
Change-Id: I3781c36594f7db880bc9f76b64d261dbc498c0ce
Reviewed-on: https://code.wireshark.org/review/27425
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-05-09 12:29:15 +00:00
Guy Harris 270f0554d8 You have to set tm_isdst before calling mktime().
You either need to tell mktime() that 1) DST/Summer Time is in effect,
2) DST/Summer Time isn't in effect, or 3) we don't know whether
DST/Summer Time is in effect, you figure it out.

We set tm_isdst to -1, to choose option 3), which is what we want.

Fixes Coverity CID 1435496.

Change-Id: Iff24e51807ab42c0e6d9629f72848ad9f8d325fb
Reviewed-on: https://code.wireshark.org/review/27404
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-09 03:43:53 +00:00
Guy Harris 2946575199 Fix infinite loop.
If a variable is a count of items, and we're looping while the count is
non-zero, we need to decrement it after every item we process.

Fixes Coverity CID 1435501.

Change-Id: Iabb0cb6276d4bcf4b1bdea9ec3ba943dac1b9938
Reviewed-on: https://code.wireshark.org/review/27402
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-09 03:38:20 +00:00
Peter Wu c1deca1401 smb: fix memleak in export objects
"aux_smb_fid_type_string" is used as "%s" argument for g_strdup_printf,
there is no need to clone it. I checked all calls and "fid_type" should
always be valid, but in case of a bug, let's not return a NULL pointer
but "?". Found by Clang Static Analyzer.

Change-Id: I09896638eb5512f22b3d1a227462499e12cedcde
Reviewed-on: https://code.wireshark.org/review/27349
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: ronnie sahlberg <ronniesahlberg@gmail.com>
2018-05-09 03:05:20 +00:00
Stig Bjørlykke 7a09f7b754 dtls: Remove period from Version blurb
Change-Id: I5e50554daf25d2b2e71795c28e393f08d117ad6f
Reviewed-on: https://code.wireshark.org/review/27396
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-05-08 13:49:14 +00:00
Michał Łabędzki f7a660ec28 Bluetooth: ATT: Fix description of few fields
Copy-paste issue, fixed description names of:
btatt.weight_scale_feature
btatt.glucose_measurement.sequence_number
btatt.glucose_measurement.type_and_sample_location
btatt.record_access_control_point.response_code

Change-Id: Ifbda28ab86bda0e3dde824c24449d3ed90f8da8f
Reviewed-on: https://code.wireshark.org/review/27362
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-07 19:58:09 +00:00
Michał Łabędzki d230b30610 Bluetooth: Assigned Numbers: Add Mesh Characteristics
Additional 65 characteristics to be done later.

Change-Id: Ic7d9a868619d26a49b8e322d1f9bde0ab3753319
Reviewed-on: https://code.wireshark.org/review/27361
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-07 19:57:39 +00:00
Michał Łabędzki a87b5fc43f Bluetooth: GATT: Add prepare to implementing FTMS/FTMP
Implement "usage" of those chatacteristics.

Change-Id: I708537909b89f29df19e3bbac339ee37e890f2d0
Reviewed-on: https://code.wireshark.org/review/27360
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-07 19:56:07 +00:00
Ivan Nardi 6c0f6f52d3 gtp, gtpv2: fix memory leaks in association code (found via ASAN)
Change-Id: Id8891dffa3c4db3ec82de3a0597550eb73a1d25f
Reviewed-on: https://code.wireshark.org/review/27380
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-05-07 19:03:45 +00:00
Joerg Mayer c9832726bf Refer to the bytes of the real checksum field if the checksum is missing or generated
Change-Id: I6c7a5b1441b97604d2847f7b74abc7a9c9e98d2c
Reviewed-on: https://code.wireshark.org/review/27381
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-05-07 13:22:23 +00:00
Joakim Karlsson 282eb96e63 pfcp: added IEs 132-139
According to 3GPP TS 29.244 v15.1.0

Change-Id: I1d55314a269ee615bc1730eba70fed095cec3075
Reviewed-on: https://code.wireshark.org/review/27338
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-07 04:09:58 +00:00
Martin Mathieson b27cd62519 mac-nr: Break down the RAR UL Grant
Change-Id: I30df646ba49e1c73e2ba90c43578071841ff317a
Reviewed-on: https://code.wireshark.org/review/27336
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-05-06 16:26:32 +00:00
Karl Knoebl 9136c59fa1 IEC-61850 MMS INFO-Column extended with invokeID, domainID, itemID
Change-Id: Id4e31cdcba5fcbb8f5f9ce967b97049dc4bb3e72
Reviewed-on: https://code.wireshark.org/review/27143
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-05-06 16:07:40 +00:00
Gerald Combs a834d3794d [Automatic update for 2018-05-06]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Idea7c88121649417e332099b0cb71042c809735a
Reviewed-on: https://code.wireshark.org/review/27372
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-06 08:15:41 +00:00
Peter Wu 4e6d4b94e2 zbee-security: fix keyring memleaks
If zbee_security_parse_key fails, the cloned label was leaked. Updating
The keyring contents was also leaked. Found by Clang Static Analyzer.

Change-Id: I5ef8e890f5b2b37d562b7f7a85b046bea9559841
Reviewed-on: https://code.wireshark.org/review/27347
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-05-05 16:44:32 +00:00
Peter Wu 4c14ac0754 tcp: fix memleak in Follow TCP tap in error cases
If this not the first data segment and the data is somehow empty
(overlap?) or if the packet is out-of-order, the whole data fragment and
follow_record_t structure was leaked. Found by Clang Static Analyzer.

Change-Id: I81dc7749c738938b14d2cf4ad41e624b15099da6
Fixes: v2.3.0rc0-1449-g66fa31415f ("tcp: Fix Follow TCP tap data and when its tapped.")
Reviewed-on: https://code.wireshark.org/review/27348
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-05-05 16:12:53 +00:00
Peter Wu 1ebbb09c5b plugin_if: fix small memory leak in ext_menubar_add_separator
No need to clone memory as ext_menubar_add_generic_entry g_strdups the
label argument. Found by Clang Static Analyzer.

Change-Id: I7ffe3d0cae0093410f2015e6beb8b8e97a871b2a
Fixes: v1.99.6rc0-213-geeed4d1121 ("UI: Implementing menus for plugins")
Reviewed-on: https://code.wireshark.org/review/27342
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-05-05 05:57:25 +00:00
Dario Lombardo 8569b8000f pfcp: fix typo.
Change-Id: I48adc5a3ae198b06401d7526e013436ee73a51fe
Reviewed-on: https://code.wireshark.org/review/27340
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-05 03:25:18 +00:00
Guy Harris 8db1616ec3 Get rid of more autotoolsisms.
Change-Id: I124732adf3c3da511c206932544b4d533404cfc5
Reviewed-on: https://code.wireshark.org/review/27332
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-04 19:14:34 +00:00
AndersBroman 3f49c0d3ca g_slist_free_full: Use g_slist_free_full() in a couple of places.
Change-Id: I38617ee289196f9807cf285af60d670bd5477687
Reviewed-on: https://code.wireshark.org/review/27327
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-04 10:16:54 +00:00
Peter Wu 8815ac76db CMake: fix build by not unnecessarily linking with wsutil
When built with -DCMAKE_BUILD_WITH_INSTALL_RPATH=1, make-taps and
make-dissectors fail to run because they cannot locate libwsutil.so.0.
Since v2.9.0rc0-178-gbb81bef535 ("glib: Get rid of GLIB_CHECK_VERSION as
we now require 2.32.0") wsutil is definitely no longer needed.

Change-Id: Ida269fdb5f2cba979e3776f57c1a6bf3d546fe5d
Reviewed-on: https://code.wireshark.org/review/27329
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-04 10:16:39 +00:00
Dario Lombardo 7f7f8326af autotools: remove more makefiles.
Change-Id: Ie0aa418e0515b56f0abfbab4f4c5ebc9edd7b81b
Reviewed-on: https://code.wireshark.org/review/27314
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-04 10:15:37 +00:00
Dylan Ulis ae6afe416b CIP Motion: Attribute Support
1. Add attribute table similar to the other CIP related dissectors. Currently, this just adds 2 attributes. More will come in separate reviews. (Still clarifying some information in the Spec)
2. Minor wording updates to match spec

Change-Id: I667b8e465d576020471c8e7fc10b43e25ea573dd
Reviewed-on: https://code.wireshark.org/review/27180
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Jim Young <jim.young.ws@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-04 06:54:18 +00:00
Joakim Karlsson 087cb7d7aa pfcp: updated UP Function Features IE
added flag 6/2 PDIU

Change-Id: Iab0cf7a1def8d0c9949df83b41478ac1f23b3844
Reviewed-on: https://code.wireshark.org/review/27318
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-04 06:01:50 +00:00
Pascal Quantin 47bf21a6c8 SDP: do not assume that media_desc pointer is always set
Bug: 14648
Change-Id: I9d585a1b49e15529b19414be52c8bf198475fd62
Reviewed-on: https://code.wireshark.org/review/27304
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>
2018-05-03 13:39:40 +00:00
Martin Mathieson ab949e6deb mac-nr: 15.1.0 changes to RAR PDU
Change-Id: I0442831b13ecf276d4235230a6a9aa0788e91d3f
Reviewed-on: https://code.wireshark.org/review/27282
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-05-03 09:22:03 +00:00
Joakim Karlsson 7c8f7052c8 pfcp: correction of length
flags are uint8 but the whole list was set as uint16

Change-Id: Ie52d621d35b68897919d5451c93b6c82e1d45649
Reviewed-on: https://code.wireshark.org/review/27300
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-03 08:48:24 +00:00
Pascal Quantin 092564a336 prefs.c: fix compilation with gcc 8
error: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]

Change-Id: Id9f791c78e45d2373c3c1ce57059ef1e973a2fb1
hange-Id: I25597a730efcd580a1dd327d4fc38ab940a8b4d8
Reviewed-on: https://code.wireshark.org/review/27263
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-03 04:12:14 +00:00
chinarulezzz ec0f8e6c36 fix missing parentheses in 'if' statement
Change-Id: I47f8566c4410d6aac1111b35fff3b044c14bc70b
Reviewed-on: https://code.wireshark.org/review/27079
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-03 04:09:42 +00:00
Gerald Combs 46b0099588 Remove a leftover Makefile.
Change-Id: I210a4fd8f77687c5d7050feedb1128df728b2f3b
Reviewed-on: https://code.wireshark.org/review/27057
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-02 23:39:15 +00:00
Pascal Quantin 875e34c88f QUIC: fix compilation with gcc 8
error: cast between incompatible function types from ‘void (*)(quic_info_data_t *)’ {aka ‘void (*)(struct quic_info_data *)’} to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]

Change-Id: I2827dd741145c0c9eb77205979497f4a39ecbb21
Reviewed-on: https://code.wireshark.org/review/27261
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-02 19:31:35 +00:00
Pascal Quantin 42d43ada2e TWAMP: fix compilation with gcc 8
error: cast between incompatible function types from ‘gint (*)(const void *)’ {aka ‘int (*)(const void *)’} to ‘gint (*)(const void *, const void *)’ {aka ‘int (*)(const void *, const void *)’} [-Werror=cast-function-type]

Change-Id: Ifbd57414ecea16b76321c2b7d3db1a5d0a11a888
Reviewed-on: https://code.wireshark.org/review/27262
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-02 18:22:36 +00:00
Pascal Quantin 966c595782 GTP: fix compilation with gcc 8
error: cast between incompatible function types from ‘void (*)(const void *, void *, void *)’ to ‘gboolean (*)(const void *, void *, void *)’ {aka ‘int (*)(const void *, void *, void *)’} [-Werror=cast-function-type]

Change-Id: If93eb9a4f38b622ae5dfaf9ed1e2c3d257141105
Reviewed-on: https://code.wireshark.org/review/27260
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-02 17:53:40 +00:00
Stig Bjørlykke cf4d7ad946 btle: Show correct LLData Timeout value
The spec states that connSupervisionTimeout = Timeout * 10 ms

Change-Id: I89494c74d80b63c85f001540ea79850736457b21
Reviewed-on: https://code.wireshark.org/review/27255
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-05-02 11:41:18 +00:00
Pascal Quantin ff2c8ef00f VITA 49: add an explicit option to activate Ettus UHD header workaround
Bug: 14641
Change-Id: Ie3259a831c3736f8879b1e87f3dff31d6d036b40
Reviewed-on: https://code.wireshark.org/review/27249
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-02 10:41:39 +00:00
Pascal Quantin 5cc6cd3ae6 IEEE 1905.1a: use col_add_str to add non const strings
Bug: 14647
Change-Id: I112d47e459e71648dccf331d56b8c70f44d01134
Reviewed-on: https://code.wireshark.org/review/27250
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>
2018-05-02 10:41:14 +00:00
Peter Wu f7296644c5 prefs: fix importing some old protocol preferences
Some preference modules did not exist, so importing would not work.
While vuze-dht used to have a configurable protocol name, it no longer
supports that, so remove it from the list.

Add some sanity checks to prevent bug 14316 from going undetected again,
and to ensure that dead code is removed when prefs are removed.

Change-Id: I5df809af66a6c19f9eb9a6b75d5e60c96008cde4
Fixes: v2.3.0rc0-971-g268841f3e0 ("Combine Decode As and port preferences for tcp.port dissector table.")
Reviewed-on: https://code.wireshark.org/review/27227
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-02 04:09:57 +00:00
Alexis La Goutte 15f1b0b5e4 mgcp: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I966ce64a908e5f8bf04ce02bc8551367eba4a260
Reviewed-on: https://code.wireshark.org/review/27219
Reviewed-by: Hadar Shoham <hadar.shoham@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-05-02 04:05:37 +00:00
Dylan Ulis 48ab9adbd5 obex: Fix request response arrows
They were flipped. See https://wiki.wireshark.org/SampleCaptures,
Bluetooth_HCI_and_OBEX_Transaction_over_USB.ntar.gz, packets 153136/153140
for an example.

Change-Id: Iaac853fad16e97ff88ba38a7b4c5cbbdd13052b3
Reviewed-on: https://code.wireshark.org/review/27206
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-05-01 10:29:03 +00:00
Peter Wu 2ed9115a4b prefs: fix crash when setting certain obsolete port preferences
Loading an old Wireshark profile with certain deprecated preferences
could result in a crash due to type confusion. If the new preference was
a range type, then four bytes of the pointer (address) to the range was
overwritten with the numeric value of the deprecated preference.

Minimal reproducer:

    tshark -opgm.udp.encap_ucast_port:0 -r ../test/captures/empty.pcap

Bug: 14316
Change-Id: Ia8dc24f81f6b2e6494448dadffe810606765cb9e
Fixes: v2.3.0rc0-971-g268841f3e0 ("Combine Decode As and port preferences for tcp.port dissector table.")
Reviewed-on: https://code.wireshark.org/review/27226
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-01 10:27:53 +00:00
Kenneth Soerensen 82824fd394 ZigBee: Add remaining attributes from Smart Energy Device Management cluster
Bug: 13360
Change-Id: Ifc7251aad62b7cb0010956d1a36a4ccbe9e3ee7c
Reviewed-on: https://code.wireshark.org/review/27187
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-05-01 10:25:15 +00:00
Darius Davis 6e4caf3d90 BOOTP BSDP: Allow "pad" and "end" suboptions.
Apple bsdpd uses the same routine to parse BSDP suboptions as it uses to parse
the DHCP options, which means that the "pad" (0) and "end" (255) options (as
described in RFC 2132) are also accepted as BSDP suboptions.  Just like when
used as DHCP options, they do not follow the usual TLV template: They do not
have a length field and do not have any value, so they always consume exactly
one byte.

This change enhances the BSDP suboption dissector to accept the "pad" (0) and
"end" (255) suboptions, without any stored length or value.

Apple firmware/software does not issue BSDP "pad" or "end" suboptions, but will
tolerate them in received packets.  At least one 3rd-party BSDP implementation
(the Dell KACE K2000 appliance) includes a BSDP "end" suboption in packets it
sends.  Prior to this fix, function dissect_vendor_bsdp_suboption was expecting
a length for these suboptions, leading to dissection failing with error
"Suboption 255: no room left in option for suboption length".

For further discussion -- in which the exact same issue is found to affect
VMware virtual machine firmware -- refer to the VMware Communities forum thread
at https://communities.vmware.com/message/2459144#2459144 .

Interestingly, when Apple's bsdpd finds an "end" BSDP suboption, it simply
records that an "end" was encountered, and continues parsing until the whole of
the vendor options blob is consumed.  The BSDP suboption dissector required no
modification to match that behavior.

Testing Done: Built Wireshark on Linux amd64.  Loaded a BSDP ACK[LIST] from a
   Dell KACE K2000 appliance; Previously it would issue an error about there
   being insufficient room for the length of the "end" suboption, and now it
   parses correctly.  Modified the packet to include a string of "0" and "255"
   suboptions, and observed that they were parsed as expected: One byte each,
   no subtree, no length, and parsing continues afterwards.  200,000 iterations
   with tools/fuzz-test.sh using the original BSDP packet, 4,000 of which were
   under Valgrind.

Change-Id: I1786414b2ef0b8726d989a566d0e8a3525d516b8
Reviewed-on: https://code.wireshark.org/review/27210
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-05-01 10:23:00 +00:00
Alexis La Goutte b768386f35 gsm_r_uus1: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I87b65113a8794b6ab0583c5d0dd4123fa0bd7ba7
Reviewed-on: https://code.wireshark.org/review/27218
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-01 10:20:46 +00:00
Alexis La Goutte d56273a8d0 bfcp: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I46cd2392022b5fb64e997c74650f6a2002f519c6
Reviewed-on: https://code.wireshark.org/review/27216
Reviewed-by: Ivan Nardi <nardi.ivan@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-01 10:18:41 +00:00
Pascal Quantin 89515306ab TPM20: fully initialize tpm_entry structure
Bug: 14640
Change-Id: I2d7128e4da9d1568d7ef4ef7351abc1660554698
Reviewed-on: https://code.wireshark.org/review/27236
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-05-01 09:18:39 +00:00
Pascal Quantin 1d4734a26e TPM20: add file to .editorconfig
Change-Id: Ic2860ebfb354b9f6fa764881beee1b1881ad4e00
Reviewed-on: https://code.wireshark.org/review/27235
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-05-01 08:49:16 +00:00
Stig Bjørlykke 488c831790 Use common indenting space in heading
Change-Id: I47022f9c7d568ca6d9705ba63c669a980822818a
Reviewed-on: https://code.wireshark.org/review/27229
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-01 06:55:55 +00:00
Darius Davis 295abe2e83 LDSS: Fix a read overrun in dissect_ldss_transfer.
dissect_ldss_transfer had a trivial read overrun: "line" was not
NUL-terminated, and strtol/g_ascii_strtoull will keep reading and discarding
any leading whitespace, so a malformed LDSS packet (with only whitespace
characters following the tag on a "Size:"/"Start:"/"Compression:" line) could
trigger a read overrun.

Let's replace the tvb_memdup with tvb_get_string_enc, which does some checking
of the input characters (which, it seems, must always be ASCII), and produces a
neat NUL-terminated string.

Testing Done: On Linux x64, ran "valgrind tshark -r fuzz-2018-04-23-14422.pcap"
   without the fix (to reproduce the failure), and then with the fix, and
   observed that no errors were reported anymore after the fix. 60,000 iters of
   fuzz-test with ldss_filtered.pcap as input, plus 1,000 iters under valgrind.
   Launched wireshark and opened ldss_filtered.pcap, and examined the dissection
   of the "ldss and tcp" packets; All looks good.

Bug: 14615
Change-Id: I3fccc4ffbe315a3cff6ea03cc7db37f884b0582c
Reviewed-on: https://code.wireshark.org/review/27204
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-04-30 13:18:24 +00:00
Alexis La Goutte 418ddf4fa7 pdcp-nr: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I4f6ab2ff54c1b5d6c4892b6e76d47b5107c0a197
Reviewed-on: https://code.wireshark.org/review/27220
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-04-30 12:59:58 +00:00
Pascal Quantin adcc41ce36 NAS EPS: fix dissection of UE security capability IE
Change-Id: Ie1a749eb2abb522aadec06a01baa10ba2211443b
Reviewed-on: https://code.wireshark.org/review/27214
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-30 11:55:23 +00:00
João Valverde 9988267d1b Lua: Remove autotools specific code for build path
Change-Id: I541bd728c159e95c2d5daa8ce0bfea3961ff1db9
Reviewed-on: https://code.wireshark.org/review/27203
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-04-30 11:15:10 +00:00
Peter Wu b9f915eeef Lua: ensure that DATA_DIR and USER_DIR have trailing slashes
These directories have had trailing slashes for years and users seem to
rely on it, so restore this assumption for backwards compatibility. The
underlying API function (Dir.persconffile_path()) is not changed because
trailing slashes were not documented for that function.

For consistency, ensure that all Lua Dir functions return paths without
trailing slashes.

Bug: 14619
Change-Id: Ia299864999578884b1ad1cd48f1bd883bce6879d
Fixes: v2.5.0rc0-579-gfb052a637f ("Use g_build_filename() instead, fix indentation")
Reviewed-on: https://code.wireshark.org/review/27166
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-04-30 10:33:46 +00:00
Stig Bjørlykke d8ba341856 lwm2mtlv: Add interpretations checks
Only show value as String if valid as UTF-8 string.
Only show value as Boolean if 0 or 1.

Change-Id: I56168faafff9eaeeb21ec6d57b850013bbb94c33
Reviewed-on: https://code.wireshark.org/review/27212
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-04-30 08:58:52 +00:00
Jaap Keuter 35ca224066 Source files should not be executable files.
Change-Id: I2808e0378e4a06ed749c72033a618fd1e598ee31
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/27207
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-29 19:12:33 +00:00
Martin Mathieson 1a6daa235e DCT2000: Only look up old protocol name mappings if preference enabled
Change-Id: I871f7669c9303452f3407b65f83f68dee1ffc3bf
Reviewed-on: https://code.wireshark.org/review/27197
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-04-29 18:01:21 +00:00
Richard Sharpe 445ad8cd6b ieee80211: Improve support of the HotSpot 2.0 specification.
A number of mistakes have been found now that captures are available.

Change-Id: I883d71439f407ab9d90be878c9f52a5a300b9c8c
Reviewed-on: https://code.wireshark.org/review/27192
Petri-Dish: Richard Sharpe <realrichardsharpe@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-29 15:30:31 +00:00
Darius Davis e3541af62e Fix minor leak in filter_expression_new.
filter_expression_new was g_strdup()ing each of the strings in the "expression"
structure, but UAT is just going to immediately deep copy the structure (via
display_filter_copy_cb), so the copies made here are immediately leaking.

We could either free() these copies immediately after uat_add_record returns,
or skip the g_strdup altogether (which necessitates casting away the "const").
I chose the latter.

Testing Done: Linux x64 build.  With a display filter configured in
   ~/.wireshark/preferences, Valgrind no longer reports three leaks from here.

Change-Id: I7913f260875ced597b9027c8ae92a4d6d44f6414
Reviewed-on: https://code.wireshark.org/review/27157
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-04-28 16:28:18 +00:00
Stig Bjørlykke 3924c6e544 lwm2mtlv: Handle String data type as UTF-8
Display element value as bytes if value is not a valid UTF-8 string.
Add a new utility function isprint_utf8_string().

Change-Id: I211d5ed423b53a9fd15eb260bbc6298b0b8f46a0
Reviewed-on: https://code.wireshark.org/review/27178
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-28 06:19:48 +00:00
Michail Koreshkov b5fc9857c7 GSM-R protocol dissector
Dissector for GSM-R protocol. Specification ETSI TS 102 610.
Trace example in https://wiki.wireshark.org/SampleCaptures [[attachment:gsm-r.uus1.pcap]]

Change-Id: I7496bfa141d75b3460f7c3bdbb791e24d4810231
Reviewed-on: https://code.wireshark.org/review/26929
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-28 06:18:34 +00:00
Allan Møller Madsen 662210f3d5 Bluetooth HCI: Add missing LE event mask fields
Add missing BT5 bit fields to HCI LE Set Event Mask
command. Correct displayed field name.

Change-Id: Iacaba69226663e884b60ac5a75470de77317ea92
Signed-off-by: Allan Møller Madsen <almomadk@gmail.com>
Reviewed-on: https://code.wireshark.org/review/27177
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-27 14:59:06 +00:00
Hadar fa73f01728 MGCP: add support to local/remote voice metrics option
protocol specification: in the file header
NCS 1.5: PKT-SP-NCS1.5-I04-120412, April 12, 2012 Cable Television

Change-Id: I95a1d769cb08c0e8160ca6fcdb99dd98e0f085cc
Reviewed-on: https://code.wireshark.org/review/27077
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-27 06:55:40 +00:00
Peter Wu f9522d8a23 Qt: fix crash on dragging in packet dialog
"packet_dialog.cpp" does not use setCaptureFile, resulting in a NULL
dereference while trying to obtain the dissection context. Apply a fix
similar to v2.5.1rc0-121-g9198448f9d (pass a fixed dissection context to
ProtoTree). Additionally, fix a memleak and correct documentation.

Why not add "proto_tree_->setCaptureFile(cap_file_.capFile())" in
PacketDialog? Well, it also uses "proto_tree_->setRootNode(edt_.tree)"
which means that "cf_->edt" would be different from "edt_". If that is
the case, then "proto_construct_match_selected_string" will not return a
filter for FT_NONE fields (see the call chain in proto.c).

Bug: 14620
Change-Id: I6eeaf32b650a2095e15f64bbe64b54cdd545c7a9
Fixes: v2.5.0rc0-1608-g4d6454e180 ("Qt: Drag n Drop Filter expression from Packet Tree")
Reviewed-on: https://code.wireshark.org/review/27160
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-04-26 16:41:34 +00:00
Nikhil AP 962b2ba242 AVSP: Correct timestamp representation
This change reflects that the 64-bit timestamp in AVSP is in TAI
timescale and not UTC.

Change-Id: I13807ab446492c2b4f37a57989e1e0122afcc6aa
Reviewed-on: https://code.wireshark.org/review/27144
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: Roland Knall <rknall@gmail.com>
2018-04-26 15:04:11 +00:00
Stig Bjørlykke 46fcf452ac coap: Store ctype values in transaction tracking
Transfer ctype values from GET request to response to be able
to decode the payload correctly.

Change-Id: Ida7598aefbd3f245dd487d50562539395f130ac4
Reviewed-on: https://code.wireshark.org/review/27163
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-26 15:03:29 +00:00
Stig Bjørlykke 0f50b89f67 lwm2mtlv: Identifier and Length fields are big endian
The header Identifier and Length fields are using big endian encoding.

Change-Id: I1b557168ae467cc5eb63ada3991279cf080fa687
Reviewed-on: https://code.wireshark.org/review/27162
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-04-26 13:55:11 +00:00
Darius Davis bc58898512 BOOTP: Add latest IETF Processor Arch assignments.
The IETF has assigned many more Processor Architecture IDs since RFC 4578, so
let's add those to the BOOTP dissector.

There's also now a published erratum for RFC 4578's Client Architecture type
table, so we should update the dissector table to match.  Since it leads to a
relatively widespread (and difficult to troubleshoot) problem, let's add an
"expert info" warning when we see a packet specifying EFI BC as its Client
Architecture, since it is almost certainly intended to be EFI x64.

And, while we're here, RFC 4578 describes the Client Architecture type field as
an array of 16-bit values, so let's implement that too.

Testing Done: Examined packet captures from EFI DHCP with architecture ID 7
   (now displays as "EFI x64") and 9 (now displays as "EFI BC", with a warning
   to explain that "EFI x64" was probably intended).  Manually edited packets
   to contain multiple entries in the Client Arch option, and they all showed
   correctly (including the warning for type 9).  Manually edited a packet to
   contain an odd number of bytes for the Client Arch option, and saw the
   expected warning.  Ran 30000 iterations of fuzz-test.sh with a corpus of 5
   DHCP/PXE packets as input, and an additional 1000 iterations with the "-g"
   (valgrind) option.

Change-Id: I2ef153316141eb051785fc86f420ad2f721f2a76
Reviewed-on: https://code.wireshark.org/review/27155
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-04-26 12:30:06 +00:00
Tadeusz Struk 30629ce166 tpm20: Add TPM2.0 dissector
This adds support for the TPM 2.0 "protocol" as defined
by the Trusted Computing Group (TCG) specification.
The specification can be found here:
https://trustedcomputinggroup.org/tpm-library-specification/

The specification defines the format of the all TPM requests
and responses that this dissector supports.

A sample capture file that can be used for testing this
can be found in the https://wiki.wireshark.org/SampleCaptures
It is called policy-authorizeNV.pcap.

Change-Id: I557cb779f3adc5313e6d3498bbfeb56fdd308fbf
Reviewed-on: https://code.wireshark.org/review/26866
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-04-26 08:27:56 +00:00
Kenneth Soerensen 0a0cb44024 ZigBee: Place SE cluster attributes correctly in ZCL client and server
Change-Id: If495c51dd70af291905ef717ac3c6be5c1ab329d
Reviewed-on: https://code.wireshark.org/review/27122
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-04-25 19:56:48 +00:00
Guy Harris dfae664538 Fix indentation.
Change-Id: Ia38d4a9d04d99ab49baab7174c21e4040af0c800
Reviewed-on: https://code.wireshark.org/review/27153
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-25 18:06:00 +00:00
Pascal Quantin 0264b2fda6 F1AP: fix a typo in ASN.1 description
Change-Id: Ic24fddcff47615cbdee6811a195ee3e087bb9f03
Reviewed-on: https://code.wireshark.org/review/27142
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-25 08:06:11 +00:00
Peter Wu 6144951380 dfilter: fix memleaks with functions and slice operator
Running tools/dfilter-test.py with LSan enabled resulted in 38 test
failures due to memory leaks from "fvalue_new". Problematic dfilters:
- Return values from functions, e.g. `len(data.data) > 8` (instruction
  CALL_FUNCTION invoking functions from epan/dfilter/dfunctions.c)
- Slice operator: `data.data[1:2] == aa:bb` (function mk_range)

These values end up in "registers", but as some values (from READ_TREE)
reference the proto tree, a new tracking flag ("owns_memory") is added.

Add missing tests for some functions and try to improve documentation.

Change-Id: I28e8cf872675d0a81ea7aa5fac7398257de3f47b
Reviewed-on: https://code.wireshark.org/review/27132
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-25 06:57:00 +00:00
Alexis La Goutte 0de109ef57 x509ce: fix indent (use 2 spaces)
Change-Id: I48c74126a57945033dbe5c81c9bb92012af6c719
Reviewed-on: https://code.wireshark.org/review/27129
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-25 06:56:29 +00:00
Peter Wu 69e2603c48 ftypes: fix memleak when converting protocol values
When converting byte array strings to a FT_PROTOCOL value (for example,
when using a display filter such as `eth contains aa:bb`), the converted
memory in GByteArray was not freed. If an error occurred (the value
cannot be parsed as hex string), then an error message was leaked.

Fix the above issues and avoid an unnecessary g_memdup.

Change-Id: I3a076b3a2384b1a0e15ea8518f2e0f66a7b6ea49
Reviewed-on: https://code.wireshark.org/review/27130
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-25 06:55:52 +00:00
Peter Wu 35d9604be9 dfilter: fix small leak for filters containing ranges
A filter such as "data.data[1] == 2" would leak the GSList structure.

Change-Id: If57ffbdbf815434f6e11fb53ffa031dde370a9ec
Reviewed-on: https://code.wireshark.org/review/27131
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-25 06:53:22 +00:00
Peter Wu ab7bbaa93a addr_resolv: fix memleak of g_penterprises_path
Found by valgrind. Remove unnecessary "if" guard for g_free while at it.

Change-Id: I58a18472f2c82e4c6c810d3cb3eeb2358b64f4ab
Reviewed-on: https://code.wireshark.org/review/27133
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-25 04:09:48 +00:00
Peter Wu ee3bc52192 QUIC: fix NEW_CONNECTION_ID dissection (draft -11)
Since draft -11, NCI CID has become non-fixed with a length prefix. See
https://tools.ietf.org/html/draft-ietf-quic-transport-11#section-7.13

Only dissection is implemented, processing it for connection migration
will be done in the future.

Bug: 13881
Change-Id: I4be8c2eb306d5c1090b28ed2a6386c6c9006c561
Reviewed-on: https://code.wireshark.org/review/27107
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-24 20:30:44 +00:00
Peter Wu 79a59ddae1 QUIC: add (expert) info for connection-related info
Include "quic.connection.number" for easier filtering of a connection
and to detect which connection packets are associated with. Expert info
is shown when a packet cannot be associated (due to dissector bug or
protocol violations).

Bug: 13881
Change-Id: I097e41d1abff629d6f8cc25396bad60c6790e84e
Reviewed-on: https://code.wireshark.org/review/27099
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-24 20:29:14 +00:00
Ivan Nardi 167a6e03b2 gtp: update values used as accepted cause in session tracking
v1: TS 29.060 7.3.2: A PDP context has not been created in the GGSN if the
Cause differs from "Request accepted", "New PDP type due to network
preference" or "New PDP type due to single address bearer only"

v2: TS 29.274 8.4: Acceptance in a Response / triggered message:
"Request accepted", "Request accepted partially", "New PDN type due to
network preference" and "New PDN type due to single address bearer only"

Change-Id: I8d3b2fc3c35e4a3e3d281cf0e5c97f084616a05d
Reviewed-on: https://code.wireshark.org/review/27093
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-24 20:27:19 +00:00
Dario Lombardo e01fcb7a3c bluecom: fix compilation with gcc-4.
../epan/dissectors/packet-bluecom.c: In function 'dissect_bluecom':
../epan/dissectors/packet-bluecom.c:498:43: error: variable 'block' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
     guint cmd, flags, blocknb, segcode=0, block;

Change-Id: I148ba4bc6b3e026f0626120235c59305b5204529
Reviewed-on: https://code.wireshark.org/review/27119
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-24 16:36:12 +00:00
Guy Harris c73ead608b Clean up a warning.
offset has to be volatile, as it's used in a loop that involves the
setjmp/longjmp-based TRY mechanism.

Instead of passing pointers to the offset to routines that dissect
headers, have the routines take the offset as an argument and return the
updated offset, to avoid having to mark said pointers as pointing to a
volatile variable.

Update comments while we're at it.

Change-Id: I3058a4e6a736c234ad7508521c9fe9da358b6096
Reviewed-on: https://code.wireshark.org/review/27109
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-24 07:36:30 +00:00
chinarulezzz 993b47eb40 remove redundant break statement
Change-Id: Ib6d4bbb1662d921fc4b5920b50e47d2b30ebb95c
Reviewed-on: https://code.wireshark.org/review/27103
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-24 04:33:12 +00:00
Dylan Ulis 17c6fb6709 Rename ENIP conversation menus to CIP
Even though these are (currently) implemented in the enip dissector,
these conversations are actually for different types of CIP connections.
This changes makes it obvious to CIP users/developers what these are.

EtherNet/IP (enip) is mainly the encapsulation layer that allows CIP to
function on Ethernet.

Change-Id: I760f832026e35aec412d51d80e85a997b341e0b4
Reviewed-on: https://code.wireshark.org/review/27086
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-24 03:47:01 +00:00
Peter Wu 84149ab769 TLS13: add draft-27 and draft-28 version numbers
TLS 1.3 draft 26 up to 28 are purely editorial, but since QUIC draft-11
will actually use the latest TLS 1.3 draft, add these versions. See
https://github.com/quicwg/base-drafts/wiki/5th-Implementation-Draft

Bug: 12779
Change-Id: I31316afa900c4b085caeed2529b388617211bff7
Reviewed-on: https://code.wireshark.org/review/27108
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-24 03:42:59 +00:00
Guy Harris 352b7a9fd5 Redo dissction of blocks in a bluecom packet.
It *looks* as if a bluecom packet has a count of blocks, and a sequence
of that number of blocks, with each one containing a block header and a
block data.

Dissect the packet in that fashion.  If we get an exception (other than
"we hit the snaplen") while dissecting a block, record it and step on to
the next block.

Don't try to avoid hitting the snaplen - we *want* that to be reported,
so the user knows that the capture only includes the first part of the
packet.

Change-Id: I1b668ffea9b67d3a6ff06100b868f7d941c1f509
Reviewed-on: https://code.wireshark.org/review/27106
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-23 22:01:48 +00:00
chinarulezzz 40de0010bb fix link speed indication
Change-Id: I01351f6b4693ef5135c508124bce2d0aff8c8208
Reviewed-on: https://code.wireshark.org/review/27102
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-23 19:18:29 +00:00
Peter Wu 5d69e82ace QUIC: fix short header decryption (draft -11)
Now that the DCID is known from the connection, fix offset calculation.

Bug: 13881
Change-Id: Ic64505247ec0e2d1de2bd5153e4d2264be5114c2
Depends-On: I58740c38bb62400d22481a26f83f247f9b539d56
Reviewed-on: https://code.wireshark.org/review/27098
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-23 18:55:19 +00:00
Peter Wu ec30d0b004 QUIC: implement connection migration (draft -10 and -11)
QUIC connections can survive address and port changes and should not be
tracked per UDP conversation, but by Connection ID instead. To make this
possible, early on (before full dissection), DCID and SCID are parsed
from the header and then used to associate packets with new or existing
QUIC connections.

Previously a "connection" was always created when missing (in a
conversation). Now it will only be created if an Initial Packet is
found (by DCID or address + port). If not found, as side-effect packet
number tracking will fail. This can be changed if needed.

This work also prepares for proper draft-11 short packet dissection and
use of NEW_CONNECTION_ID frames. Additionally, it now assumes draft 11
rather than draft 10 if the version number is not recognized.

Only tested with ngtcp2-10.pcap which has a single UDP conversation.

Bug: 13881
Change-Id: I58740c38bb62400d22481a26f83f247f9b539d56
Reviewed-on: https://code.wireshark.org/review/27068
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-23 18:54:17 +00:00
Peter Wu 88576ea658 QUIC: fix decoding of initial_max_streams_uni/bidi
These fields have always been 16-bit values, see
https://tools.ietf.org/html/draft-ietf-quic-transport-11#section-6.4.1

Noticed with picoquic-11.pcap, note that ngtcp2-10.pcap triggers the
expert info due to a bug fixed in ngtcp2 2939ff618e4a.

Bug: 13881
Change-Id: I867703f5399f3d9c2cfe7d0488f4be83c0a5b4a2
Reviewed-on: https://code.wireshark.org/review/27097
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-23 18:53:50 +00:00
Peter Wu a8b71410a5 QUIC: fix decryption with long header (draft -11)
The header length has increased in draft -11.

Bug: 13881
Change-Id: Iaa3f4cb14b88a3c5cb53373245c1929113910893
Reviewed-on: https://code.wireshark.org/review/27096
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-23 18:52:59 +00:00
Pascal Quantin 2ce6ce1fca PDCP NR: tweaks for framing format
For optional tags that act as a boolean, their presence is sufficient
and not need to set a value after them.

Change-Id: I3b4a6bbbdacf1a008e8df90a20c4eede4b0db1bd
Reviewed-on: https://code.wireshark.org/review/27095
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-23 18:05:50 +00:00
Pascal Quantin 703ec9ad84 NAS EPS: chack the protocol discriminator used in the security header
Change-Id: Idc82f182190adb6e87d2f796ca7acb9bf6b88443
Reviewed-on: https://code.wireshark.org/review/27092
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-23 16:03:51 +00:00
Ivan Nardi 0e97450e61 Camel/Inap: add missing sub-trees
Change-Id: I4a0ad70d264914f9d407305ec8d577f79c92a095
Reviewed-on: https://code.wireshark.org/review/27091
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-23 10:36:35 +00:00
Guy Harris 83ecd46776 Add more bounds checks.
If the calculated packet length in the header is bigger than the actual
packet length value from the header, reject the packet.

Change-Id: I86cb24c66ee0d6fd2ed6f9240d44c1adc5f0bf91
Reviewed-on: https://code.wireshark.org/review/27087
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-23 03:32:08 +00:00
Guy Harris 4f492559c6 Fix more indentation.
Change-Id: I76aa377c5db4c94c5cee40913d67863dd10d1498
Reviewed-on: https://code.wireshark.org/review/27084
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-23 00:02:21 +00:00
Guy Harris 3e39ec64e4 Fix indentation.
Change-Id: I18a748cbe58e7ca1a7b17fa84c6d464913c216ff
Reviewed-on: https://code.wireshark.org/review/27082
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-22 22:05:30 +00:00
Guy Harris 6522647d11 Put protocol name before "length of contained item...".
It reads better, at least to me.

Change-Id: I4b11449ea32d77e95bfbc54029b7afed7ea17c64
Reviewed-on: https://code.wireshark.org/review/27081
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-22 21:45:48 +00:00
Guy Harris 826e0d5d9e Use tvb_new_subset_remaining() for a tvbuff that goes to end-of-packet.
Change-Id: I997ff6efbfbc2e11af47d689612ec0f288b4ab5d
Reviewed-on: https://code.wireshark.org/review/27078
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-22 16:11:56 +00:00
Harald Welte 265e81ca3c Dissector for the Osmocom GSUP Protocol
The Osmocom GSUP protocol is a light-weight alternative to the
classic GSM MAP protocol. It operates between (MSC|SGSN) and HLR.

Change-Id: I954c7e332dce3a8855f7f4ace0b878f66da6f02e
Reviewed-on: https://code.wireshark.org/review/25477
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-21 22:46:50 +00:00
Richard Sharpe 47d3897194 radiotap: Warn that the HE-MU header dissector needs a new version.
The radiotap HE-MU header is being completely reworked and likely expanded
in size. There are likely very few captures at the moment with such radiotap
headers. Rather than ripping the code out and seeing problems in the future
I have attempted to warn people who encounter such captures that they need
to upgrade. The standard will settle out soon.

Change-Id: I69eea20e2e65197a837a48706f9bcdddbbe42a63
Reviewed-on: https://code.wireshark.org/review/26995
Petri-Dish: Richard Sharpe <realrichardsharpe@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-21 22:45:55 +00:00
Dario Lombardo 81263704b9 wsutil: convert one leftover function in wsjson.
Change-Id: I8d65389dfd6bf373e751e3373d9f22d733d9b5e9
Reviewed-on: https://code.wireshark.org/review/27069
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-21 22:42:11 +00:00
Martin Mathieson d55499ed74 More 'abs_offset' initialisation needed for gcc 4.8.5 (Leap 42.3)
Change-Id: I1f2b797ade7d92596b5b42469e3161b6e373830b
Reviewed-on: https://code.wireshark.org/review/27070
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-21 22:40:32 +00:00
Georg Brandl 70fb344ab6 tango: update idl file and regen dissector with idl2wrs
Change-Id: I49a0e29a24804f7fec75935ac6c315d5c7ff48f1
Reviewed-on: https://code.wireshark.org/review/27066
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-21 12:05:05 +00:00
Dana Sy 328ccd4483 zbee: Changed encoding for zcl command IDs
The command ID was passing the value of the cmd_id instead of the
encoding for the proto_tree_add_item. This caused an issue with the
color control cluster where it wasn't parsing the command ID properly.

Change-Id: Iee42031146e37bb96182f765e79de47f6e4b5a04
Reviewed-on: https://code.wireshark.org/review/27064
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-21 10:08:19 +00:00
Dario Lombardo 57fee051c6 wsutil: rename wsjsmn to wsjson.
This puts more distance between the caller and the underlying
library. At the moment we're using libjsmn, but other libraries
(like json-glib) could be used.

Change-Id: I1431424a998fc8188ad47b71d6d95afdc92a3f9e
Reviewed-on: https://code.wireshark.org/review/27055
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-21 07:13:31 +00:00
Ivan Nardi 119a497652 Camel: add sub-tree for OriginalCalledPartyID i.e.
Change-Id: Ic66ef080cbd3b911ebd93f3fca8bd08bf7203802
Reviewed-on: https://code.wireshark.org/review/27051
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-21 07:10:26 +00:00
Alexis La Goutte e7f3f74ac7 GVRP: fix typo
I: libwireshark0: spelling-error-in-binary usr/lib/x86_64-linux-gnu/libwireshark.so.11.0.0 Endianess Endianness

Change-Id: I294979b36e389ab3d893aa7f0a6dcc4084a9c858
Reviewed-on: https://code.wireshark.org/review/27053
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-21 06:12:11 +00:00
Jeremy Browne ba6c8f08ac epan: Trivial constant sort order fix - sminmpec.h
Change-Id: I890a273dcc732551a9cb6ce4288efbb552c89576
Reviewed-on: https://code.wireshark.org/review/27062
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-21 06:10:35 +00:00
Guy Harris ccf495a838 Fix cpu_diag_eventid_fix_names table.
For a value_string_ext, the values must be in numerical order.

Change-Id: I43063b59a8c15d7d1fcdca07d4ae9fd89917427d
Reviewed-on: https://code.wireshark.org/review/27058
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-20 16:48:06 +00:00
Dario Lombardo 1a9f3b8f6d tvbuff: fix compilation with gcc-4.
../epan/tvbuff.c: In function 'tvb_new_octet_aligned':
../epan/tvbuff.c:274:26: error: 'abs_offset' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   *rem_len = tvb->length - *offset_ptr;
                          ^
../epan/tvbuff.c:486:8: note: 'abs_offset' was declared here
  guint abs_offset, rem_length;
        ^
../epan/tvbuff.c: In function 'tvb_find_line_end':
../epan/tvbuff.c:274:26: error: 'abs_offset' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   *rem_len = tvb->length - *offset_ptr;
                          ^
../epan/tvbuff.c:486:8: note: 'abs_offset' was declared here
  guint abs_offset, rem_length;
        ^
../epan/tvbuff.c: In function 'tvb_find_line_end_unquoted':
../epan/tvbuff.c:274:26: error: 'abs_offset' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   *rem_len = tvb->length - *offset_ptr;
                          ^
../epan/tvbuff.c:486:8: note: 'abs_offset' was declared here
  guint abs_offset, rem_length;

Change-Id: Iba9fe31ac5fcf604d65bbf3bceef0c09004c1b6c
Reviewed-on: https://code.wireshark.org/review/27050
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-20 10:48:26 +00:00
Peter Wu 89ff4070c0 QUIC: implement new header formats (draft -11)
Draft 11 swapped the Connection ID field with version in long packet.
CIDs are split into two and can now become up to 18 bytes. The column
will now display "DCID=1234" (or "SCID=1234" instead of "CID: 0x1234").

Recognize new short header flags, but maintain draft -10 dissection.
The VN and Long Header packet share much more common fields now, so pull
out some code from Long Header packets dissection.

Drop "LH", "SH" (can be inferred from other information) and
unabbreviate "VN" for columns.

Bug: 13881
Change-Id: Ifabd8f09f388f0c4c6afe78d939c1cff6b5f161b
Reviewed-on: https://code.wireshark.org/review/27009
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-20 10:46:46 +00:00
Ivan Nardi d7583cb713 BFCP: fix possible infinite loop
Bug: 14608
Change-Id: I483d7e79a974b7f2d41c6ea0771be7529a187ed3
Reviewed-on: https://code.wireshark.org/review/26950
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-04-20 10:44:23 +00:00
Alexis La Goutte 6d7d3ae77a PDCP-NR: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: Ib2d5c13c4f483866ac4b07942bf14a957a99dfeb
Reviewed-on: https://code.wireshark.org/review/27046
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-20 08:38:19 +00:00
Alexis La Goutte 2ac3cf1500 protobuf: fix typo reponse => response
Change-Id: Idca4c721d2f6f33ac5be5cc2637303c937d639e3
Reviewed-on: https://code.wireshark.org/review/27044
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-20 08:37:43 +00:00
Alexis La Goutte 7124fe6715 steam-ihs-discovery.c : fix typo Reponse => Response
Change-Id: I20157ce72b33b8b957d47fe6abcffb754ce4e5a2
Reviewed-on: https://code.wireshark.org/review/27043
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-20 08:37:28 +00:00
Alexis La Goutte 8f3dac1739 grpc: fix typo reponse => response
Change-Id: Ib0f230881426e300a8553aac14ea4d0efe87642c
Reviewed-on: https://code.wireshark.org/review/27042
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-20 08:37:10 +00:00
Ivan Nardi 79014a50c3 TCP: improve handling of unknown TCP options
Create protocol sub-tree, allow filtering for unknown/unsupported TCP options.

Change-Id: I9f51e3ac83e2fa97756a9f3a43f8cd2e15949e67
Reviewed-on: https://code.wireshark.org/review/27020
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-04-20 08:23:13 +00:00
ruengeler ac7e609b9f SCTP: INIT collision
Change-Id: I283ce92048af39ff4cf54e5e401e714bf6ec308b
Reviewed-on: https://code.wireshark.org/review/27023
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-04-20 08:23:05 +00:00
Alexis La Goutte e96c3d008e PTP: found typo adress => address
Change-Id: I79badcbca5b622961e7def403be4bc87ebfa776c
Reviewed-on: https://code.wireshark.org/review/27041
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-20 07:50:45 +00:00
Alexis La Goutte 5e3c899bee netlink-route: fix typo found by lintian
Change-Id: If0acdea872a8c999f5635f0965a64b121beeba48
I: libwireshark0: spelling-error-in-binary usr/lib/x86_64-linux-gnu/libwireshark.so.0.0.0 Adress Address
Reviewed-on: https://code.wireshark.org/review/27040
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-20 07:50:16 +00:00
Guy Harris 0a130c5756 Handle subset tvbuffs where the length goes past the end of the parent.
Add a "contained length" to tvbuffs.  For non-subset tvbuffs, that's the
same as the reported length.  For a subset tvbuff, that's the amount of
the reported data that was actually present in the "contained data" of
the parent tvbuff.

This is unaffected by the *captured* length of any tvbuff; that differs
from the contained length only if the capture was cut short by a
snapshot length.

If a reference is within the reported data, but not within the contained
data, a ContainedBoundsError exception is thrown.  This exception
represents a protocol error, rather than a reference past the captured
data in the packet; we treat it as such.

Change-Id: Ide87f81238eaeb89b3093f54a87bf7f715485af5
Reviewed-on: https://code.wireshark.org/review/27039
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-20 03:18:47 +00:00
Guy Harris 9011a25afc More indentation cleanups.
Change-Id: I7f87d4a636a539dfa8bd04cc5a91675d92ba4097
Reviewed-on: https://code.wireshark.org/review/27038
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-20 03:16:02 +00:00
Guy Harris 07c31a8e97 Clean up indentation.
Change-Id: I0a05245b5cd19a0ea9929a4e29f82bfe5e526793
Reviewed-on: https://code.wireshark.org/review/27037
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-20 03:12:50 +00:00
Guy Harris d5dc4677ed Update some comments.
We no longer have TVBUFF_ values corresponding to different types of
tvbuff; we have, instead, a set of method pointers for the different
types.  Refer to the types by name, rather than by TVBUFF_ value.

Expand the description of some fields in the tvbuff structure.

Change-Id: I38b5281df247ddd66b4e39abfc129053a012d241
Reviewed-on: https://code.wireshark.org/review/27036
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-20 02:58:36 +00:00
Alexandr Savca b545c60658 Fix cppcheck 1.83 warnings
[packet-ber.c:2687]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
[packet-erf.c:2475]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
[packet-fmp.c:378]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
[packet-http2.c:2050]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
[packet-obd-ii.c:643]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
[packet-yami.c:244]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour

Change-Id: Ie71f9f7c8f863d1e9c693bd56444f00bdad48042
Reviewed-on: https://code.wireshark.org/review/27019
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
2018-04-19 17:31:49 +00:00
Dario Lombardo fc6b8ab698 tshark: improve -G elastic-mapping command by adding filters.
The generated elastic mapping file is huge and it can hassle softwares
like Kibana. This change adds the ability to append desired filters
that will appear in the mapping file.

This change adds the option --elastic-mapping-filter <protocols> to tshark.

Example: tshark -G elastic-mapping --elastic-mapping-filter ip,udp,dns

make only those 3 protocols to appear in the mapping file.

Change-Id: Ie2dcd6e44be2d084e8e50cd6554bd90178da4e38
Reviewed-on: https://code.wireshark.org/review/27001
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-04-19 15:54:47 +00:00
Alexis La Goutte da7f5cdcec zbee-zcl (general) fix Unused href entry: epan/dissectors/packet-zbee-zcl-general.c: hf_zbee_zcl_scenes_extension_set
Change-Id: I034b4c4e71e7d797fef7f086c1227f45a4aee024
Reviewed-on: https://code.wireshark.org/review/27030
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Paul Zander <p.j.zander@lighting.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-19 14:26:20 +00:00
Alexis La Goutte fdb664c229 zbee-zcl (general): fix no previous prototype for ‘decode_setpoint’ [-Wmissing-prototypes]
Change-Id: I153a1da1ccc702ea39190442d1d815b6e364abb1
Reviewed-on: https://code.wireshark.org/review/27029
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-19 14:26:08 +00:00
Alexis La Goutte af0f34a6bb CIP: fix no previous prototype for ‘add_cip_pccc_function_to_info_column’ [-Wmissing-prototypes]
Change-Id: Id5737f6bc054ce4c51b28097b0db341f7debfe2e
Reviewed-on: https://code.wireshark.org/review/27028
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-19 14:25:52 +00:00
Peter Wu 9da25bc16f DNS: fix inverted condition for filtering error packets in stats
Change-Id: I9d867992e4f10c056c6070f0eb1aa0c8bb7cf117
Fixes: v2.5.2rc0-72-ga055e3c299 ("dns: skip stats if packet is within icmp.")
Reviewed-on: https://code.wireshark.org/review/27026
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-04-19 11:58:23 +00:00
Dario Lombardo f545cc5321 proto: use json_node_free instead of json_node_unref.
The latter is present in recent versions only.

Change-Id: I1da84ff0ba93ee4a3725163f0ed3a745466e201b
Reviewed-on: https://code.wireshark.org/review/27024
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>
2018-04-19 11:55:38 +00:00
Peter Wu b887fd4919 CMake: fix build with json-glib with gold linker
JSON-GLIB depends on GObject. To avoid "undefined reference to
'g_object_unref'" with the gold linker, include gobject directly.
As the files are included with the GLib package, adjust FindGLIB2.cmake.

Change-Id: I007d30b89cc07d8746cee6b619832a722f086105
Fixes: v2.9.0rc0-201-g511c2e166a ("tshark: add -G elastic-mapping report.")
Reviewed-on: https://code.wireshark.org/review/27007
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-04-19 08:08:11 +00:00
Guy Harris 735cfc8502 Clean up option handling.
If the option length is >= 2, so that it's long enough to include the
code and length, always put it into the protocol tree, even if the
length is invalid.  If the length is invalid, attach an expert info item
to the length field, rather than putting it into a top-level item of its
own.

Use a length of -1 for the top-level item for an option, rather than
what the length is supposed to be; that way, we don't throw an exception
if the option is too short - we just attach the aforementioned expert
info item to the length.

Change-Id: If2d987fa10739a7da28ca2c39515bfdf50da6ef9
Reviewed-on: https://code.wireshark.org/review/27018
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-19 02:34:11 +00:00
Guy Harris d5c4c6972e Fix tapo.
Change-Id: I1e5a39437e274aa8923e996241d2264dbd63e806
Reviewed-on: https://code.wireshark.org/review/27014
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-18 22:47:06 +00:00
Guy Harris 5f3e0f4ce2 Style cleanups.
Change-Id: I7aa236660f59fb267eeeaa67e3a811abc77f0c10
Reviewed-on: https://code.wireshark.org/review/27013
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-18 20:13:20 +00:00
Peter Wu c3b2519ea1 QUIC: add draft version and rename some transport parameters (draft-11)
Bug: 13881
Change-Id: Ia7c695ba081b4b744821744a6209f09ff87912fd
Reviewed-on: https://code.wireshark.org/review/27008
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-18 20:03:57 +00:00
Dario Lombardo 511c2e166a tshark: add -G elastic-mapping report.
This option generates an ElasticSearch mapping file as described here:
https://www.elastic.co/blog/analyzing-network-packets-with-wireshark-elasticsearch-and-kibana

It leverages the Glib-json library.

Change-Id: Iff25f991e87d3da07bf06654e353fb785799dde9
Reviewed-on: https://code.wireshark.org/review/26848
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-04-18 08:57:39 +00:00
Peter Wu 88435354c0 QUIC: fix short packet type, update error codes (draft -10)
The short packet type has changed, see
https://tools.ietf.org/html/draft-ietf-quic-transport-10#section-5.2

Change-Id: I92709d501e2e6918edae9077942753d93a8a3dae
Reviewed-on: https://code.wireshark.org/review/26994
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-18 03:49:25 +00:00
Peter Wu 9ec59502dc QUIC: implement PATH_CHALLENGE and PATH_RESPONSE frames (draft-10)
PATH_CHALLENGE and PATH_RESPONSE replace the PING frame.
https://tools.ietf.org/html/draft-ietf-quic-transport-10#section-8.16

Bug: 13881
Change-Id: I28e321d68e19640dc8a59536a526bf9ed8f7af2a
Reviewed-on: https://code.wireshark.org/review/26993
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-18 03:49:12 +00:00
Peter Wu 01363266c1 QUIC: initial draft-10 decryption support
Drop support for draft -08 and draft -09, add support for draft -10
handshake decryption only (requires a new salt as well as a HKDF label
change). Fixed a bug in qhkdf_expand (swapped length and "QUIC " label)
which affects KeyUpdate (which was initially untested).

Bug: 13881
Change-Id: I5f3e2fe71ef0fd929d3271ecea3a8870f90e3934
Reviewed-on: https://code.wireshark.org/review/26992
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-18 03:48:54 +00:00
Peter Wu 6a45dcd7a2 dfilter: require spaces as set element separator
Previously a filter such as `http.request.method in {"GET"HEAD""}` would
be parsed as three strings (GET, HEAD and an empty string). As it seems
more likely that people make typos rather than intending to construct
such a filter, forbid this by always requiring a whitespace separator.

Change-Id: I77e531fd6be072f62dd06aac27f856106c8920c6
Reported-by: Stig Bjørlykke
Reviewed-on: https://code.wireshark.org/review/26989
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-18 03:47:58 +00:00
Peter Wu 699ee5dc52 dfilter: make spaces around ".." optional in display filter
For numeric values such as port numbers, "4430..4434" looks more
natural than "4430 .. 4434", so support that.

To make this possible, the display filter syntax needs to be restricted.
Assume that neither field names nor values can contain "..". The display
filter `data contains ..` will now be considered a syntax error and must
be written as `data contains ".."` instead. More generally, all values
that contain ".." must be quoted.

Other than the ".." restriction, the scanner deliberately accepts more
characters that can potentially form invalid input. This is to prevent
accidentally splitting input in multiple tokens.  For example, "9.2." in
"frame.time_delta in {9.2.}" is currently parsed as one token and then
rejected because it cannot be parsed as time. If the scanner was made
stricter, it could treat it as two tokens (floats), "9." and "2." which
has different meaning for the set membership operator.

An unhandled edge case is "1....2" which is parsed as "1 .. ..  2" but
could have been parsed as "1. .. .2" instead. A float with trailing dots
followed by ".." seems sufficiently weird, so rejection is fine.

Ping-Bug: 14180
Change-Id: Ibad8e851b49346c9d470f09d5d6a54defa21bcb9
Reviewed-on: https://code.wireshark.org/review/26960
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-18 03:47:31 +00:00
Peter Wu 1ff82572ca dfilter: add range support to set membership operator ("f in {x .. y}")
Allow "tcp.srcport in {1662 1663 1664}" to be abbreviated to
"tcp.srcport in {1662 .. 1664}". The range operator is supported for any
field value which supports the "<=" and "=>" operators and thus works
for integers, IP addresses, etc.

The naive mapping "tcp.srcport >= 1662 and tcp.srcport <= 1664" is not
used because it does not have the intended effect with fields that have
multiple occurrences (e.g. tcp.port). Each condition could be satisfied
by an other value. Therefore a new DVFM instruction (ANY_IN_RANGE) is
added to test the range condition against each individual field value.

Bug: 14180
Change-Id: I53c2d0f9bc9d4f0ffaabde9a83442122965c95f7
Reviewed-on: https://code.wireshark.org/review/26945
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-18 03:47:02 +00:00
Dario Lombardo 4a156da068 Remove autotools build system.
It has been replaced by cmake.

Change-Id: I83a5eddb8645dbbf6bca9f026066d2e995d8e87a
Reviewed-on: https://code.wireshark.org/review/26969
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-18 03:46:17 +00:00
Anders 25a337cdb0 glib: Use g_slist_free_full() in a couple of places.
Change-Id: Iff833bf5c197959c8decb62d6ce794c6d0415fb7
Reviewed-on: https://code.wireshark.org/review/26978
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-17 15:01:24 +00:00
Harald Welte 3dab804250 lapdm: Hand B4 frames into a dissector supporting L2 pseudo-length
B4 frames have no length octet at L2 level, but instead a L2 pseudo
length octet at L3.  We must call the proper dissector for decoding
them, and gsm_a_ccch supports L2 pseudo length.

This addresses the LAPDm side of
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=14105

Ping-Bug: 14105
Change-Id: I5743dc6153a1adae60b8d9564f345861edc3fca4
Reviewed-on: https://code.wireshark.org/review/26798
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-17 14:26:11 +00:00
Harald Welte 91e0de19c9 rsl: Fix treatment of SACCH FILL / SACCH INFO MODIFY
The RSL SACCH INFO MODIFY / RSL SACCH FILL messages contain a
SI5 / SI6 / SI5bis / SI5ter message.  Those SI are (like the SI on CCCH)
sent as UI frame in downlink direction.  Since Phase 2, the "L2
pseudo-length field is part of the L3 message, and not stripped /
interpreted at L2.

3GPP TS 44.006 states that a special B4 frame format is used on the
SACCH downlink for UI frames, which is basically a normal B frame, but
with no length field at L2, shifting the length field into L3 where it
becomes the L2 pseudo-length.

From RSL, we need to call a variant of the RR dissector that is able to
decode a L3 message that includes a L2 pseudo-length.  This is,
paradoxically, not the "gsm_a_sacch" dissector, as that one is only used
for B-frames, i.e. actual LAPDm ABM frames.  We must use the "gsm_a_ccch"
dissector.

See also the discussion in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=14105
as well as https://lists.osmocom.org/pipermail/openbsc/2017-December/011545.html
and https://osmocom.org/issues/3059 for further background information.

Ping-Bug: 14105
Change-Id: Icdad2b7698d5d7d613cacceec6a3d848b946306c
Reviewed-on: https://code.wireshark.org/review/26797
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>
2018-04-17 14:09:26 +00:00
Gerald Combs ad84eec866 Switch the Doxygen API reference build to CMake.
Switch to a single Doyxgen configuration which was generated using a
recent version of Doxygen and customized to suit our needs. Add
wsar_html and wsar_html_zip targets to CMake. Update some Doxygen markup
and documentation as needed.

Change-Id: Ic8a424b292c35a26f74ae0b53322265683e56e69
Reviewed-on: https://code.wireshark.org/review/26976
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>
2018-04-17 03:46:05 +00:00
Gerald Combs 1d030928ef Remove some GTK+-only code.
Change-Id: Ic2498c7acd6a1a522be45094148402ee34a6b4d1
Reviewed-on: https://code.wireshark.org/review/26958
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>
2018-04-17 03:44:47 +00:00
Anders bb81bef535 glib: Get rid of GLIB_CHECK_VERSION as we now require 2.32.0
Change-Id: Ie95cf37f9cd283545693e290340a7489cc989c95
Reviewed-on: https://code.wireshark.org/review/26970
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-16 16:07:46 +00:00
Peter Wu ccff21854d Forbid leading, duplicated and trailing dots in field names
In order to simplify the display filter scanner, try to restrict the use
of dots ('.') in field names. Forbid leading dots, does not affect
current dissectors. Fix '..' typo in fpp dissector and forbid it. Forbid
trailing dots after fixing dissectors: some of them just have an excess
dot, others are missing a name after the dot.

Change-Id: I6e58a04ef0306ee8c16fbf6a3cabb076d7fc69c9
Reviewed-on: https://code.wireshark.org/review/26967
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-16 15:44:08 +00:00
Peter Wu f9ed58759f ssl: fix duplicate dissections with multiple PDUs in a stream
The previous fix was incomplete and would still result in duplicate PDU
dissections starting from the second reassembled PDU in a TLS stream.
The reason for that is that "nxtseq" is the absolute offset within a TLS
application data stream where the current segment ends while the
reassembled PDU length ("ipfd_head->datalen") is likely smaller than
"nxtseq".

Note: this fix assumes that the there won't be another (partial) PDU
following a reassembled PDU in a single packet (that is, the condition
"nxtseq > msp->nxtpdu" is assumed not to occur). If that is not the
case, a different issue occurs which needs another fix (more work):
"Reassembly error, protocol SSL: Frame already added in first pass".

Change-Id: Ib546f6e85baa0670c2c6a31ee8de87422004ecf3
Bug: 14596
Fixes: v2.1.0rc0-1521-gcefd1d4910 ("ssl: avoid duplicate PDU dissections")
Reviewed-on: https://code.wireshark.org/review/26935
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-16 15:34:51 +00:00
Alexis La Goutte 38ff2e743f QUIC: Add initial support of draft-10
Drop support of draft-08 and draft-09

with draft-10, PONG frame type is remove (and ACK use the same value)"

Bug: 13881
Change-Id: Iaf99da18bf8cc4fcfc43bbed2d60d6978405651c
Reviewed-on: https://code.wireshark.org/review/26964
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-16 14:26:00 +00:00
Gerald Combs 80256442af More PortAudio removal.
Change-Id: Ib56212e09d41fc76494d8186c77541302700104c
Reviewed-on: https://code.wireshark.org/review/26952
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-15 16:49:53 +00:00
Gerald Combs 1ab40c87ea [Automatic update for 2018-04-15]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I50b0c7211bfde3e0a17b4580e18fa423ab8fbdf1
Reviewed-on: https://code.wireshark.org/review/26953
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-15 16:19:41 +00:00
Robert Grange 0efafe8616 packet-mq: Fix for Missing Const
Fix to fill in some missing const in Display

Change-Id: Ic9fa51eef84cefffc29f7424246e707c560ba1d0
Reviewed-on: https://code.wireshark.org/review/26892
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-15 06:37:13 +00:00
Jaime Caamaño Ruiz b2c971d9ce openflow: fix decode of experimenter OXM fields
No longer report decoded experimenter values as undecoded which
was causing incorrect offset handling.

Change-Id: If902f8c8c5b53b8062e88229d67728bb67557062
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
Reviewed-on: https://code.wireshark.org/review/26888
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-15 05:36:26 +00:00
Joerg Mayer 0d31ec328f Check for HAVE_LZ4FRAME_H in the LZ4 detection process and use it
Change-Id: I919621b8c4c809eb181d563251eeb099b767ad82
Reviewed-on: https://code.wireshark.org/review/26940
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-15 05:34:08 +00:00
Guy Harris 93c60b3b7c Clean up whitespace.
Change-Id: Ifdd6f1e96a01f040375639f6d09e56241798b346
Reviewed-on: https://code.wireshark.org/review/26949
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-15 02:42:30 +00:00
Guy Harris c10fe98fcd Expand and clean up comments.
Change-Id: Ie87615c664e3fec70356f86675b219c7a6462417
Reviewed-on: https://code.wireshark.org/review/26948
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-15 02:40:50 +00:00
Guy Harris e4d3916530 Clean up the way we handle the FCS.
For the "802.15.4 with FCS" link-layer type, strip what FCS we find, if
any, off and use that new tvbuff for all dissection except for
checking and dissection of the FCS itself.

For the "802.15.4 without FCS" link-layer type, don't fake an uncaptured
FCS by increasing the reported length, just use the tvbuff as is.

This means we handle 802.15.4 the same way we handle other link-layer
types where the FCS might, or might not, appear as part of the captured
data.

Change-Id: Ia91b7fb0aad495876be00bf813c6b6517e5e11d7
Reviewed-on: https://code.wireshark.org/review/26947
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-15 01:47:18 +00:00
Krishnamurthy Mayya 4994955600 DTN: Minor changes for Bundle-Integrity/Confidentiality Block payload
Change-Id: I0d4458e02c9e1f747659fb116906ca44515a9033
Reviewed-on: https://code.wireshark.org/review/26941
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-14 21:01:35 +00:00
Michał Łabędzki 8c1a61e7b1 Bluetooth: ATT: Fix cast-warnings
1. Use explicit cast from gint16 to gint then to gdouble
   - I can understand my compiler - implicit cast is not explicit cast
2. Fix const cast by remove "const" from one field but add it whenever
   possible in other places

Change-Id: Iab7401f972c40bca2df58f91b89e29cf2d7cf11b
Reviewed-on: https://code.wireshark.org/review/26917
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org>
2018-04-14 20:12:06 +00:00
chinarulezzz 89076e6a5d packet-pcep.c: opposite inner 'if' condition leads to a dead code block
Change-Id: I13e32d7f333c3e50085c0008d7677f4c6d0611d4
Reviewed-on: https://code.wireshark.org/review/26928
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-14 08:46:31 +00:00
Pascal Quantin 2d0f894140 PDCP NR: remove a now meaningless comment
Change-Id: Ie234abdad7be9fd6f68d6676bae37286ee5dca2f
Reviewed-on: https://code.wireshark.org/review/26938
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-14 07:01:44 +00:00
Pascal Quantin a892493e49 PDCP LTE: reuse existing pdcp_lte_info structure after first pass
Change-Id: I3fbd95cbdbf958d4b6b93f0b7511be9ee772608c
Reviewed-on: https://code.wireshark.org/review/26932
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-14 06:56:06 +00:00
Pascal Quantin 0ca6fda9f0 RLC LTE: reuse existing rlc_lte_info structure after first pass
Change-Id: I0f0022ec1d04b466e9725684708088486d5f181c
Reviewed-on: https://code.wireshark.org/review/26931
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-14 06:55:18 +00:00
Pascal Quantin 3571cb7c01 MAC LTE: reuse existing mac_lte_info structure after first pass
Change-Id: I2e6c9067b8c4d8b318f79c6ad9e924af234a6b78
Reviewed-on: https://code.wireshark.org/review/26930
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-14 06:54:04 +00:00
Pascal Quantin d66790a82b PDCP NR: reuse existing pdcp_nr_info structure after first pass
Change-Id: Ief847244d8f989e2639a0dbcf96e2c7a7b1fb69a
Reviewed-on: https://code.wireshark.org/review/26933
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-14 05:42:53 +00:00
chinarulezzz cca3c926c8 packet-tns.c: add TODO to TNS Refuse packet dissector
Change-Id: If5f8cf73eb878fa3feb31ba32d576d75a293e314
Reviewed-on: https://code.wireshark.org/review/26927
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: Roland Knall <rknall@gmail.com>
2018-04-14 05:42:40 +00:00
Alexis La Goutte 4fab4f678c x509ce: fix display of IPAddress when it is an IPv6 Address
According to RFC 5280 (Section 4.2.1.6. Subject Alternative Name), an
iPAddress can be either four (IPv4) or sixteen octets (IPv6).

Bug: 14603
Change-Id: I6894f78c8e3f2a1b10940379397c87bbf981d4d6
Reviewed-on: https://code.wireshark.org/review/26891
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-14 05:42:28 +00:00
Pascal Quantin 75244c6b54 PDCP NR: add expert info for unknown / missing UDP framing tags
Change-Id: I1b71d30e5e6d5a63e14fc6daf8e2cca2b9b6f7f6
Reviewed-on: https://code.wireshark.org/review/26915
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-13 16:28:01 +00:00
Pascal Quantin b78577f1bc RLC NR: add an expert info for unknown UDP framing tags
Change-Id: I8a103840b3c795ce76c8a1af04a5751d6901e62f
Reviewed-on: https://code.wireshark.org/review/26914
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-13 16:27:31 +00:00
Pascal Quantin 55b2016283 MAC NR: add an expert info for unknown UDP framing tags
Change-Id: I03013e02856508179d1d75ece5d5c215b947eeb4
Reviewed-on: https://code.wireshark.org/review/26913
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-13 16:27:02 +00:00
Pascal Quantin 75a63c6dfa PDCP LTE: add expert info for unknown / missing UDP framing tags
Change-Id: Iafeb49b529da4f62149124193326a4ff6c3960b9
Reviewed-on: https://code.wireshark.org/review/26912
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-13 16:26:33 +00:00
Pascal Quantin 209d861947 RLC LTE: add expert info for unknown / missing UDP framing tags
Change-Id: I252c63f7104ce92de5d72e5e3ea40e3e45d76add
Reviewed-on: https://code.wireshark.org/review/26911
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-13 16:26:13 +00:00
Pascal Quantin 38a806a94e MAC LTE: add an expert info for unknown UDP framing tags
Change-Id: I505e1df17d468c84f363c3be0ac5e2c29c85ca23
Reviewed-on: https://code.wireshark.org/review/26910
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-13 16:25:41 +00:00
Pascal Quantin 5f4ffa2c76 UMTS RLC: add expert info for unknown / missing UDP framing tags
Change-Id: I29dbeaf0d90bab4c10b4674bfa983f7f5f26027b
Reviewed-on: https://code.wireshark.org/review/26909
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-13 16:25:10 +00:00
Dario Lombardo 0b62dce005 kafka: raise the required version to 1.5.0 for lz4_frame.
Change-Id: I25619260572163872915c56bcf242e8ff8190b47
Reviewed-on: https://code.wireshark.org/review/26890
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Tested-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-04-13 09:19:36 +00:00
Martin Kaiser 01f85e7b01 file-pcap: expert info if captured len > reported len
Bring up an expert info if the file contains a record whose captured
length is larger than the reported length. Abort the dissection in this
case since we rely on those lengths to find the next record.

Change-Id: If249d0fe670373417bbfef6759edc0b020a9f5cb
Reviewed-on: https://code.wireshark.org/review/26885
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Craig Jackson <cejackson51@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-13 07:28:27 +00:00
Guy Harris 0561501505 Fix the length of the payload of a private_1 or audio PES packet.
The length field's value doesn't include the length of the length field
itself.

Change-Id: Icd0cc2721a32212296929d248b9305b0f4a051e6
Reviewed-on: https://code.wireshark.org/review/26920
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-13 00:57:32 +00:00
Pascal Quantin 49470c15af RoHC: IP version is 1 byte only
Change-Id: I533b9d3ef37af9aa13a20c9af82a8a75cd73e9ad
Reviewed-on: https://code.wireshark.org/review/26895
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-12 14:55:23 +00:00
Pascal Quantin 1e82b9035c PDCP NR: add SN length to PDCP context for user plane PDUs
Change-Id: I49d215e65e424e605179747d350d4f36ccbc0d92
Reviewed-on: https://code.wireshark.org/review/26894
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-12 08:00:07 +00:00
Pascal Quantin b5ca12a88e PDCP NR: rework UDP framing format
Change-Id: I6f4a17ed91d4cb6ea39b5938add6ee882b033687
Reviewed-on: https://code.wireshark.org/review/26893
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-12 08:00:00 +00:00
Guy Harris d0d0cf05cc Update a comment.
We don't just reassemble DOCSIS MAC frames, we reassemble other forms of
higher-level packet atop an MPEG Transport Stream as well.

Change-Id: If6e709a8d2d3e574fbaedb1fcac74797c5664aa5
Reviewed-on: https://code.wireshark.org/review/26905
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-12 05:01:45 +00:00
Guy Harris 148f39d900 Need to flag a variable as volatile, due to the use of exceptions.
The exception mechanism is setjmp/longjmp-based, so we need to mark
offset as volatile, otherwise the longjmp might not restore its value.

Change-Id: Ib63070bbbbe1f16a93cb58aa7ee5ef2a5488df8a
Reviewed-on: https://code.wireshark.org/review/26901
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-12 02:28:43 +00:00
Guy Harris 81f184bc00 If a subdissector throws an exception, catch it and continue.
That way, some exception thrown higher in the protocol stack doesn't
stop us from dissecting the next TSP.

Change-Id: Ib756e5d62806caf0edd4e4ded18bb94000653d39
Reviewed-on: https://code.wireshark.org/review/26897
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-12 00:46:31 +00:00
Dario Lombardo 0c30760c95 kafka: check lz4 version in a single point.
This allows a better check of the required version.

Change-Id: I6c4aab67c73434aff4ad744caa2d0add9ec6225c
Reviewed-on: https://code.wireshark.org/review/26889
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-11 23:05:57 +00:00
Filip Sohajek 205505d9c8 Netlink: Add rtnetlink attribute dissecting
This patch adds dissecting of several attributes in RTM_NEWLINK and
RTM_NEWADDR.

Change-Id: Iab476e7439a9bcbc25e70cded67bc371788baec4
Reviewed-on: https://code.wireshark.org/review/26830
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-11 23:02:02 +00:00
Pascal Quantin 98826de8e5 LPP: fix a typo in ASN.1 file
Change-Id: Id3189b5617aff853d85029624d7e160d48dd1f36
Reviewed-on: https://code.wireshark.org/review/26896
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-11 21:14:27 +00:00
Matej Tkac f2d89daf28 PFCP: Added dissection of IEs 127-131
According to 3GPP TS 29.244 v15.1.0

Change-Id: Idcaad3eccf0bd5c9cc57eca5038313fd14916963
Reviewed-on: https://code.wireshark.org/review/26859
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-11 08:32:57 +00:00
Stig Bjørlykke b79d2bc9a3 user_encap: Avoid a hash lookup to get dissector name
The dissector handle is already known so it's no need to fetch
this again using find_dissector().

Change-Id: Id48066ab881f2b80ec9e3a6e86bc1e41f32cd1ec
Reviewed-on: https://code.wireshark.org/review/26873
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-04-11 07:49:51 +00:00
Dana Sy 4685dea443 ZigBee: MGMT Unsolicited Enh NWKUpdate dissector
Added a dissector for the mgmt_nwk_unsolicited_enhanced_update_notify
from the R22 spec (clusterID = 0x003b)

Change-Id: I5d60ef0a762f932a7f814743d1c219428c8f9e73
Reviewed-on: https://code.wireshark.org/review/26865
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-04-11 06:32:53 +00:00
Martin Kaiser bddd7577a3 zbee zcl: fill constant ett arrays at declaration time
This dissector defines a bunch of ett arrays, most of which contain a
constant list of ett entries. Fill those arrays directly when they're
declared, this is what the vast majority of other dissectors do.

Fix some whitspace things while at it.

Change-Id: Iae85e2449024ef04b2a44bd847c45515f8efc903
Reviewed-on: https://code.wireshark.org/review/26869
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-11 06:24:29 +00:00
Martin Kaiser b492011ac1 zbee_zcl: (trivial) clean up decode_color_xy()
remove unnecessary return statement
remove a wrong comment

Change-Id: I40afd8144178a2cccba67289d5a3120dd5719ad0
Reviewed-on: https://code.wireshark.org/review/26868
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-11 06:24:18 +00:00
Joakim Karlsson bf01c7c922 pfcp: correction of length
flags are uint8 but the whole list was set as uint16

Change-Id: I8726fe533253fd1339351f581e7a2fe01c0edce2
Reviewed-on: https://code.wireshark.org/review/26849
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: Matej Tkac <matej.tkac.mt@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-11 06:21:41 +00:00
Pascal Quantin 526a328d83 NBSS: take into account snaplen when creating the TVB subset
Otherwise you can trigger an exception interrupting the packet dissection
when the snaplen defined is shorter than the payload length

Bug: 14598
Change-Id: Ibeb6482495ed67c7669574bdcd7c429523318428
Reviewed-on: https://code.wireshark.org/review/26858
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2018-04-11 04:29:17 +00:00
Paul Zander caea93df95 Zigbee: Decode the ZCL extension field sets in the scenes cluster.
Change-Id: Ida564e8c292819508fd2dd0fb5b650e95356459a
Reviewed-on: https://code.wireshark.org/review/26852
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: Martin Kaiser <wireshark@kaiser.cx>
2018-04-11 02:06:54 +00:00
Guy Harris b3c51deb24 Rename the last argument to tvb_new_subset_length().
In tvb_new_subset_length_caplen(), the captured length argument is
backing_length and the reported length argument is reported_length.  The
length argument to tvb_new_subset_length() is a reported length, not a
captured length, so call it reported_length, not backing_length.

Change-Id: Ibfb30e15bdd885d3c0fd66e2b4b07c4a45327f14
Reviewed-on: https://code.wireshark.org/review/26863
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-10 17:53:05 +00:00
Guy Harris b67a10c9ea "#if 0" out some currently-unused value_strings.
Change-Id: I1535b8ec430bbf119c6cc58464da820603454265
Reviewed-on: https://code.wireshark.org/review/26862
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-10 17:43:26 +00:00
Guy Harris c7970d9356 Add, and use, "fetch signed value" for lengths < 40 bits.
Add 8-bit, 16-bit, 24-bit, and 32-bit "fetch signed value" routines, and
use them rather than casting the result of the 8/16/24/32-bit "fetch
unsigned value" routines to a signed type (which, BTW, isn't sufficient
for 24-bit values, so this appears to fix a bug
in epan/dissectors/packet-zbee-zcl.c).

Use numbers rather than sizeof()s in various tvb_get_ routines.

Change-Id: I0e48a57fac9f70fe42de815c3fa915f1592548bd
Reviewed-on: https://code.wireshark.org/review/26844
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-10 14:55:45 +00:00
Martin Mathieson 2cb93e2121 NR (5G) PDCP
Tested with some hand-generated PDUs.

Change-Id: Ic603d0ca4578d23121e438ac2458be34e63492d2
Reviewed-on: https://code.wireshark.org/review/26755
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-04-10 14:48:40 +00:00
Martin Kaiser d9c9a15f98 gsm_ipa: remove unnecessary if (tree) checks
Change-Id: I4d6bd9d296fcbd35551e3da9d60e20848865330b
Reviewed-on: https://code.wireshark.org/review/26846
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-10 14:26:40 +00:00
Pascal Quantin 74f7374e9f RRC: upgrade dissector to v15.2.0
Change-Id: I874466e05bbc1ff11c286078b482de2f27eccf8b
Reviewed-on: https://code.wireshark.org/review/26851
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-10 12:12:04 +00:00
Guy Harris d477e9a935 Replace lbmpdm_fetch_uintN_encoded() with tvb_get_guintN().
They do the same thing.

Change-Id: I0ff800efca9e6812ae416677023c955869bbc0cc
Reviewed-on: https://code.wireshark.org/review/26850
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-10 10:06:14 +00:00
Matej Tkac f0285151e1 PFCP: Added dissection of new IEs 123-126
In accordance with the latest spec - 3GPP TS 29.244 v15.1.0

Change-Id: I1267590dc25ec946f4a33b5813b1a00deff357c1
Reviewed-on: https://code.wireshark.org/review/26826
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-10 09:08:52 +00:00
Guy Harris 7c3f8484ec The message length is unsigned, not signed; treat it as such.
Add explicit checks for values that don't fit in a gint, rather than
relying on testing for < 1 catching that case.

Change-Id: I4181087e3499537da88117b710d56c6b5fe9ceaa
Reviewed-on: https://code.wireshark.org/review/26843
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-10 05:35:38 +00:00
Guy Harris 70a1d1c2e5 Get rid of get_opaque_length() and unneeded length arguments.
In most calls to get_opaque_length(), the length is a constant, so just
directly fetch the length value.  In the calls in dissect_nodeid_list()
and dissect_kindid_list(), the length is an argument to the routine
making the call, and *those* arguments are, for each of the routines,
the same constant for all calls to the routine in question, so just
directly fetch the length value in those routines.

This lets us avoid checks for a valid length-of-length, so we don't need
to have the length-of-length be a signed value with -1 meaning
"invalid".  That's good, because nothing was actually *checking* for an
invalid length-of-length.

Change-Id: I58264c133977266f3214d6e4ca361f71ecc0b69a
Reviewed-on: https://code.wireshark.org/review/26842
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-10 05:31:23 +00:00