Commit graph

13201 commits

Author SHA1 Message Date
Matthew Luckie
11f8729997 remove deprecated union and timer types, addressing #1898 2022-02-19 19:17:51 +13:00
Christian Kreibich
d77fd8305d Merge branch 'topic/christian/github-workflow-tweaks'
* topic/christian/github-workflow-tweaks:
  Minor modernizations to Github workflows
2022-02-11 09:30:28 -08:00
Christian Kreibich
40fa1a0769 Merge branch 'topic/christian/controller-renaming'
* topic/christian/controller-renaming:
  Bump external cluster testsuite to reflect Management framework reorg
  Bump zeek-client to reflect Management framework reorg
  Reorg of the cluster controller to new "Management framework" layout
2022-02-10 18:10:08 -08:00
Tim Wojtulewicz
dad237c682 Merge remote-tracking branch 'origin/topic/timw/coverity-fixes'
* origin/topic/timw/coverity-fixes:
  Fixing a big pile of Coverity issues
2022-02-10 10:35:23 -07:00
Christian Kreibich
59fa19424d Bump external cluster testsuite to reflect Management framework reorg 2022-02-09 18:09:46 -08:00
Christian Kreibich
c77cbc5c58 Bump zeek-client to reflect Management framework reorg 2022-02-09 18:09:46 -08:00
Christian Kreibich
54aaf3a623 Reorg of the cluster controller to new "Management framework" layout
- This gives the cluster controller and agent the common name "Management
framework" and changes the start directory of the sources from
"policy/frameworks/cluster" to "policy/frameworks/management". This avoids
ambiguity with the existing cluster framework.

- It renames the "ClusterController" and "ClusterAgent" script modules to
"Management::Controller" and "Management::Agent", respectively. This allows us
to anchor tooling common to both controller and agent at the "Management"
module.

- It moves common configuration settings, logging, requests, types, and
utilities to the common "Management" module.

- It removes the explicit "::Types" submodule (so a request/response result is
now a Management::Result, not a Management::Types::Result), which makes
typenames more readable.

- It updates tests that depend on module naming and full set of scripts.
2022-02-09 18:09:42 -08:00
Christian Kreibich
f34906c9d1 Minor modernizations to Github workflows
- Rely on checkout action for recursive clone at depth 1
- Remove some unneeded subshells
- Use nproc to determine number of cores for parallelization
2022-02-09 15:59:11 -08:00
Christian Kreibich
9efc214d42 Merge branch 'topic/christian/build-docs-on-prs'
* topic/christian/build-docs-on-prs:
  Expand generate-docs Github workflow to test docs build on PRs
2022-02-09 15:15:48 -08:00
Christian Kreibich
2e79bc861d Expand generate-docs Github workflow to test docs build on PRs
This adds pull requests as a trigger event and runs the doc submodule
commit/push as well as the submodule bump only on the original scheduled runs.
2022-02-09 14:24:58 -08:00
Christian Kreibich
2b7cc130c4 Merge branch 'topic/christian/fix-docbuild'
* topic/christian/fix-docbuild:
  Updates to the cluster controller scripts to fix the docs build
2022-02-09 13:14:55 -08:00
Tim Wojtulewicz
a117c81d85 Fixing a big pile of Coverity issues
1469562/1469558: Uninitialized fields in Func constructor
1469571/1469566: Null pointer dereference in Trigger::Init()
1469568: Uninitialized fields in CounterVector constructor
1469570: Uncaught exception in plugin manager
1469569: Resource leak in script_opt::Stmt
1469561/1469561: Uninitialized fields in ZBody constructor
1469559: Uninitialized fields in logging::Manager
1469563: Resource leak in ZAMCompiler::CompileDel
1469549/1469553/1469556: Context not fully initialized in HashVals
1469548: Remove dead code from IPAddr
1469551/1469554: Handle iosource_mgr registration failure in broker::Manager
1469552/1469572: Resource leaks in input::Manager
2022-02-09 14:07:11 -07:00
Christian Kreibich
3e0a86e3b3 Updates to the cluster controller scripts to fix the docs build
Mostly trivial changes, except for one aspect: if a module exports a record type
and that record bears Zeekygen comments, then redefs that add to the record in
another module cannot be private to that module. Zeekygen will complain with
"unknown target" errors, even when such redefs have Zeekygen comments. So this
commits also adds two export-blocks that aren't technically required at this point.
2022-02-09 12:28:47 -08:00
Christian Kreibich
41abf8f422 Bump zeek-client for Broker enum fix/workaround 2022-02-08 10:02:57 -08:00
Tim Wojtulewicz
0a70595d44 Update submodule(s) [nomail] [skip ci] 2022-02-08 09:55:16 -07:00
Christian Kreibich
b5c89cf384 Merge branch 'topic/christian/fix-when-deprec'
* topic/christian/fix-when-deprec:
  Add capture to a Sumstats when-statement
2022-02-07 14:20:04 -08:00
Tim Wojtulewicz
5bcccbd90e Update submodule(s) [nomail] [skip ci] 2022-02-07 10:05:29 -07:00
Robin Sommer
5f1f005142
Merge remote-tracking branch 'origin/topic/neverlord/hide-caf'
* origin/topic/neverlord/hide-caf:
  Fix GCC builds and string output for Broker errors
  Update to latest Broker without public CAF dep
2022-02-07 16:25:22 +01:00
Tim Wojtulewicz
8513bcef9d Merge remote-tracking branch 'origin/topic/timw/string-view-constructors'
* origin/topic/timw/string-view-constructors:
  String/StringVal: Replace char*/string constructors with string_view
2022-02-07 08:14:58 -07:00
Christian Kreibich
6a46d1584c Add capture to a Sumstats when-statement
This resolves a deprecation warning that currently triggers when running
Sumstats in clusterized Zeek.
2022-02-04 12:54:34 -08:00
Tim Wojtulewicz
4f470c24ed String/StringVal: Replace char*/string constructors with string_view 2022-02-04 13:52:04 -07:00
Tim Wojtulewicz
16ee942a8d Merge remote-tracking branch 'origin/topic/vern/use-C++-fix'
* origin/topic/vern/use-C++-fix:
  fix existing checks for looking to use C++ when it's not available
2022-02-04 10:33:55 -07:00
Tim Wojtulewicz
db706d9cf9 Merge remote-tracking branch 'origin/topic/vern/ZAM-profile-fix'
* origin/topic/vern/ZAM-profile-fix:
  fixes for ZAM profiling, which didn't get fully integrated originally
  minor enhancements for ZAM inlining
2022-02-04 10:32:59 -07:00
Vern Paxson
a6e493062c fix existing checks for looking to use C++ when it's not available 2022-02-03 20:35:25 -08:00
Christian Kreibich
9a7d5c986e Merge branch 'topic/christian/cluster-controller-get-nodes'
* topic/christian/cluster-controller-get-nodes:
  Bump external cluster testsuite
  Bump zeek-client for the get-nodes command
  Add ClusterController::API::get_nodes_request/response event pair
  Support optional listening ports for cluster nodes
  Don't auto-publish Supervisor response events in the cluster agent
  Make members of the ClusterController::Types::State enum all-caps
  Be more conservative with triggering request timeout events
  Move redefs of ClusterController::Request::Request to their places of use
  Simplify ClusterController::API::set_configuration_request/response
2022-02-03 13:19:34 -08:00
Vern Paxson
16e9af137f fixes for ZAM profiling, which didn't get fully integrated originally 2022-02-03 08:59:39 -08:00
Vern Paxson
94e71b738a minor enhancements for ZAM inlining 2022-02-03 08:53:10 -08:00
Johanna Amann
b1415dd364 Merge remote-tracking branch 'origin/topic/johanna/gh-1952'
* origin/topic/johanna/gh-1952:
  Match DPD TLS signature on one-sided connections.

Fixes GH-1952
2022-02-03 11:24:34 +00:00
Christian Kreibich
3b79c36146 Bump external cluster testsuite 2022-02-02 23:00:37 -08:00
Christian Kreibich
4c5de66a22 Bump zeek-client for the get-nodes command 2022-02-02 23:00:31 -08:00
Christian Kreibich
7db8634c8b Add ClusterController::API::get_nodes_request/response event pair
This allows querying the status of Zeek nodes currently running in a cluster.
The controller relays the request to all instances and accumulates their
responses.

The response back to the client contains one Result record per instance
response, each of which carrying a ClusterController::Types::NodeState vector in
its $data member to convey the state of each node at that instance.

The NodeState record tracks the name of the node, its role in the controller (if
any), its role in the data cluster (if any), as well as PID and listening port,
if any.
2022-02-02 22:59:22 -08:00
Christian Kreibich
791e5545b1 Support optional listening ports for cluster nodes
This makes cluster node listening ports &optional, and maps absent values to
0/unknown, the value the cluster framework currently uses to indicate that
listening isn't desired.
2022-02-02 16:10:46 -08:00
Robin Sommer
88c73f4680
Updating CHANGES and VERSION. 2022-02-02 12:48:41 +01:00
Robin Sommer
5b1691f162
Merge remote-tracking branch 'origin/topic/zeke/gh-1890'
* origin/topic/zeke/gh-1890:
  Consistently warn about mixing vector and scalar operand depreciaton
2022-02-02 09:46:00 +01:00
Robin Sommer
d957770c93
Merge remote-tracking branch 'origin/topic/robin/tcp-analyzer-checks'
* origin/topic/robin/tcp-analyzer-checks:
  Let our TCP-based application analyzers operate without any TCP parent analyzer.
2022-02-02 09:37:05 +01:00
Johanna Amann
95f1565498 Match DPD TLS signature on one-sided connections.
This commit changes DPD matching for TLS connections. A one-sided match
is enough to enable DPD now.

This commit also removes DPD for SSLv2 connections. SSLv2 connections do
basically no longer happen in the wild. SSLv2 is also really finnicky to
identify correctly - there is very little data required to match it, and
basically all matches today will be false positives. If DPD for SSLv2 is
still desired, the optional signature in policy/protocols/ssl/dpd-v2.sig
can be loaded.

Fixes GH-1952
2022-02-01 16:51:21 +00:00
Christian Kreibich
c79c2a2b00 Don't auto-publish Supervisor response events in the cluster agent
This was an oversight: we auto-publish the agent's requests _to_ the supervisor,
not the latter's responses.
2022-01-31 18:42:53 -08:00
Christian Kreibich
ad4744eba6 Make members of the ClusterController::Types::State enum all-caps
A consistency tweak since we mostly use all-caps elsewhere as well.
2022-01-31 18:42:03 -08:00
Christian Kreibich
3da95de5b8 Be more conservative with triggering request timeout events 2022-01-31 18:38:40 -08:00
Christian Kreibich
4b5584a85d Move redefs of ClusterController::Request::Request to their places of use
The Request module does not need to know about additional state tucked onto it
by its users.
2022-01-31 18:29:58 -08:00
Christian Kreibich
f9ac03d6e3 Simplify ClusterController::API::set_configuration_request/response
It's easier to track outstanding controller/agent requests via a simple set of
pending agent names, and we can remove all of the result aggregation logic since
we can simply re-use the results reported by the agents.

This can serve as a template for request-response patterns where a client's
request triggers a request to all agents, followed by a response to the client
once all agents have responded. Once we have a few more of those, it'll become
clearer how to abstract this further.
2022-01-31 17:45:14 -08:00
Robin Sommer
9b0d525728
Let our TCP-based application analyzers operate without any TCP parent analyzer.
Conceptually, a TCP-based application analyzer should not need any
knowledge about the underlying TCP analysis; it's supposed to just
process its reassembled input stream as it's handed over. But our
analyzers break that assumption at a few places because sometimes
knowledge about the TCP state of the connection can be helpful for
heuristics. This is fine as long as there actually *is* a TCP parent
analyzer available. Sometimes, however, there isn't: if the payload
stream is encapsulated inside another application-layer protocol, the
semantic link to TCP is broken. And if the outer connection is even
UDP, then we don't have a TCP analyzer at all.

We didn't handle this situation well so far. Most analyzers needing
TCP state would just crash if there's no TCP analyzer (in debug mode
with an `assert`, in release mode with a null pointer deref ...). Only
HTTP did the right thing already: check if TCP is available and adapt
accordingly.

We know extend that check to all other analyzers as well: all accesses
to `TCP()` are guarded, with reasonable defaults if not available.
It's actually a pretty small change overall, which is evidence for how
little this layering violation actually matters.

The existing behavior is what's causing
https://github.com/corelight/zeek-spicy-openvpn/issues/3.
2022-01-28 16:25:27 +01:00
Tim Wojtulewicz
0793a38cc5 Merge remote-tracking branch 'origin/topic/vern/vec-slice-bug'
* origin/topic/vern/vec-slice-bug:
  btest to catch vector slice assignment issues
  bug fix for vector slice assignment
2022-01-25 13:52:19 -07:00
Vern Paxson
c378017269 btest to catch vector slice assignment issues 2022-01-25 10:47:33 -08:00
Vern Paxson
63bfae180a bug fix for vector slice assignment 2022-01-25 10:47:15 -08:00
Johanna Amann
5411c431dc Merge remote-tracking branch 'origin/topic/vern/de-bro-comments'
* origin/topic/vern/de-bro-comments:
  updated Bro->Zeek in comments in the source tree
2022-01-25 12:26:13 +00:00
Vern Paxson
d758585e42 updated Bro->Zeek in comments in the source tree 2022-01-24 14:26:20 -08:00
Christian Kreibich
fab8f9f2fe Merge branch 'topic/christian/ci-updates'
* topic/christian/ci-updates:
  CI update: add Ubuntu 21.10
  CI update: remove OpenSUSE Leap 15.2 (EOL)
  CI update: add CentOS Stream 9
2022-01-24 13:42:01 -08:00
Christian Kreibich
8e24f84857 CI update: add Ubuntu 21.10 2022-01-24 13:40:11 -08:00
Christian Kreibich
1de58030f2 CI update: remove OpenSUSE Leap 15.2 (EOL) 2022-01-24 13:40:11 -08:00