Commit graph

16055 commits

Author SHA1 Message Date
Tim Wojtulewicz
16f6cafd9a Add validation of session to start of AYIYA/VXLAN/Geneve analysis
This mimics how the Teredo analyzer is already doing it, including
sending a weird if the session is invalid and bailing out if the
protocol was already violated.
2023-02-14 07:35:29 -07:00
Arne Welzel
de934b6af5 Merge remote-tracking branch 'origin/topic/awelzel/collect-repo-info-worktree'
* origin/topic/awelzel/collect-repo-info-worktree:
  ci/collect-repo-info.py: Recognize git worktrees, too
2023-02-14 11:00:19 +01:00
Arne Welzel
92e73606ba HashKey: Do not call Describe() unconditionally in DEBUG mode
An unnecessary overhead of the Hash() method was uncovered for DEBUG builds
due to computing a description of every HashKey() even when the DBG_HASHKEY
stream is not enabled. Squelch it.
2023-02-14 10:52:54 +01:00
Arne Welzel
b9218b2ec7 ci/collect-repo-info.py: Recognize git worktrees, too
Benjamin reported ci/collect-repo-info.py failing for him in
Git worktrees, use `git` to actually check if we're in a repo.
2023-02-14 10:06:09 +01:00
Eldon Koyle
beb19905c2 Use constexpr instead of #define 2023-02-13 09:34:42 -07:00
Arne Welzel
252cd33283 Merge remote-tracking branch 'origin/topic/awelzel/1405-include-build-info-in-executable'
* origin/topic/awelzel/1405-include-build-info-in-executable:
  docker: Add git to builder
  Add zeek -V/--build-info
2023-02-13 12:56:55 +01:00
Arne Welzel
e6f6b1343c docker: Add git to builder 2023-02-13 12:23:36 +01:00
Arne Welzel
3284259561 Add zeek -V/--build-info
This adds a new utility called ci/collect-repo-info.py to produce a JSON
document that is then baked into the Zeek executable file. Further, when
creating a tarball via `make dist`, put a top-level repo-info.json file
in place that is picked when no .git directory exists.

Closes #1405
2023-02-13 12:23:29 +01:00
Arne Welzel
2b33645f06 Merge remote-tracking branch 'origin/topic/awelzel/2765-cirrus-ci-container-images-follow-up'
* origin/topic/awelzel/2765-cirrus-ci-container-images-follow-up:
  docker/Makefile: Remove stray quotes, unused DOCKER
  cirrus/container: Polish, fix and automated pushing of images
2023-02-13 12:11:16 +01:00
Arne Welzel
2ceaf271f2 docker/Makefile: Remove stray quotes, unused DOCKER 2023-02-13 12:09:59 +01:00
Arne Welzel
357bdc71ad cirrus/container: Polish, fix and automated pushing of images
* Add ci/find-current-version.sh to figure out versions of lts and
  feature branch based on repository state.

* Do not use ZEEK_IMAGE_REPO for the local images that
  are expected to exist.

* Only use IMAGE_NAME/IMAGE_TAG instead of the ARCH and MANIFEST
  versions that contained the very same values

* Support and push additional tags

  In addition to the lts and feature tags, also push the base version
  tags. 5.0 or 5.1 such that someone pulling zeek/zeek:5.0 will get
  the most recent available 5.0 patch release.
2023-02-13 12:08:53 +01:00
Tim Wojtulewicz
b3fbfebd6a Merge remote-tracking branch 'origin/topic/vern/ZAM-Feb23-maint'
* origin/topic/vern/ZAM-Feb23-maint:
  better error reporting when ZAM code calls a function
  fix for ZAM compilation of "in" expressions
2023-02-11 22:07:45 -07:00
Tim Wojtulewicz
b79c34a321 Merge remote-tracking branch 'origin/topic/timw/3rdparty-sprintfs'
* origin/topic/timw/3rdparty-sprintfs:
  Update src/3rdparty submodule to get rid of some sprintf warnings
2023-02-11 21:39:56 -07:00
Eldon Koyle
269cc15888 Cleanup and add customer MAC addresses
* Put c-dst/c-src in l2_dst/l2_src
 * use #define instead of const int and move to PBB.h
2023-02-10 17:42:25 -07:00
Eldon Koyle
28d540483e Add PBB (802.1ah) support 2023-02-10 15:30:01 -07:00
Arne Welzel
6047846353 Merge remote-tracking branch 'origin/topic/timw/fix-cirrus-macos-builds'
* origin/topic/timw/fix-cirrus-macos-builds:
  CI: Call 'brew install' for macOS to ensure we're using openssl@3 on all hosts
2023-02-10 10:26:28 +01:00
Tim Wojtulewicz
62e29b5e20 CI: Call 'brew install' for macOS to ensure we're using openssl@3 on all hosts 2023-02-09 20:44:56 -07:00
Vern Paxson
2c9857a618 better error reporting when ZAM code calls a function 2023-02-09 11:24:35 -08:00
Vern Paxson
1b6df1a04c fix for ZAM compilation of "in" expressions 2023-02-09 11:21:40 -08:00
Tim Wojtulewicz
3ae135e857 Remove files in build/src/3rdparty from coverage reports 2023-02-09 12:04:53 -07:00
zeek-bot
e670f8ec89 Update doc submodule [nomail] [skip ci] 2023-02-09 00:21:56 +00:00
Christian Kreibich
7f96fc08fb Merge branch 'topic/christian/news-zeek-client'
* topic/christian/news-zeek-client:
  Cover zeek-client updates in NEWS [skip ci]
2023-02-08 11:14:54 -08:00
Christian Kreibich
6c0d44436c Cover zeek-client updates in NEWS [skip ci] 2023-02-08 11:05:52 -08:00
zeek-bot
eb8a9772b3 Update doc submodule [nomail] [skip ci] 2023-02-08 00:36:04 +00:00
Tim Wojtulewicz
f77a21c3ac Fix typo in README.md 2023-02-07 13:42:41 -07:00
Tim Wojtulewicz
d009fb3393 Merge remote-tracking branch 'origin/topic/timw/binpac-fixups'
* origin/topic/timw/binpac-fixups:
  Update binpac submodule for modernization fixes [nomail]
2023-02-07 10:29:44 -07:00
Tim Wojtulewicz
913b94b411 Update binpac submodule for modernization fixes [nomail] 2023-02-07 09:48:03 -07:00
zeek-bot
90d4c660b4 Update doc submodule [nomail] [skip ci] 2023-02-07 00:44:51 +00:00
Tim Wojtulewicz
562fdfa8a2 Update src/3rdparty submodule to get rid of some sprintf warnings 2023-02-06 12:31:25 -07:00
Tim Wojtulewicz
3baf222376 Merge remote-tracking branch 'origin/topic/awelzel/get-file-handle-fallback-and-no-new-event-when-fuzzing'
* origin/topic/awelzel/get-file-handle-fallback-and-no-new-event-when-fuzzing:
  krb/smb2_krb_nokeytab: Register get_file_handle() to avoid warnings
  fuzzer-setup: Do not always generate new_event
  EventHandler: Support unsetting generate_always
  files/main: No empty file_ids
2023-02-06 11:13:15 -07:00
Tim Wojtulewicz
647309f344 Merge remote-tracking branch 'origin/topic/timw/tsan-build-fixup'
* origin/topic/timw/tsan-build-fixup:
  CI: Fix the ThreadSanitizer build
2023-02-06 10:33:37 -07:00
Tim Wojtulewicz
ca91e1cd09 Updating CHANGES and VERSION. 2023-02-06 10:24:54 -07:00
Arne Welzel
b928a7d84d krb/smb2_krb_nokeytab: Register get_file_handle() to avoid warnings
Now that the common event handler logs a warning, ensure there's one
in place, even if it's just returning stub data.
2023-02-06 18:09:11 +01:00
Arne Welzel
d8b4667f80 fuzzer-setup: Do not always generate new_event
new_event should never be used on production systems, so don't turn
it on for fuzzing either as it showed up as bottlenecks in flamegraphs.
2023-02-06 18:09:11 +01:00
Arne Welzel
b66cd313db EventHandler: Support unsetting generate_always 2023-02-06 18:09:11 +01:00
Arne Welzel
e4ab7b2d70 files/main: No empty file_ids
When an analyzer calls DataIn(), there's a costly callback construct
going through the event queue. If an analyzer does not have a
get_file_handle() handler installed, the produced file_id would
end up empty and ignored. Consequently, the get_file_handle() callback
was invoked for every new DataIn() invocations.

This is surprising and costly. Log a warning when this happens and
instead set a generically generated file handle value instead to
prevent the repeated get_file_handle() invocations.
2023-02-06 18:08:05 +01:00
Tim Wojtulewicz
885ed71464 CI: Fix the ThreadSanitizer build 2023-02-06 09:47:46 -07:00
Tim Wojtulewicz
cdadc32985 Start of 6.0.0 development 2023-02-03 10:50:24 -07:00
Tim Wojtulewicz
37d0dc6372 Update docs submodule [nomail] 2023-02-03 10:27:15 -07:00
Tim Wojtulewicz
376f13125f Update local-compat test for 6.0 2023-02-03 10:07:55 -07:00
Tim Wojtulewicz
e008ab1b71 Merge remote-tracking branch 'origin/topic/bbannier/bump-spicy-plugin'
* origin/topic/bbannier/bump-spicy-plugin:
  Bump spicy-plugin to latest development snapshot.
2023-02-03 09:05:26 -07:00
Robin Sommer
e7e041be32
Merge remote-tracking branch 'origin/topic/robin/spicy-availability-check'
* origin/topic/robin/spicy-availability-check:
  Add BIF `have_spicy_analyzers()`.
2023-02-03 16:49:06 +01:00
Tim Wojtulewicz
96f82ea74d Update package-manager submodule [nomail] 2023-02-03 08:38:27 -07:00
Benjamin Bannier
811bdcdf53 Bump spicy-plugin to latest development snapshot. 2023-02-03 16:36:02 +01:00
Robin Sommer
bc252c63dc
Add BIF have_spicy_analyzers().
We previously used the Spicy plugin's `Spicy::available` to test for
Spicy support. However, having Spicy support does not necessarily mean that we
have built Zeek with its in-tree Spicy analyzers: the Spicy plugin
could have been pulled in from external. The new BIF now reliably
tells us whether the Spicy analyzers are available; its result
corresponds to what `zeek-config --have-spicy-analyzers` returns as
well.

We also move the two current checks over to use this BIF.

(Note: I refrained from renaming the CMake-side `USE_SPICY_ANALYERS`
to `HAVE_SPICY_ANALYZERS`. We should do this eventually for
consistency, but I didn't want to make more changes than necessary
right now.)
2023-02-03 13:47:26 +01:00
Arne Welzel
39f0b78043 Merge remote-tracking branch 'origin/topic/awelzel/no-binary-in-baselines'
* origin/topic/awelzel/no-binary-in-baselines:
  btest/decode_base_errors: Avoid binary output in baseline
2023-02-02 20:20:49 +01:00
Arne Welzel
4ac65ce8ca btest/decode_base_errors: Avoid binary output in baseline
Zeek prints the input string verbatim to the terminal and that's
upsetting btest just on Alpine.
2023-02-02 18:49:00 +01:00
Arne Welzel
622074108b Merge branch 'topic/awelzel/topic/no-container-images-on-branch-push-only'
* topic/awelzel/topic/no-container-images-on-branch-push-only:
  cirrus: No container images builds or cluster testing on branches
2023-02-02 18:36:16 +01:00
Arne Welzel
b6df7773a9 Merge remote-tracking branch 'origin/topic/awelzel/arm64-container-follow-ups-2'
* origin/topic/awelzel/arm64-container-follow-ups-2:
  Bump private testsuite for char handling fixes
  Base64: report byte as positive integer
  netbios_decode: use unsigned char for result
  analyzer/http: Do not assume char is signed
  cirrus: Run tests in a Debian 11 container, too
2023-02-02 18:35:02 +01:00
Arne Welzel
876bd3e974 cirrus: No container images builds or cluster testing on branches 2023-02-02 17:04:34 +01:00