Commit Graph

79221 Commits

Author SHA1 Message Date
Gerald Combs a9fc769d7b epan: Fix a memory leak.
Make sure _proto_tree_add_bits_ret_val allocates a bits array using the
packet scope, otherwise we leak memory. Fixes #17032.
2020-12-02 16:02:20 +00:00
Vadim Yanitskiy 79f84f7737 GSM A-bis/RSL: fix buffer overrun in dissct_rsl_msg()
Before accessing at offset+3, we need to make sure that the buffer
is large enough.  In some cases, e.g. when only the MS Timing
Offset IE is left in the tail, the dissector would crash and mark
the packet as malformed, leaving the rest undissected.
2020-12-02 14:44:28 +00:00
Martin Mathieson 32671ad57b PDCP-LTE: Trivial changes while reading security code 2020-12-02 13:56:13 +00:00
Moshe Kaplan 2acd5c706e packet-tls-utils:Move ssl_sha_init() and ssl_md5_init() out of a loop
Instead of calling ssl_sha_init() and ssl_sha_cleanup() in
a loop, call the newly-created ssl_sha_reset(), to avoid
creating and releasing contexts.
Also, do the same for ssl_md5_init() and ssl_md5_cleanup().

Besides the performance improvement,
this should also fix Coverity 1450156 and 1450693,
which detect the multiple calls to ssl_sha_cleanup()
and ssl_md5_cleanup() as a double-free.
2020-12-02 13:32:50 +00:00
Nardi Ivan 5798b91c15 QUIC: fix decryption when "loss-bits" feature is enabled
If the "loss bits" feature has been negotiated between the peers, the
algorithm used by Header Protection cipher must be updated.

See: https://tools.ietf.org/html/draft-ferrieuxhamchaoui-quic-lossbits-03

Close #17010
2020-12-02 09:27:18 +00:00
Odysseus Yang 2a5b34d8b0 MBIM: Update dissector to support DLT_ETW
New link type DLT_ETW is added for write and read Event Trace on Windows.
This change updates MBIM dissector to decode a MBIM message from
a DLT_ETW packet.
2020-12-02 09:05:11 +00:00
John Thacker fe1f947540 macOS: Enable PKCS #11 support when building with macos-setup.sh
Enable PKCS #11 support in macOS builds with macos-setup.sh (already
supported on macOS via Homebrew and on all other OSes with GnuTLS 3.4
or greater) by installing p11-kit (and its dependency libtasn1) and
building nettle and GnuTLS against it.
2020-12-02 07:55:42 +00:00
liam-black e0403df086 Update packet-tcp.h 2020-12-02 01:21:27 +00:00
Joerg Mayer 77e9d7d3f9 macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.

Also update glib but only to last version with autotools support - meson build is left
for another time.

Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.

Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 21:54:09 +00:00
Joerg Mayer 55c7c0779d packet-lacp.c: Update a comment 2020-12-01 20:08:08 +00:00
Moshe Kaplan a83cf4d757 packet-tls-utils:Replace ssl_md_cleanup() and ssl_md_init() with ssl_md_reset()
Instead of successively calling ssl_md_cleanup() and
ssl_md_init(), call the newly-created ssl_md_reset(),
to avoid creating and releasing contexts.

Besides the minor performance improvement,
this should also fix Coverity 1450690,
which detects the second call to ssl_md_cleanup()
as a double-free.
2020-12-01 16:39:40 +00:00
Martin Mathieson 0a7de84501 SSYNCP: Fix build failure when can't decrypt.
Seen on a machine with older LIBCRYPT.
2020-12-01 15:42:35 +00:00
Huang Qiangxiong dcf6bdda84 Protobuf/gRPC: add test cases for Protobuf and gRPC
Add case_dissect_protobuf and case_dissect_grpc in test/suite_dissection.py.
Add *.proto into the sub directories of test/protobuf_lang_files/.
Run command like 'pytest --program-path .\run\Debug\ -k "grpc or protobuf"'
in build directory (in windows) to test these cases only.
2020-12-01 12:06:43 +00:00
Simon Holesch 6a0feb8d0a D-Bus: Dissect complete messages
Improve the D-Bus dissector to support all types, including containers
(arrays, structs, dict entries, variants). Add new protocol fields for
D-Bus header fields like `dbus.destination` or `dbus.path` to make
filtering for specific messages possible. Add lots of expert infos for
possible errors. Update Info column to include method / signal name and
path.
2020-12-01 10:54:45 +00:00
Moshe Kaplan 2158ff241f packet-tls-utils:Avoid calling ssl_hmac_init() and ssl_hmac_cleanup() in a loop
Instead of calling ssl_hmac_init() and ssl_hmac_cleanup() in
a loop, call ssl_hmac_reset(), to avoid creating and releasing
contexts. This should also fix Coverity 1450768, which
detects the multiple calls to ssl_hmac_final() as a double-free.
2020-12-01 09:52:21 +00:00
Eugene Adell 2f235deb3e TCP: Add support for TCP Conversation Completeness tracking
TCP Conversations are modified to track Completeness, particularly initial and closing handshakes

Fixes #16716
2020-12-01 09:18:35 +00:00
Jann Horn 0a3eba683d ssyncp: Add new dissector
Add a dissector for mosh's State Synchronization Protocol.
2020-12-01 08:55:19 +00:00
Gerald Combs 3a42bf0de2 Windows: Upgrade brotli, libmaxminddb, lz4, and snappy.
Upgrade brotli to 1.0.9, libmaxminddb to 1.4.3, lz4 to 1.9.2, and snappy
to 1.1.8.
2020-12-01 08:32:44 +00:00
Matt Claiborne 6ba539fe05 SFlow: Improve dissection of Lag counter
Improve dissection of sFlow Lag counter samples and conform to
https://sflow.org/sflow_lag.txt.  Closes #17042.
2020-12-01 07:07:12 +00:00
Matt Claiborne dde70546fd sFlow: Fix dissection of lag counter records
Improve dissection of sFlow Lag counter records within interface counter
samples and conform to https://sflow.org/sflow_lag.txt.  Closes #17042.
2020-12-01 07:07:12 +00:00
Nardi Ivan 8bd4162d84 QUIC/DNS: add support for DNS-over-QUIC
Reference: https://tools.ietf.org/html/draft-ietf-dprive-dnsoquic-01
2020-11-30 20:26:17 +00:00
Harald Welte 9c5ea50b0a packet-ehdlc: Fix TEI in COL_INFO
Back in 2017, commit d7bab0b46e introduced
printing the TEI in COL_INFO.  Unfortunatelky it contained a typo and
stated "TEI:1%u" instead of "TEI:%u".  So TEI 0 became TEI 10, etc. -
causing some confusion.

Let's remote that extraneous '1' and at the same time print the sapi
with two digits for better alignment of multiple lines. It is a
two-digit decimal value (0..63).
2020-11-30 20:02:23 +00:00
Harald Welte e5bb8b4b08 gsm_ipa: Add more enum values and 'official' names
Originally we only learned about the protocol from looking at hexdumps
without any specification or the like.

Due to a GPL request to ip.acecss, we actually do have an 'official'
resource: The packet-ipa.c from their wireshark-1.0.6ipa27.tar.gz

Let's use its contents to complete our definitions here.
2020-11-30 20:19:31 +01:00
John Thacker 165b56afe7 GMR-1 RR: Use tvbuff_new_octet_aligned to get octet aligned tvbuff
Use tvb_new_octet_aligned() to get an octet aligned tvbuff with the
4 bit offset instead of using tvb_get_ptr() and doing the alignment
in the dissector.
2020-11-30 14:51:01 +00:00
Guvenc Gulce 07d77dd5b1 SMC: Add support for SMCD(v2)
Add SMCD(v2) clc proposal/accept/confirm and decline support.
Proposal and decline parsing routines are used by SMC-R and SMC-D(v2).

Enhance the existing SMC-R protocol dissector in such
a generic way that it supports both SMC-R and SMC-D(v2)
protocols. These two protocols are similar to each other.
SMC-D has a version 1 and version 2.

Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com>
2020-11-30 13:27:58 +00:00
Orgad Shaneh e74b6bdebe Qt: fix Qt 5.15 deprecation warning
QFont::ForceIntegerMetrics is deprecated, and the floating-point
variant of QFontMetrics is no longer used anyway since 96eec0beb9.

Change the font_width_ member to int, as should have been done in
that commit.
2020-11-30 13:03:53 +00:00
Orgad Shaneh a973416077 TPNCP: Update tpncp.dat 2020-11-30 11:58:55 +02:00
Chuck Craft 44a8ada319 TLS: debug_file - no comment when processing comment lines 2020-11-30 08:39:49 +00:00
Gerald Combs f21cd2e23f wiretap: Convert ascend.y to Lemon.
Convert wiretap/ascend.y.in from Bison/YACC to Lemon and rename it to
wiretap/ascend_parser.lemon. Tighten up some of our scanning and
parsing. Make the indentation in it and related files consistent. Aside
from the recent IPv4 fragment offset changes, this produces identical
output to the 3.4 branch for the Ascend trace files I have here.

Remove the comment about supporting other commands. Another timeline
might have an Ascend that successfully pivoted to DSL or 15625B+1D
gigabit ISDN, but this one has neither.

This was our last/only Bison/YACC file, so remove Bison/YACC as a
development and packaging dependency and remove references to it from
the documentation.
2020-11-30 08:15:43 +00:00
Guy Harris 1fa5687fad wlan: don't treat non-QoS frames as having an HT Control field.
That's QoS-frame only; for non-QoS frames, the +HTC/Order subfield
doesn't mean there's an HT Control field.

Update the reference to the part of the 802.11 standard mentioning that
subfield to 802.11-2016.
2020-11-30 06:41:55 +00:00
Elvin Arias Soto 3b7db8de8a VXLAN: Reordering &hf_vxlan_flag_d and &hf_vxlan_flag_i 2020-11-30 05:02:01 +00:00
Chuck Craft 45594f9639 icmp: fix typo in hf_icmp_ident_le field definition 2020-11-29 22:04:32 -06:00
Guy Harris baee4a41c7 wlan: clean up some tests.
It's clearer to say

    if (A) {
        if (B) {
            do this;
        } else {
            do that;
        }
    }

than to say

    if (A && B) {
        do this;
    } else if (A && !B) {
        do that;
    }
2020-11-29 18:24:53 -08:00
Pascal Quantin 59efc252dc LPP: upgrade dissector to v16.2.0 2020-11-29 22:48:08 +01:00
Gerald Combs 7c07202d78 [Automatic update for 2020-11-29]
Update manuf, services enterprise numbers, translations, and other items.
2020-11-29 17:21:40 +00:00
Martin Kaiser cb8150cdf3 Qt: CaptureOptionsDialog: set parent for SparkLineDelegate
CaptureOptionsDialog allocates a SparkLineDelegate in its constructor.
It should set itself as parent of the SparkLineDelegate.

Without a parent, the SparkLineDelegate is never freed and each
invocation of Capture / Options leaks memory.
2020-11-29 16:59:17 +00:00
Jaap Keuter de5ed8d664 Fix function documentation
Fixes b26512e33a
2020-11-29 13:54:36 +00:00
Guy Harris 258fb14821 802.11: clean up data frame handling.
Change

    case DATA_FRAME:
        if (condition) {
            do stuff;
            break;
        }
        do other stuff;
        break;

to

    case DATA_FRAME:
        if (condition) {
            do stuff;
        } else {
            do other stuff;
        }
        break;

to make it clearer that it's "do this if condition is true, else do
that".
2020-11-29 02:17:47 -08:00
Guy Harris ee764b8d7d llc: don't fetch the etype until it's needed and if it's present.
This avoids throwing exceptions in some cases.
2020-11-29 01:28:59 -08:00
Guy Harris 3f8423c267 llc: clean up indentation. 2020-11-29 00:53:45 -08:00
Alexander Couzens 7dd469f801 packet-gsm_abis_oml: dissect Get Attribute Response Info
The Get Attribute Response Info contains attributes requested by the
Get Attributes message. It contains the same attributes which can be part
an OML message.
2020-11-28 11:49:38 +00:00
Alexander Couzens 7a72ad677f packet-gsm_abis_oml: dissect List of required Attributes
List of required Attributes is used by Get Attribute message
to allow the BSC to retrieve attributes from the BTS.
2020-11-28 11:49:38 +00:00
Alexander Couzens 9080232823 packet-gsm_abis_oml: move length of oml_attrs into the signature
When calling dissect_oml_attrs() from within an attribute the length
must be given otherwise the elements would appear in the wrong
tree.
2020-11-28 11:49:38 +00:00
Joakim Andersson e06afb4252 bluetooth: Change wording of sequence number context information
Change the wording of the sequence number context information from
"Wrong" to the more accurate description that this is a retransmit.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-11-28 11:15:59 +00:00
Joakim Andersson 7f5ddfc7f3 bluetooth: Add context information for next expected sequence number
Add context information for next expected sequence number so that
analysing for acknowledgedment or request for retransmit can be done
without comparing packets manually.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2020-11-28 11:15:59 +00:00
Guy Harris 0f004f422d Add an alernative version of the 3270 Data Stream Programmer's Reference.
This one is a more straightforward scanned PDF.
2020-11-27 23:59:26 -08:00
Anders Broman 0bc4c81a11 MySQL: Enhance "field length encoded" and column info. 2020-11-27 21:32:52 +00:00
Pascal Quantin 125790b918 NAS EPS: fix a typo 2020-11-27 15:22:19 +00:00
Moshe Kaplan 0120c12c5d ringbuffer.c: avoid leaking gzFile handle
Avoid leaking the gzFile handle when g_malloc()
fails. This fixes coverity issue 1468698.
2020-11-27 14:58:29 +00:00
Stig Bjørlykke 7f4ae9a229 Qt: Load interfaces on profile change if settings have changed
Load interfaces on profile change if capture_no_interface_load or
capture_no_extcap preference have changed.
2020-11-27 11:34:24 +00:00