Commit Graph

82376 Commits

Author SHA1 Message Date
Joakim Karlsson ffdc5622d1 gtpv2: Update to 3GPP TS 29.274 V17.3.0 2021-10-20 11:06:06 +00:00
Martin Mathieson 54ac7b4424 Fix some spelling errors 2021-10-20 10:00:12 +01:00
Jirka Novak a747639add RTP Analysis: Fix of mean_jitter calculation
Calculation used current_diff in place current_jitter in mean_jitter
calculation so it produced incorrect results. This patch fixes it.

Closes #17600.
2021-10-20 07:05:30 +00:00
Martin Mayer d4cad23807 Added Allied Telesis Loop Detection Frames 2021-10-20 06:49:44 +00:00
Nan Xiao 3106386f44 EVS: Support decoding Primary 2.8 kbps packets 2021-10-20 06:32:28 +00:00
Nan Xiao 0818981ccb EVS: Fix bug in decoding SID frame CNG type
In 3GPP 26.449 Codec for Enhanced Voice Services (EVS); Comfort Noise Generation
(CNG) aspects, Computational details and bit allocation:
For the EVS primary modes, the SID payload consists of 48 bits. The first bit of
the payload determines the CNG scheme, where 0 stands for the LP-CNG and 1 for
the FD-CNG.
2021-10-20 09:32:13 +08:00
Gerald Combs 01b0d9e077 Docs: Move includes to the top of our man pages.
Move our attributes.adoc includes to the very top of each man page.
Older versions of Asciidoctor complain if it's not at the top. and
additionally generate <file>.man instead of <file>.<section> if we don't
explictly supply an output file.
2021-10-19 16:26:37 -07:00
Gerald Combs b8a45f3638 CMake+Docs: Generate man pages all at once.
Asciidoctor lets us generate multiple documents at once, so do so for
our man pages. If we're using AsciidoctorJ this minimizes the number
of JVM instances we have to spin up. This reduces the build time on my
Windows VM here quite a bit, and will hopefully do so on the CI builders.

Add a .editorconfig file in cmake/modules.
2021-10-19 22:06:45 +00:00
Stig Bjørlykke cfe33625a0 wslua: Initialize Proto members on creation
Set all pointers in Proto to NULL and check for valid pointers when
wslua_deregister_protocols().

Fixes #17668
2021-10-19 20:50:45 +00:00
Nardi Ivan 763247c2b3 QUIC: fix compilation on Raspberry 2021-10-19 20:04:17 +00:00
ismaelrti a1031afbff RTPS: ixed dissection of unions in user data.
Removed the type_id check when dissecting user data. That check avoids
dissection in valid cases.
2021-10-19 19:47:24 +00:00
Brian Sipos c1c5db86b6 TCPCL: Reassemble with full 64-bit transfer ID 2021-10-19 19:30:34 +00:00
Sangeetha Jain 2e65045db6 MeshConnex (MCX): MCX packet decode logic
Dissect MCX IE present in 802.11 packets like Beacon, Assoc Req, Assoc Res ...
2021-10-19 19:11:05 +00:00
John Thacker db8e63614e BT-uTP: Hand to bittorrent dissector, dissect multiple PDUs
Handle uTP payload to the bittorrent dissector.
Implement dissect PDUs to handle more than one bittorrent PDU
in a uTP payload.
Implement basic multisegment PDU tracking; not enough to actually
desegment, but enough to provide a hint to the start offset of the
next PDU when a PDU does span segments. (Provided that they're in
order, but OOO handling isn't implemented yet either.)
Improves #8792.
2021-10-19 18:53:46 +00:00
Nan Xiao 9a8feb8abd EVS: Fix CNG schema for SID payload
In 3GPP 26.449 Codec for Enhanced Voice Services (EVS); Comfort Noise Generation
(CNG) aspects, Computational details and bit allocation:
For the EVS primary modes, the SID payload consists of 48 bits. The first bit of
the payload determines the CNG scheme, where 0 stands for the LP-CNG and 1 for
the FD-CNG.
2021-10-19 15:44:56 +00:00
Dr. Lars Völker 95092e6582 SOME/IP: WTLV type 5 complains about 6 bit length field (BUGFIX)
Closes #17666
2021-10-19 14:38:57 +00:00
Pau Espin 736a54a3ad CSN.1: Fix definition for DownlinkDualCarrierCapability_r7_t in MS RA cap
Related spec: 3GPP TS 24.008 Table 10.5.146
2021-10-19 15:44:09 +02:00
Pascal Quantin 017eb216c1 BSSMAP LE: fix dissection of APDU in 2 messages
The APDU information element in Perform Location Request and Perform
Location Information messages is optional and not mandatory, as seen in
3GPP 49.031. This commit fixes a regression introduced in ga6ed603f5c.

Closes #17667
2021-10-19 09:53:19 +00:00
Chuck Craft 947d3ff819 dftest: update man page and README.display_filter 2021-10-19 07:41:31 +00:00
Jakub Pawlowski 0f7217aadf Bluetooth: Update Assigned Numbers
Updated UUIDs to match new version from 1st October 2021

Change-Id: Ifab0296389fe3815f7ce9b15de841e8675faba32
2021-10-19 05:02:41 +00:00
Guy Harris f275ccf2ab socketcan: use ett_can_fd for CAN FD. 2021-10-19 02:22:42 +00:00
Gerald Combs 1bcd51e34a CMake+Docs: Try to build our man pages in parallel.
Make sure man pages are included in the default build. Have the docs
and copy_data_files targets explicitly depend on the man page generator
targets.
2021-10-19 01:05:27 +00:00
Guy Harris 3fe96028d2 Add a comment to explain a cast done in file_fdopen(). 2021-10-18 16:22:33 -07:00
Nardi Ivan a2e877d397 wiretap: fix a warning on Raspberry 4
/home/pi/wireshark/wiretap/file_wrappers.c: In function ‘file_fdopen’:
/home/pi/wireshark/wiretap/file_wrappers.c:1136:27: error: comparison of integer expressions of different signedness: ‘__blksize_t’ {aka ‘long int’} and ‘unsigned int’ [-Werror=sign-compare]
         if (st.st_blksize <= MAX_READ_BUF_SIZE)
                           ^~
cc1: all warnings being treated as errors
2021-10-18 22:23:33 +00:00
Gerald Combs d8742418aa IDMP: Initialize some variables.
Try to make sure protocolID and saved_protocolID are initialized before
we use them. Another attempt at fixing #16342, #17664, and related bugs.
2021-10-18 20:19:35 +00:00
Jakub Pawlowski b7a612908a Increase PROTO_PRE_ALLOC_HF_FIELDS_MEM
This fixes suite_unittests failures when adding new Bluetooth UUID
related contsants
2021-10-18 19:46:45 +00:00
Gerald Combs f2ec793131 Revert "GitLab CI: Switch to clang 13."
This reverts commit 0aae44e145.

The fuzz builder has been running out of memory since the switch to
Clang 13, so revert back to 12 for now.
2021-10-18 19:07:12 +00:00
Gerald Combs e15e987468 BT SDP: Don't overrun our continuation state buffer.
Fixes #17635.
2021-10-18 10:30:39 -07:00
João Valverde 3562d76d5a dfilter: Fix memory leak in stnode_tostr()
Fixes #17661.
2021-10-18 14:22:13 +01:00
João Valverde e8800ff3c4 dfilter: Add a thin encapsulation layer for REs 2021-10-18 12:09:36 +00:00
João Valverde 2e048df011 dfilter: Improve error message for "matches"
Should be more obvious that this error is caused
by a string syntax error and not something else.
2021-10-18 12:09:36 +00:00
Brian Sipos e63f8d8daa wsutil: install missing public header wsgcrypt.h 2021-10-18 09:55:50 +00:00
João Valverde a975d478ba dfilter: Require double-quoted strings with "matches"
Matches is a special case that looks on the RHS and tries
to convert every unparsed value to a string, regardless
of the LHS type. This is not how types work in the display
filter. Require double-quotes to avoid ambiguity, because
matches doesn't follow normal Wireshark display filter
type rules. It doesn't need nor benefit from the flexibility
provided by unparsed strings in the syntax.

For matches the RHS is always a literal strings except
if the RHS is also a field name, then it complains of an
incompatible type. This is confusing. No type can be compatible
because no type rules are ever considered. Every unparsed value is
a text string except if it happens to coincide with a field
name it also requires double-quoting or it throws a syntax error,
just to be difficult. We could remove this odd quirk but requiring
double-quotes for regular expressions is a better, more elegant
fix.

Before:
  Filter: tcp matches "udp"

  Constants:
  00000 PUT_PCRE	udp -> reg#1

  Instructions:
  00000 READ_TREE		tcp -> reg#0
  00001 IF-FALSE-GOTO	3
  00002 ANY_MATCHES	reg#0 matches reg#1
  00003 RETURN

  Filter: tcp matches udp

  Constants:
  00000 PUT_PCRE	udp -> reg#1

  Instructions:
  00000 READ_TREE		tcp -> reg#0
  00001 IF-FALSE-GOTO	3
  00002 ANY_MATCHES	reg#0 matches reg#1
  00003 RETURN

  Filter: tcp matches udp.srcport
  dftest: tcp and udp.srcport are not of compatible types.

  Filter: tcp matches udp.srcportt

  Constants:
  00000 PUT_PCRE	udp.srcportt -> reg#1

  Instructions:
  00000 READ_TREE		tcp -> reg#0
  00001 IF-FALSE-GOTO	3
  00002 ANY_MATCHES	reg#0 matches reg#1
  00003 RETURN

After:
  Filter: tcp matches "udp"

  Constants:
  00000 PUT_PCRE	udp -> reg#1

  Instructions:
  00000 READ_TREE		tcp -> reg#0
  00001 IF-FALSE-GOTO	3
  00002 ANY_MATCHES	reg#0 matches reg#1
  00003 RETURN

  Filter: tcp matches udp
  dftest: "udp" was unexpected in this context.

  Filter: tcp matches udp.srcport
  dftest: "udp.srcport" was unexpected in this context.

  Filter: tcp matches udp.srcportt
  dftest: "udp.srcportt" was unexpected in this context.

The error message could still be improved.
2021-10-17 22:53:36 +00:00
João Valverde 4e5e806604 dfilter: Do not chain matches expressions
It is always an error to chain regexes using the logic for "le" and "eq".

  var matches "regex1" matches "regex2"
    => var matches "regex1" and "regex1" matches "regex2"

Before:
  Filter: tcp matches "abc$" matches "^cde"
  dftest: Neither "abc$" nor "^cde" are field or protocol names.

  Filter: "abc$" matches tcp matches "^cde"
  dftest: Neither "abc$" nor "tcp" are field or protocol names.

After:
  Filter: tcp matches "abc$" matches "^cde"
  dftest: "matches" was unexpected in this context.

  Filter: "abc$" matches tcp matches "^cde"
  dftest: "matches" was unexpected in this context.
2021-10-17 22:53:36 +00:00
Matias Karhumaa ac31124514 btsmp: Fix endianess of debug public key
Bluetooth LE SMP protocol uses Little-endian byte order. Convert
Bluetooth LE Secure Connections debug public key to Little-endian
byte order to fix the problem that dissector did not properly
identify debug keys when they were used during the pairing.
2021-10-17 14:46:47 +00:00
Brian Sipos c36ce0b01b TCPCLv4: Update TCPCL dissector to include version 4 from dtn-wireshark
Some enhancements and visual fixes to version 3 dissector are also included.
2021-10-17 14:09:07 +00:00
Gerald Combs 0e667117b4 [Automatic update for 2021-10-17]
Update manuf, services enterprise numbers, translations, and other items.
2021-10-17 09:30:23 +00:00
John Thacker 71ccbe9f37 bencode: remove pointless recursion
This statement is at the top of the function, calls itself recursively
without changing any state, reaches the max recursion level, and then
travels back up the stack adding expert infos and returning -1, and
then at the end always causes a variable to be set to a known value.

Remove all that, and just set the variable to the value it's going to
have anyway. This speeds things up a lot and prevents adding dozens
of expert infos to dictionaries without otherwise changing the
behavior, which does seem to work.
2021-10-16 07:23:03 +00:00
John Thacker 9f890e1dea dfilter: Update semcheck comment to reflect latest commits
The handling of unparsed values was rationalized by commits
c484ad0e5c and
144dc1e2ee. Update this comment
to reflect the new behavior.
2021-10-16 02:26:27 +00:00
João Valverde 06890ea379 dfilter: Forbid protocol filter names beginning with '-'
Reducing the namespace for protocol names makes the display filter grammar
simpler and less ambiguous and error prone. We can't easily impose
stricter restrictions without breaking backward compatibility but names
starting with '-' are a pathological case because of negative numbers
and byte slices and in the unlikely event that any such names exist
they should be fixed.
2021-10-15 17:29:34 +01:00
João Valverde 6d4a463620 proto: use hash table to lookup reserved filter names
Should be faster.
2021-10-15 17:04:32 +01:00
João Valverde 07023a7774 tests: Accept a partial string in checkDFilterFail() 2021-10-15 15:10:57 +01:00
João Valverde 00673e22ef tests: Fixup test names 2021-10-15 15:10:54 +01:00
Mikael Kanstrup fbeb33ee99 Websocket frame reassembly support
Add support for websocket fragmented payload reassembly.
2021-10-15 13:23:50 +00:00
João Valverde c484ad0e5c dfilter: Don't try to parse byte arrays as strings
It won't work with embedded null bytes so don't try. This is
not an additional restriction, it just removes a hidden failure
mode. To support matching embedded NUL bytes we would have
to use an internal string representation other than
null-terminated C strings (which doesn't seem very onerous with
GString).

Before:
  Filter: http.user_agent == 41:42:00:43

  Constants:
  00000 PUT_FVALUE	"AB" <FT_STRING> -> reg#1

  Instructions:
  00000 READ_TREE		http.user_agent -> reg#0
  00001 IF-FALSE-GOTO	3
  00002 ANY_EQ		reg#0 == reg#1
  00003 RETURN

After:
  Filter: http.user_agent == 41:42:00:43

  Constants:
  00000 PUT_FVALUE	"41:42:00:43" <FT_STRING> -> reg#1

  Instructions:
  00000 READ_TREE		http.user_agent -> reg#0
  00001 IF-FALSE-GOTO	3
  00002 ANY_EQ		reg#0 == reg#1
  00003 RETURN
2021-10-15 13:06:51 +01:00
João Valverde 144dc1e2ee dfilter: Use the same semantic rules for protocols and bytes
FT_PROTOCOL and FT_BYTES are the same semantic type, but one is
backed by a GByteArray and the other by a TVBuff. Use the same
semantic rules to parse both. In particular unparsed strings
are not converted to literal strings for protocols.

Before:
  Filter: frame contains 0x0000

  Constants:
  00000 PUT_FVALUE	30:78:30:30:30:30 <FT_PROTOCOL> -> reg#1

  Instructions:
  00000 READ_TREE		frame -> reg#0
  00001 IF-FALSE-GOTO	3
  00002 ANY_CONTAINS	reg#0 contains reg#1
  00003 RETURN

  Filter: frame[5:] contains 0x0000
  dftest: "0x0000" is not a valid byte string.

After:
  Filter: frame contains 0x0000
  dftest: "0x0000" is not a valid byte string.

  Filter: frame[5:] contains 0x0000
  dftest: "0x0000" is not a valid byte string.

Related to #17634.
2021-10-15 13:06:51 +01:00
João Valverde e46deda5cf Fix build with WS_DISABLE_DEBUG 2021-10-15 12:23:43 +01:00
Роман Донченко e116110f0c jpeg: add support for dissecting inline IFD values
In many cases, the "value offset" is actually the value itself.
Handle those cases correctly.
2021-10-15 04:53:03 +00:00
John Thacker cc91fd51ff cli: stats_tree: Make syntax consistent with other -z options
The statistics that use the stats_tree API parse the -z option
without expecting a comma separator between the statistics name
and the filter. This is contrary to both the man pages and how
all the other options work. Fix that so it's consistent.
Fix #17656
2021-10-15 04:22:23 +00:00
Guy Harris 3960474089 socketcan: support the CANFD_FDF flag for identifying CAN FD frames.
The Linux SocketCAN header now uses the formerly-reserved byte in the
SocketCAN header after the "payload length" field as an "FD flags"
field, with a flag bit reserved to indicate whether the frame is a
classic CAN frame or a CAN FD frame, with two other bits giving frame
information for FD frames.

For LINKTYPE_CAN_SOCKETCAN, use that flag bit to determine whether the
frame is classic CAN or CAN FD.  As some older LINKTYPE_CAN_SOCKETCAN
captures have SocketCAN headers in which the fields after the "payload
length" field were uninitialized, so trust that thge "FD flags" was
filled in, rather than possibly randomly uninitialized, only if the only
bits set in that field are the bits defined to be in that field and the
two reserved bytes after it are zero.

This will be needed when the current main-branch libpcap is released, as
it uses LINKTYPE_CAN_SOCKETCAN rather than LINKTYPE_LINUX_SLL for
ARPHRD_CAN devices; we add it now to future-proof the Wireshark releases
to which this is being committed.  It also handles what existing CAN FD
captures using LINKTYPE_CAN_SOCKETCAN exist.

For LINKTYPE_LINUX_SLL frames, we have the protocol field to distinguish
between classic CAN and CAN FD, so we use that to determine the frame
type, rather than looking at the CANFD_FDF flag.

dissect_socketcan_common() now handles both classic CAN and CAN FD
frames.
2021-10-14 19:15:07 -07:00