Commit Graph

82490 Commits

Author SHA1 Message Date
João Valverde f78ebe1564 dfilter: Remove deprecated support for whitespace separator in sets 2021-10-31 09:13:18 +00:00
John Thacker 6d52bf07a7 docs: Update wireshark-filter.adoc for recent filter changes.
Commas in sets, changes to != and ~=, changes to contains and matches,
changes to implicit conversions/comparisons to unquoted values.
Also fix #15392.
2021-10-31 08:56:48 +00:00
John Thacker 13377f5f67 EPL: Fix memory access error when adding new UAT NodeID row
UatModel::insertRows in ui/qt/modles/uat_model.cpp calls the set
callback with an empty string when adding a new row, before the
check callback is called. So the set callback should handle the empty
string and not run off the end if handed invalid entry. Use the same
validation with hex_str_to_bytes in both callbacks so that they agree
about what is valid input.

Prevents a buffer overflow noticed by ASAN.
2021-10-31 06:50:20 +00:00
Zoran Bošnjak eda95fd016 asterix: Change `wmem_packet_scope()` to `pinfo->pool`
Fixes #17696.

Sync with asterix-specs #797e576298
2021-10-30 15:35:12 +02:00
Gerald Combs 77541af2df GitHub: Migrate Repo Lockdown to an action.
Repo Lockdown started out as a GitHub app[1], but has since been
migrated to an action[2]. Update our config to match. Fixes #17692.

[1] https://github.com/apps/repo-lockdown
[2] https://github.com/dessant/repo-lockdown
2021-10-30 13:05:35 +00:00
Zoran Bošnjak 16779dc43e asterix: Dissector automatic update from spec files
Asterix data format is a complex family of asterix categories,
where each individual category exists in multiple editions.
As a result of many variants, the epan/dissectors/packet-asterix.c
is one of the largest dissectors.

So far, the asterix dissector had been maintained manually, where the
generic decoding routines and category/edition specific definitions
were entangled in the same file (packet-asterix.c).

This commit preserves the overall dissector structure, but makes
it easy to update the dissector with new categories or editions as
they become available (via the update script from this commit).
See tools/asterix/README.md file for dissector update procedure.

This commit includes:

- tools/asterix/packet-asterix-template.c
  Extraction of generic asterix decoding routines and
  common data structures.

- tools/asterix/update-specs.py
  Update script, to render the template with up-to-date asterix
  specs files. The asterix specs files themselves are maintained in
  a separate repository.

- epan/dissectors/packet-asterix.c
  Automatically generated dissector for asterix data format.
  Although generated, this file needs to remain in the repository,
  to be able to build the project in a reproducible way.

The generated asterix dissector was additionally tested with:

- ./tools/check_typed_item_calls.py --mask
- ./tools/fuzz-test.sh

Sync with asterix-specs #cef694825c
2021-10-30 06:12:59 +00:00
John Thacker 278ba4157f EPL: Reject non-EPL packets at the beginning
If we're going to reject a packet because it's not a valid EPL
packet, do so at the beginning, before setting the column values
and changing the port types and values.
2021-10-29 22:38:42 -04:00
João Valverde 523c4f6434 dfilter: Use lower case for a macro name
Just a stylistic change.
2021-10-29 17:33:32 +01:00
João Valverde fdfb4c8951 dfilter: Avoid an unnecessary strdup()
Use the GString data directly to avoid a spurious strdup().
2021-10-29 17:33:32 +01:00
João Valverde e876d499d1 dfilter: Refactor some scanner patterns
Revert to the original design of having a single pattern to catch
everything as unparsed and also try to be less hackish and fragile
parsing "..".

Strings like "80..90" are tricky because it can be parsed as
INTEGER DOTDOT INTEGER or FLOAT FLOAT.
2021-10-29 17:33:28 +01:00
Federico Di Pierro d95935d969 dissectors: support sysdig new block type BLOCK_TYPE_SYSDIG_EVENT_V2_LARGE
The new block type enlarge payload lens up to 4B,
to support larger payload sizes.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2021-10-29 08:04:21 +00:00
Nardi Ivan c777213c63 QUIC: allow simple "tls" display filter
Reported by @chuckcraft in https://gitlab.com/wireshark/wireshark/-/issues/13881#note_676567768
2021-10-29 07:44:06 +00:00
Dr. Lars Völker 72be7aec15 SOME/IP-SD: Adding field of referenced options to entries
This patch adds a field to show the options an entry references.
2021-10-29 04:52:09 +00:00
Dr. Lars Völker 3d3a435903 Signal-PDU: Bugfix false positive truncation warning with multiplexing
This patch moves length check behind the multiplex check, so that we do
not get a false truncation warning, if other multiplex signals follow.
2021-10-29 04:21:17 +00:00
Dr. Lars Völker 0690da2456 SOME/IP: Adding resolution for Client IDs 2021-10-29 04:06:49 +00:00
Gerald Combs 8df628f5a0 Tools: Don't check Markdown file licenses.
Remove ".md" and ".markdown" from the default extension list in
licensecheck.pl, and remove CONTRIBUTING.md from checklicenses.py.
2021-10-28 13:42:14 -07:00
Gerald Combs 24b8942a90 GitLab CI+tools: Fuzz test updates.
Make sure we install the llvm package, which includes llvm-symbolizer.
Add the current branch and CI job information to the error report.
2021-10-28 11:20:25 -07:00
João Valverde c6b68b3ee2 dfilter: Need to check validity of LHS of "matches" expression
Fixes #17690, a crash on a failed assertion.
2021-10-28 16:26:36 +00:00
Peter Dobransky 9c2f3b0dc6 DHCP: Add CableLabs suboptions from CL-SP-CANN-DHCP-Reg
Add parsing of DHCPv4 option 82.9.4491.2..7
- DPoE System Version (2)
- DPoE System DHCPv4 PBB Service (4)
- CMTS CM Service Class (5)
- CMTS MSO Defined Text (6)
- Secure File Transfer URI (7)

Add parsing of DHCPv6 Relay Agent CMTS Capabilities Option 2
- DPoE System Version (2)
2021-10-28 16:11:34 +00:00
João Valverde 2183738ef2 dfilter: Add support for comma as set separator
Deprecate the usage of significant whitespace to separate set elements
(or anywhere else for that matter). This will make the implementation
simpler and cleaner and the language more expressive and user-friendly.
2021-10-28 04:11:05 +00:00
Gerald Combs b760c356c7 C12.22: Track our allocation sizes.
Add an allocated size element to the TOP_ELEMENT_CONTROL struct and use
it to make sure we're not trying to read past the end of a buffer in
canonify_unencrypted_header. Fixes #17636.
2021-10-28 03:56:19 +00:00
John Thacker 50b4944aaf BSSAP: Simplify code
Remove now unused defines. Add the BSAP and BSSAP-LE pinos to the tree
as the parent protocol (so that the BSSAP default proto preference can
be selected from the Packet Details and Packet List).

Set the BSSAP+ Decode As preference with the newer Decode As API, so
that we don't need a preference callback.
2021-10-27 19:30:57 -04:00
João Valverde 31d04f9ee7 dfilter: Add synctatic sugar for "not in" test 2021-10-27 20:52:35 +00:00
João Valverde f4ec1656cf dfilter: Fixup some scanner comments and patterns
Fixup comment to reflect that unparsed is the only token
type for the pattern, there is no "match" or "no match".

Tighten the CIDR patterns and make sure it cannot match a
rogue "..". This is ambiguous with 80..90 and must be treated
extra carefully to support floating point formats without
leading or terminating digits before or after the point.

Reject the default match as a syntax error. This pattern is
just a pitfall to make testing and debugging harder. Matching a
single arbitrary character is never a valid unparsed string,
except by chance.
2021-10-27 20:37:12 +00:00
Jaap Keuter 3e7465801d RDP: workaround setting pduLen for Manaro Linux
Fixes #17688
2021-10-27 21:13:28 +02:00
João Valverde 74a89a9862 dfilter: Minor set grammar cleanup 2021-10-27 11:13:52 +01:00
João Valverde db04d188e1 Remove some unnecessary casts.
Casts are best avoided unless they are truly required. Fix some
constness mismatches this revealed.
2021-10-27 10:24:20 +01:00
João Valverde a7c625808c dfilter: Add a helper function to create test stnodes 2021-10-27 09:27:45 +01:00
João Valverde f5fea52982 dfilter: Remove token value from syntax tree
Currently unused. This might still be useful to differentiate
different spelling of the same token in user messages, like
"==" and "eq", but currently we are not storing test tokens
anyway, so just remove it, it makes everything simpler.

If it's ever necessary it can be added back.
2021-10-27 09:27:45 +01:00
João Valverde 0e4851b025 dfilter: Use a string lval type in scanner
Minor change to decouple the AST data structures from the lexical
scanner. We pass a structure to allow for some future enhancements.
2021-10-27 09:27:45 +01:00
João Valverde 42101494db dfilter: Remove scanner unused macros
Replace the LVAL macros with a plain variable declaration.

The other macros and assorted compatibility code has been superseded
by the requirement of reentrant flex and the use of more modern flex
options, as far as I can tell.
2021-10-27 09:27:23 +01:00
João Valverde 0839f05bf7 tests/dfilter: Move deprecated to syntax group 2021-10-27 07:42:23 +00:00
Jirka Novak e880cf61d7 Flow sequence: Shows more information about various skinny messages
For many skinny messages additional information is shown next to
message. It simplifies call flow analysis.
2021-10-27 06:47:55 +00:00
João Valverde c87743f933 Add README for MinGW-w64 (MSYS2) build 2021-10-27 06:17:23 +00:00
João Valverde b1222edcd2 dfilter: Parse ranges in the drange node constructor
Using a hand written tokenizer is simpler than using flex start
conditions. Do the validation in the drange node constructor.

Add validation for malformed ranges with different endpoint signs.
2021-10-27 06:02:07 +00:00
Gerald Combs d19bdb70ed BT LE LL: Add a NULL Check.
Fixes #17681.
2021-10-26 23:58:52 +00:00
Gerald Combs 32ee228a76 PVFS: Make sure we have pinfo when we need it.
Make sure we always pass a valid pinfo value to dissect_pvfs_string.
Fixes #17686.
2021-10-26 23:40:43 +00:00
Gerald Combs 4dbd58f803 SKINNY: Initialize our addresses.
Make sure read_skinny_ipv4or6 always sets its address. Fixes #17682.
2021-10-26 23:15:15 +00:00
Alexis La Goutte be9a656770 QUIC(Datagram): update to last IETF draft 2021-10-26 20:59:51 +00:00
Alexis La Goutte a2369eafbb QUIC: Update to final RFC... 2021-10-26 20:59:51 +00:00
Dr. Lars Völker c44e14a4ba BLF: Direction is not ignored anymore (BUGFIX)
This patch adds direction support, so that incoming and outgoing frames
can be differentiated.
2021-10-26 20:45:33 +00:00
João Valverde e996c4f060 docs: Add some notes about project APIs 2021-10-26 20:30:18 +00:00
Alexis La Goutte 646e3db99a EAP: Add Autority ID Data from EAP-FAST
4.1.1 Authority ID Data https://datatracker.ietf.org/doc/html/rfc4851#section-4.1.1
2021-10-26 20:15:41 +00:00
Gerald Combs 9104a3744e PNRP: Exit our main loop.
Make sure our main loop offset advances. Fixes #17684.
2021-10-26 10:00:37 -07:00
João Valverde c9abbde287 docs: Update wireshark-filter man page about "!="
Update man page to remove obsolete information about "!=".
2021-10-26 14:53:20 +00:00
Manasa S 10352d552e TZSP: Add support for 6GHz band 2021-10-26 14:20:37 +00:00
Brian Sipos bc01dcb22c WSCBOR: Separate error from non-error expert info
The non-error expert info should not trigger wscbor_skip_if_errors() and similar logic.
2021-10-26 12:46:16 +00:00
Brian Sipos 1120f545d3 CBOR: Avoid infinite loop when sequence has not-well-formed data
This fixes a defect in the original MR !4752 adding cbor sequence dissecting.
2021-10-26 12:18:13 +00:00
Orgad Shaneh a114a115ba ACDR: Handle timestamps as time values instead of bytes 2021-10-26 12:15:10 +03:00
Orgad Shaneh 93b3f3b575 ACDR: Fix handling of short signaling packets
HOST --> PSTN layout is different than PSTN --> HOST.

The layout of HOST --> PSTN is:
BE16 - OpCode
BE16 - Data Size
REST - Data
2021-10-26 04:31:45 +00:00