Commit graph

18809 commits

Author SHA1 Message Date
Tim Wojtulewicz
57a3c733d1 Reduce some false-positive warnings from GCC to warnings with -Werror
This also works around some of the same warnings. These are known bugs
in GCC 11+ and GCC 13.x.
2025-07-10 14:07:08 -07:00
Tim Wojtulewicz
cd356ce45d Add zeek-namespaced alias for jthread
Apple Clang (as of version 17.0.0) does not support jthread unless
you enable experimental libcpp features by defining
_LIBCPP_ENABLE_EXPERIMENTAL or passing -fexperimental_library to
the compiler. Even if you don't do those, our 3rdparty jthread
library fails to build because of a bunch of namespace/naming
collisions. I moved our 3rdparty one to the `nonstd` namespace, and
am using an alias under __APPLE__ to avoid the collisions.
2025-07-10 14:07:07 -07:00
Tim Wojtulewicz
350d0859aa Include RequireCXXStd.cmake from main CMakeLists.txt 2025-07-10 14:07:07 -07:00
Tim Wojtulewicz
0de1d8a345 Update submodules to C++20-enabled versions 2025-07-10 14:07:07 -07:00
Tim Wojtulewicz
c6011e2160 Merge remote-tracking branch 'origin/topic/timw/known-services-with-storage-framework'
* origin/topic/timw/known-services-with-storage-framework:
  Modify known-services policy script to add storage framework support
2025-07-10 08:55:49 -07:00
Tim Wojtulewicz
1f64bb2870 Modify known-services policy script to add storage framework support
This adds a flag to enable using the storage framework instead of Broker stores,
plus a btest for both broker and the the storage framework.
2025-07-10 08:55:01 -07:00
Robin Sommer
6446bdf0dc
Merge remote-tracking branch 'origin/topic/bbannier/bump-spicy'
* origin/topic/bbannier/bump-spicy:
  [Spicy] Add linker scope to debugging output.
  [Spicy] Remove declarations for unimplemented functions.
  [Spicy] Bump `auxil/spicy/` to latest development snapshot.
2025-07-10 09:41:07 +02:00
Robin Sommer
ce6c7a6cd1
Merge remote-tracking branch 'origin/topic/bbannier/protocol-handle-close-finish'
* origin/topic/bbannier/protocol-handle-close-finish:
  [Spicy] Let `zeek::protocol_handle_close()` send a TCP EOF.
2025-07-10 09:38:11 +02:00
zeek-bot
d06468fd34 Update doc submodule [nomail] [skip ci] 2025-07-10 00:18:59 +00:00
Tim Wojtulewicz
0848ddfb9f Merge remote-tracking branch 'origin/topic/vern/ZAM-incr-op-opt-fix'
* origin/topic/vern/ZAM-incr-op-opt-fix:
  ZAM optimizer fix for += / -= set operations
2025-07-09 15:10:17 -07:00
Vern Paxson
1d43760862 ZAM optimizer fix for += / -= set operations 2025-07-09 13:40:33 -07:00
Robin Sommer
da59c12a9a
[Spicy] Add linker scope to debugging output. 2025-07-09 17:36:05 +02:00
Benjamin Bannier
96b8cd8ee4
[Spicy] Remove declarations for unimplemented functions. 2025-07-09 17:36:05 +02:00
Benjamin Bannier
2307c62a61
[Spicy] Bump auxil/spicy/ to latest development snapshot. 2025-07-09 17:36:05 +02:00
Benjamin Bannier
d6c22295bd
[Spicy] Let zeek::protocol_handle_close() send a TCP EOF.
Zeek's analyzer API makes it hard to determine during analyzer
shutdown whether a regular end-of-data has been reached, or if we're
aborting in the middle of a session (e.g., because Zeek missed the
remaining packets): the corresponding analyzer method, `EndOfData()`
gets called in both cases.

In an earlier change, we had stopped signaling Spicy analyzers a
regular finish when that `EndOfData()` method executes, because doing
so could trigger a parse error if it wasn't a regular shutdown—-which
isn't desired, a user request was to just silently stop processing in
this case.

However, that behavior now seems unfortunate in the case that one
deliberately calls `zeek::protocol_handle_close()` to terminate an
analyzer: this feels like a regular shutdown that should just
immediately happen. We achieve this now in this function by
additionally signaling the shutdown at the TCP layer as an "end of
file", which, for Spicy analyzers, happens to run the final, orderly
tear-down.

Not exactly great, but ti seems to thread the needle to achieve the
desired semantics in both cases.
2025-07-09 17:28:19 +02:00
Benjamin Bannier
92868804b1 Merge branch 'topic/bbannier/bump-pre-commit-hook-spicy-format' 2025-07-09 11:56:03 +02:00
Benjamin Bannier
b959ba3395 Bump spicy-format pre-commit hook
pre-commit ignores Cargo.lock files for Rust projects, so any movement
in a Rust project's dependencies can break a hook, even if no code in
the hook changed. I have tried to work with upstream on a fix, but they
basically told me they weren't interested and to get lost.

This bumps the `spicy-format` pre-commit hook to a new version which
explicitly deals with bumps of its dependencies. Having to do this
semi-regularly is not fun, and ideally somebody interested in using this
hook would help set up infrastructure in the hook so it just pulls
pre-built binaries. This is not directly supported by pre-commit, but
many projects work around this by declaring a Python module which then
pulls pre-build binaries which already exist for spicy-format.
2025-07-09 11:40:25 +02:00
Christian Kreibich
9322687823 Merge branch 'topic/christian/rdp-cookie-clarification'
* topic/christian/rdp-cookie-clarification:
  Clarify the cookie field's origin in the RDP log.
2025-07-08 17:45:27 -07:00
zeek-bot
8be80f8c18 Update doc submodule [nomail] [skip ci] 2025-07-09 00:27:47 +00:00
Christian Kreibich
2ca0fb6539 Clarify the cookie field's origin in the RDP log. 2025-07-08 16:31:57 -07:00
Arne Welzel
0c60f2a70a Merge branch 'topic/jgras/connection-packet-threshold' of https://github.com/J-Gras/zeek
* 'topic/jgras/connection-packet-threshold' of https://github.com/J-Gras/zeek:
  Add NEWS entry for generic packet thresholds
  Allow for multiple generic packet thresholds
  Add btest for conn_generic_packet_threshold_crossed event
  Update dump-events btest baseline
  Add conn_generic_packet_threshold_crossed event
2025-07-08 17:54:27 +02:00
Johanna Amann
8ba77da152 Merge remote-tracking branch 'origin/topic/johanna/gh-4602'
* origin/topic/johanna/gh-4602:
  PPPoE: don't forward more bytes than header indicates
2025-07-08 11:44:53 +01:00
Johanna Amann
4c46c02aec Merge remote-tracking branch 'origin/topic/johanna/random-indentation'
* origin/topic/johanna/random-indentation:
  Fix indentation of scripts / tests
2025-07-08 11:41:37 +01:00
Jan Grashoefer
50ab72efc2 Add NEWS entry for generic packet thresholds 2025-07-08 11:30:38 +02:00
Jan Grashoefer
e6d8c3b072 Allow for multiple generic packet thresholds
Co-authored-by: Arne Welzel <arne.welzel@corelight.com>
2025-07-08 11:29:06 +02:00
Johanna Amann
1fed0ed58d PPPoE: don't forward more bytes than header indicates
This changes the PPPoE parser so that it doesn't forward extra bytes
that might be appended after the payload. Instead, it raises a weird if
the payload size doesn't match the size indicated by the header.

This is in line with what other protocol parsers (like UDP) are doing.

Two tests needed to be updated - with this change, the traffic in
pppoe-over-qinq.pcap is now valid TLS. A new trace was introduced for
the confirmation-violation-info test.

Addresses GH-4602
2025-07-08 10:20:59 +01:00
Johanna Amann
359c7707e0 Fix indentation of scripts / tests
No functional changes
2025-07-08 10:13:48 +01:00
Arne Welzel
d42d467965 Merge remote-tracking branch 'origin/topic/vern/line-number-ordering'
* origin/topic/vern/line-number-ordering:
  Bump ZeekJS to work with new Location constructor
  remove non-functional column information from Location objects
  isolate Location specifics to private class variables to enforce correct line number ordering
2025-07-08 10:40:58 +02:00
Arne Welzel
781097ef72 Bump ZeekJS to work with new Location constructor 2025-07-08 10:39:53 +02:00
Vern Paxson
a9b37467a4 remove non-functional column information from Location objects 2025-07-08 10:39:53 +02:00
Vern Paxson
5c63133226 isolate Location specifics to private class variables to enforce correct line number ordering 2025-07-08 10:39:28 +02:00
Arne Welzel
3c941a6d3e Merge remote-tracking branch 'origin/topic/awelzel/id-opt-info-branch-clone-no-lint'
* origin/topic/awelzel/id-opt-info-branch-clone-no-lint:
  script_opt/IDOptInfo: Add NOLINT(bugprone-branch-clone)
2025-07-07 20:07:35 +02:00
Arne Welzel
0cc30faa55 script_opt/IDOptInfo: Add NOLINT(bugprone-branch-clone) 2025-07-07 18:52:11 +02:00
Arne Welzel
b034fd3f55 Merge remote-tracking branch 'origin/topic/awelzel/bump-zeekjs-0-18-0'
* origin/topic/awelzel/bump-zeekjs-0-18-0:
  Bump zeekjs to v0.18.0
2025-07-07 18:17:25 +02:00
Arne Welzel
869bd181b2 Merge remote-tracking branch 'origin/topic/vern/ZAM-const-prop-fix'
* origin/topic/vern/ZAM-const-prop-fix:
  fix for error in ZAM's constant propagation logic
2025-07-07 18:15:57 +02:00
Vern Paxson
0c1e248572 fix for error in ZAM's constant propagation logic 2025-07-04 16:05:46 -07:00
Arne Welzel
e3cb063032 Bump zeekjs to v0.18.0
1b7071e version: 0.18.0
    07c801e tests: Bump version requirement for new-event and log-events
    b7b69eb Add support for node v24
2025-07-04 17:10:49 +02:00
zeek-bot
319af542d9 Update doc submodule [nomail] [skip ci] 2025-07-04 00:25:19 +00:00
Arne Welzel
eb6b4a0c46 Merge remote-tracking branch 'origin/topic/awelzel/revert-to-tpe'
* origin/topic/awelzel/revert-to-tpe:
  scripts: Use tpe instead of type_, again
2025-07-03 20:44:04 +02:00
Arne Welzel
df581c59b4 scripts: Use tpe instead of type_, again
The .rst generation doesn't escape the trailing `_` and the docs build
gets upset due to using `type` as a reference target then.

For the better or worse, revert to using tpe. Though I acknowledge this
means we need to be careful with trailing underscores because our docs
build is so fragile.

Partly reverts b9eabbabba.
2025-07-03 20:25:34 +02:00
Arne Welzel
388cbcee48 Merge remote-tracking branch 'origin/topic/awelzel/4605-conn-id-context'
* origin/topic/awelzel/4605-conn-id-context:
  NEWS: Adapt for conn_id$ctx introduction
  conn_key/fivetuple: Drop support for non conn_id records
  Conn: Move conn_id init and flip to IPBasedConnKey
  IPBasedConnKey: Add GetTransportProto() helper
  input/Manager: Ignore empty record types
  external: Bump commit hashes for external suites
  ip/vlan_fivetuple: Populate nested conn_id_context, not conn_id
  ConnKey: Extend DoPopulateConnIdVal() with ctx
  btest: Update tests and baselines after adding ctx to conn_id
  init-bare: Add conn_id_ctx to conn_id
2025-07-03 18:42:48 +02:00
Arne Welzel
a7bc144465 NEWS: Adapt for conn_id$ctx introduction 2025-07-03 18:21:36 +02:00
Arne Welzel
6eb0d4df32 conn_key/fivetuple: Drop support for non conn_id records
Previously, we supported any records that happened to have orig_h,
resp_h, etc. fields, but it's not exactly clear why we ever did. Users
that relied on this can instantiate an explicit conn_id instance, too.
2025-07-03 18:21:36 +02:00
Arne Welzel
f8eab9e9cf Conn: Move conn_id init and flip to IPBasedConnKey
This loosens the coupling of the script-layer conn_id record and
the code in Conn a bit, moving more into the IPBasedConnKey class.

I'm not quite sure whether moving the flipping logic is worth it,
but assuming Conn could become non-IP in the future, it might.
2025-07-03 18:21:36 +02:00
Arne Welzel
661fa91231 IPBasedConnKey: Add GetTransportProto() helper 2025-07-03 18:21:36 +02:00
Arne Welzel
a975d65d01 input/Manager: Ignore empty record types
Somewhere record types with zero fields get the optional attribute
apparently. The input/sqlite/basic test failed due to complaining
that ctx is optional. It isn't optional and when it has zero fields
we can just ignore it, too.

Also adds a input framework test with an explicit empty record type
2025-07-03 18:21:15 +02:00
Arne Welzel
8c7d732d4c external: Bump commit hashes for external suites
get_file_handle() may include c$id and perturbs their values when adding new
fields. I think that's reasonable, as files transferred in one VLAN should
be treated separate from files transferred in a different VLAN.
2025-07-03 18:19:47 +02:00
Arne Welzel
e221042f14 ip/vlan_fivetuple: Populate nested conn_id_context, not conn_id
This also enforces conn_id and conn_id_ctx types instead of being
able to handle any conn_id-like record.
2025-07-03 18:19:46 +02:00
Arne Welzel
b7a22a87c6 ConnKey: Extend DoPopulateConnIdVal() with ctx
This prepares the move where ConnKey implementations should fill out
ctx rather than filling conn_id directly. The API continues to receive
both, conn_id and ctx, as adding fields to `conn_id` is reasonable
use-case even if it's just for logging purposes.
2025-07-03 18:19:46 +02:00
Arne Welzel
112e3c1c03 btest: Update tests and baselines after adding ctx to conn_id 2025-07-03 18:19:46 +02:00