Commit graph

15108 commits

Author SHA1 Message Date
Tim Wojtulewicz
39b1cede33 Update link to slack in README.md 2023-06-01 14:21:44 +02:00
Tim Wojtulewicz
fba058f7b7 Merge remote-tracking branch 'origin/topic/timw/remove-vendored-cmake-files'
* origin/topic/timw/remove-vendored-cmake-files:
  Update bifcl, binpac, and broker repos for cmake changes
  bison_target argument changes from HEADER to DEFINES_FILE
  Update cmake submodule [nomail]
2023-05-31 13:49:27 -07:00
Tim Wojtulewicz
1cea0f8e6a Update bifcl, binpac, and broker repos for cmake changes 2023-05-31 13:16:03 -07:00
Tim Wojtulewicz
0203e7cd58 bison_target argument changes from HEADER to DEFINES_FILE 2023-05-31 14:28:51 +02:00
Tim Wojtulewicz
f787be48ac Update cmake submodule [nomail] 2023-05-31 14:28:49 +02:00
Tim Wojtulewicz
6bfc2ea83d Start of 6.1.0 development 2023-05-31 12:10:35 +02:00
Tim Wojtulewicz
2cde6e1703 Switch broker submodule back to master 2023-05-31 12:08:05 +02:00
Tim Wojtulewicz
e39f953b33 Update broker submodule to 2.6.0 release tag [nomail] [skip ci] 2023-05-31 12:05:27 +02:00
Tim Wojtulewicz
9d8511395d Update docs submodule [nomail] [skip ci] 2023-05-31 11:20:48 +02:00
Tim Wojtulewicz
3a0efb296f Updating CHANGES and VERSION. 2023-05-31 09:51:22 +02:00
Tim Wojtulewicz
1cfe0e3ee7 Merge remote-tracking branch 'origin/topic/bbannier/issue-3094'
* origin/topic/bbannier/issue-3094:
  Simplify code generated for Spicy analyzer port ranges.
2023-05-31 09:50:46 +02:00
Tim Wojtulewicz
7ebcbcd174 Update baseline for coverage.test-all-policy-cluster test 2023-05-31 00:40:30 -07:00
Arne Welzel
737ac43942 catch-and-release: Mark cr_check_rule as is_used 2023-05-31 00:37:38 -07:00
Arne Welzel
aceb023301 Add test-all-policy-cluster
After the introduction of @if ... analyze, a lot of warnings were
triggered due to nested @if and @if .. analyze usage.

Add a test for coverage of all policy scripts in cluster mode
for the usual node types so this does not happen again.
2023-05-31 00:37:30 -07:00
Tim Wojtulewicz
5a3abbe364 Revert "Merge remote-tracking branch 'origin/topic/vern/at-if-analyze'"
This reverts commit 4e797ddbbc, reversing
changes made to 3ac28ba5a2.
2023-05-31 09:20:33 +02:00
Robin Sommer
cfbb7eb8ee
Merge remote-tracking branch 'origin/topic/robin/gh-3083-export-fix'
* origin/topic/robin/gh-3083-export-fix:
  Register test analyzer only for required ports.
  Fix disappearing unit fields in Spicy type export.
2023-05-30 14:59:00 +02:00
Benjamin Bannier
dc735371be Simplify code generated for Spicy analyzer port ranges.
We previously would reprent port ranges from EVT files element-wise.
This can potentially generate a lot of code (all on a single line
though) which some versions of GCC seem to have trouble with, and which
also causes JIT overhead.

With this patch we switch to directly representing ranges. Single ports
are represented as ranges `[start, start]`.

Closes #3094.
2023-05-29 12:20:44 +02:00
Benjamin Bannier
0b100c1e1c Register test analyzer only for required ports.
This is a workaround for #3094.
2023-05-28 17:36:06 +02:00
zeek-bot
49e2f482b4 Update doc submodule [nomail] [skip ci] 2023-05-27 00:41:39 +00:00
Tim Wojtulewicz
4e797ddbbc Merge remote-tracking branch 'origin/topic/vern/at-if-analyze'
* origin/topic/vern/at-if-analyze:
  updates reflecting review comments
  change base scripts to use run-time if's or @if ... &analyze
  a number of BTests updated with @if ... &analyze
  update for scripting coverage BTest demonstrating utility of @if ... &analyze
  BTests for new @if ... &analyze functionality
  "if ( ... ) &analyze" language feature
  classes for tracking "@if (...) &analyze" notion of code being/not being "activated"
  RemoveGlobal() method for Scope class + simplifying interfaces
2023-05-26 14:56:01 -07:00
Tim Wojtulewicz
3ac28ba5a2 Merge remote-tracking branch 'origin/topic/timw/update-broker'
* origin/topic/timw/update-broker:
  Update broker submodule [nomail]
2023-05-26 12:31:12 -07:00
Arne Welzel
dbad8ab231 Merge remote-tracking branch 'origin/topic/awelzel/bump-zeekjs-0-9-1'
* origin/topic/awelzel/bump-zeekjs-0-9-1:
  Update ZeekJS submodule to 0.9.1
2023-05-26 20:52:15 +02:00
Tim Wojtulewicz
8ae477c32d Update broker submodule [nomail] 2023-05-26 11:15:14 -07:00
Arne Welzel
6ac7a9e62a Update ZeekJS submodule to 0.9.1 2023-05-26 19:07:11 +02:00
Robin Sommer
fd86d8530b
Fix disappearing unit fields in Spicy type export.
When a Spicy unit type was used in an EVT event definition, it could
end up being cleared out at the time the logic for `export` got to see it.

Closes #3083.

Note: This needs backporting to the legacy plugin.
2023-05-26 11:37:23 +02:00
Arne Welzel
c202686cd1 Merge remote-tracking branch 'origin/topic/awelzel/src-cmakelists-zeek-config-skip-version-h'
* origin/topic/awelzel/src-cmakelists-zeek-config-skip-version-h:
  CMakeLists: Skip zeek-version.h include for zeek_objs, too
2023-05-26 10:03:48 +02:00
Arne Welzel
c61f0d776f Bump cluster testsuite to latest main 2023-05-26 10:02:46 +02:00
Tim Wojtulewicz
9f8f7f5471 Merge remote-tracking branch 'origin/topic/timw/minor-windows-warning'
* origin/topic/timw/minor-windows-warning:
  Fix minor type-clash warning on Windows
2023-05-25 19:49:41 -07:00
Vern Paxson
e441ba394a updates reflecting review comments 2023-05-25 18:00:13 -07:00
Tim Wojtulewicz
75188ea6d7 Fix minor type-clash warning on Windows 2023-05-25 16:50:22 -07:00
Tim Wojtulewicz
496d2bc5e3 Fix Coverity warning involving object copy in TLS binpac code 2023-05-25 13:39:51 -07:00
Arne Welzel
4ef019a637 CMakeLists: Skip zeek-version.h include for zeek_objs, too
I've continued to see somewhat slower builds after Zeek version bumps. It
appears files covered by zeek_objs didn't have -DZEEK_CONFIG_SKIP_VERSION_H
set causing ccache invalidation after a version bump.
2023-05-25 20:54:33 +02:00
Arne Welzel
3f3df93ac1 Merge remote-tracking branch 'origin/topic/timw/2914-truncated-tunnel-plus-things'
* origin/topic/timw/2914-truncated-tunnel-plus-things:
  Address wire/capture length feedback
  packet_analysis/TCP: Do not use untrusted len for DeliverPacket()
  Add regression test using pcap from GH-2683
  Add btest to test Geneve->VXLAN->Truncated inner packet
  IP: Update packet->len with accumulated fragment size
  UDP: Forward any remaining data (also empty) to session-analysis
  IPTunnel: Compute inner wire length based on cap_len differences.
  IP: fix weird name to not be ipv6 specific
  UDP: don't validate checksum if caplen < len
  PIA: Modernize how struct initialization is done
2023-05-25 20:19:20 +02:00
Tim Wojtulewicz
2bf0ebae32 Merge remote-tracking branch 'origin/topic/awelzel/auto-hilti-cxx-compiler-launcher-in-btest'
* origin/topic/awelzel/auto-hilti-cxx-compiler-launcher-in-btest:
  btest.cfg: Set HILTI_CXX_COMPILER_LAUNCHER based on build/CMakeCache.txt
2023-05-25 09:03:49 -07:00
Tim Wojtulewicz
540e0c8da8 Merge remote-tracking branch 'origin/topic/bbannier/spicy-test-speedup'
* origin/topic/bbannier/spicy-test-speedup:
  Speed up Spicy-related tests.
2023-05-25 09:03:22 -07:00
Benjamin Bannier
8049d3a002 Speed up Spicy-related tests.
This patch changes invocations of `spicyz` and similar Spicy tools in
tests which perform compilation to use debug mode via passing `-d`. This
in turn leads to Spicy compiling generated C++ code in debug as opposed
to release mode which typically seems to require less CPU time and RAM.
For a local test running with `btest -j 16` and no caching via
`HILTI_CXX_COMPILER_LAUNCER` this sped up running of BTests under
`spicy/` by about 40s on my machine (120s vs 160s).
2023-05-25 14:59:10 +02:00
Arne Welzel
b9803e157b btest.cfg: Set HILTI_CXX_COMPILER_LAUNCHER based on build/CMakeCache.txt
If CMakeCache.txt indicates the Zeek build was done with ccache,
take the CCACHE_PROGRAM:FILEPATH= line and populate the
HILTI_CXX_COMPILER_LAUNCHER environment.

For local development with ccache, this speeds up the spicy tests
significantly after the initial run without knowing or needing know
that setting HILTI_CXX_COMPILER_LAUNCHER would've helped.
2023-05-25 13:42:12 +02:00
Arne Welzel
c4d159d1ff Address wire/capture length feedback 2023-05-25 09:48:14 +02:00
zeek-bot
7e356cfd31 Update doc submodule [nomail] [skip ci] 2023-05-25 00:32:57 +00:00
Tim Wojtulewicz
0e3780d983 Update docs submodule [nomail] 2023-05-24 12:11:10 -07:00
Arne Welzel
6941e44aba packet_analysis/TCP: Do not use untrusted len for DeliverPacket()
We should not be passing the untrusted TCP header length into
DeliverPacket(). Also, DeliverPacket() cap len parameter should
be the capture length of the packet, not remaining data.
2023-05-24 16:41:52 +02:00
Arne Welzel
a41dfb28d5 Add regression test using pcap from GH-2683 2023-05-24 16:34:25 +02:00
Tim Wojtulewicz
d9718342ac Add btest to test Geneve->VXLAN->Truncated inner packet 2023-05-24 16:34:25 +02:00
Arne Welzel
568946ec18 IP: Update packet->len with accumulated fragment size
With packet->len representing the wire length and other places
relying on it, ensure it's updated for fragments as well. This
assumes non-truncated fragments right now. Otherwise we'd need
to teach the FragmentReassembler to somehow track this independently
but it would be a mess.
2023-05-24 16:34:22 +02:00
Arne Welzel
2b9de839b0 UDP: Forward any remaining data (also empty) to session-analysis
The protocol analyzers are prepared to receive truncated data and
this way we give analyzers a chance to look at data. We previously
allowed empty data being passed: When len ended up 0 and remaining
was 0 too.
2023-05-24 16:31:11 +02:00
Arne Welzel
5654f81dee IPTunnel: Compute inner wire length based on cap_len differences. 2023-05-24 16:31:08 +02:00
Tim Wojtulewicz
18a30a7a53 IP: fix weird name to not be ipv6 specific 2023-05-24 16:29:29 +02:00
Tim Wojtulewicz
47ff5a4f61 UDP: don't validate checksum if caplen < len
This may happen with truncated packets and will cause asan builds to bail out
before the packet can be forwarded along. The TCP analyzer already has this
check, but it's missing for UDP.
2023-05-24 16:01:08 +02:00
Tim Wojtulewicz
b8313c2487 PIA: Modernize how struct initialization is done 2023-05-24 16:01:08 +02:00
Arne Welzel
3efb27c963 Add NEWS entry about negative vector index 2023-05-24 10:51:37 +02:00