Commit graph

15389 commits

Author SHA1 Message Date
Yacin Nadji
4a04b563f5 GH-2319: Add change handlers to Site 2022-08-05 16:17:50 +02:00
Arne Welzel
3fe930dbf2 Introduce telemetry framework
Adds base/frameworks/telemetry with wrappers around telemetry.bif
and updates telemetry/Manager to support collecting metrics from
script land.

Add policy/frameworks/telemetry/log for logging of metrics data
into a new telemetry.log and telemetry_histogram.log and add into
local.zeek by default.
2022-08-05 11:43:44 +02:00
zeek-bot
901bc1e983 Update doc submodule [nomail] [skip ci] 2022-08-05 00:35:30 +00:00
Annie Bryan
d916469510 Added test case with back-to-back notices 2022-08-04 11:25:20 +02:00
Annie Bryan
e96d3743b4
Merge branch 'zeek:master' into notice-suppression-bug-fix 2022-08-04 10:03:51 +02:00
Arne Welzel
95fba8fd29 Bump broker submodule to master.
Includes changes to run a collector in the broker::telemetry layer,
as well as pybind upgrade, no-discard removals and formatting changes.
2022-08-04 09:16:10 +02:00
Tim Wojtulewicz
9b546cbb2b Merge remote-tracking branch 'origin/topic/awelzel/config-util-fmt-thread-fmt'
* origin/topic/awelzel/config-util-fmt-thread-fmt:
  input/config: Use thread-safe Fmt() rather than util::fmt() for regex formatting
2022-08-03 10:27:38 -07:00
Tim Wojtulewicz
930fd75ed8 Merge remote-tracking branch 'origin/topic/awelzel/2010-zeek-done-change-handlers'
* origin/topic/awelzel/2010-zeek-done-change-handlers:
  testing/missing-enum-value: redef exit_only_after_terminate=T
  option.bif: Short-circuit option changes when terminating
2022-08-03 10:27:06 -07:00
Tim Wojtulewicz
3ffffe33bc Merge remote-tracking branch 'origin/topic/vern/bit-shift-fixes'
* origin/topic/vern/bit-shift-fixes:
  btest portability fix address review comment about shifting corner-case
  canonicalize filenames for new vector deprecation btest
  updates for gen-C++ maintenance, including skipping some inappropriate tests
  fix for profiling "when" statements
  gen-C++ support for vector bit-shift operations
  corrected wording in some btest comments
  make gen-C++ maintenance scripts directly executable
  ZAM support for bit-shifting
  don't allow deprecated-style mixing of vectors and scaling for shifting leverage restrictions placed on shifting (RHS is always unsigned) split deprecated vector operations into separate test, with separate ZAM baseline
  ZAM fix for vector "in" operator
  ensure that language tests pay attention to .stderr
  fix vector tests, including checking for errors
2022-08-03 09:56:55 -07:00
Annie Bryan
82ee17be8d Fix notice suppression atomicity bug 2022-08-03 16:30:57 +02:00
Vern Paxson
c10885e5f9 btest portability fix
address review comment about shifting corner-case
2022-08-02 19:36:25 -07:00
zeek-bot
85e8d17887 Update doc submodule [nomail] [skip ci] 2022-08-03 00:42:36 +00:00
Arne Welzel
866f8269ab input/config: Use thread-safe Fmt() rather than util::fmt() for regex formatting
Calling util::fmt() from DoUpdate() of a thread is not safe as it is
using a statically allocated buffer and other threads or the main
thread may concurrently modify this buffer.

This was found by observing the scripts.base.frameworks.config.several-files
failing once in a blue moon (1/250 sometimes 1/1000 runs) with messages like
"Failed to compile regex: Parenthesis is not closed.":

    scripts.base.frameworks.config.several-files ...
      > btest-bg-run zeek zeek -b %INPUT
      > btest-bg-wait 10
    ... scripts.base.frameworks.config.several-files failed
      % 'btest-bg-wait 10' failed unexpectedly (exit code 1)
      % cat .stderr
      The following processes did not terminate:
      zeek -b /home/awelzel/corelight-oss/zeek/testing/btest/.tmp/scripts.base.frameworks.config.several-files/several-files.zeek
      -----------
      <<< [3667265] zeek -b /home/awelzel/corelight-oss/zeek/testing/btest/.tmp/scripts.base.frameworks.config.several-files/several-files.zeek
      error: ../configfile1/Input::READER_CONFIG: Failed to compile regex: Parenthesis is not closed.
      received termination signal
      >>>
2022-08-02 21:43:03 +02:00
Tim Wojtulewicz
c82eb13cc8 Merge remote-tracking branch 'pbcullen/topic/pbcullen/prevent-large-dhcp-logs'
* pbcullen/topic/pbcullen/prevent-large-dhcp-logs:
  Update plugins.hooks baseline with new DHCP options
  Prevent large dhcp log entries
2022-08-02 12:38:03 -07:00
Vern Paxson
ea3d25b380 canonicalize filenames for new vector deprecation btest 2022-08-02 12:37:33 -07:00
Tim Wojtulewicz
2cba2415fd Merge remote-tracking branch 'origin/topic/timw/1129-slash-s-patterns'
* origin/topic/timw/1129-slash-s-patterns:
  Add support for /s modifier to RE matcher and parser
  Code cleanup in RE_Matcher code
  Add basic unit tests for RE_Matcher
  Add /s modifier to parser for patterns
2022-08-02 11:33:35 -07:00
Tim Wojtulewicz
18126c2d50 Add support for /s modifier to RE matcher and parser 2022-08-02 11:31:57 -07:00
Tim Wojtulewicz
f67f6e4507 Code cleanup in RE_Matcher code
- Use std::string in Specific_RE_Matcher instead of char*
- Change a couple of ints-as-bools to bools
2022-08-02 11:31:57 -07:00
Tim Wojtulewicz
abf2da781d Add basic unit tests for RE_Matcher 2022-08-02 11:31:57 -07:00
Tim Wojtulewicz
36e31e28ac Add /s modifier to parser for patterns 2022-08-02 11:31:57 -07:00
Tim Wojtulewicz
14e48733ac Update gen-zam submodule [nomail] 2022-08-02 10:43:52 -07:00
Fatema BW
660278be1f
Update src/packet_analysis/protocol/tcp/TCPSessionAdapter.cc
Co-authored-by: Robin Sommer <robin@icir.org>
2022-08-02 10:02:32 -07:00
Fatema BW
1348b739ab
Updating the weird names to use all lower case 2022-08-02 10:01:31 -07:00
Fatema BW
5ffeb657a5
Fixing whitespaces.. 2022-08-02 09:59:34 -07:00
AmazingPP
2c4449e19a Use json_escape_utf8 in broker debug output 2022-08-02 21:11:40 +08:00
peter.cullen
d93eb0b002 Update plugins.hooks baseline with new DHCP options 2022-08-02 11:42:04 +00:00
Vern Paxson
7a41170a59 updates for gen-C++ maintenance, including skipping some inappropriate tests 2022-08-01 16:47:17 -07:00
Vern Paxson
c034dc68ed fix for profiling "when" statements 2022-08-01 13:36:24 -07:00
Vern Paxson
1bbf345e46 gen-C++ support for vector bit-shift operations 2022-08-01 10:26:26 -07:00
Tim Wojtulewicz
6fd0645aef Merge branch 'topic/timw/1344-illegal-base-type'
* topic/timw/1344-illegal-base-type:
  GH-1344: Give better warning when using a type that doesn't exist
2022-08-01 09:57:05 -07:00
Vern Paxson
8640430920 corrected wording in some btest comments 2022-07-31 15:06:02 -07:00
Vern Paxson
f912ac06ff make gen-C++ maintenance scripts directly executable 2022-07-31 11:31:01 -07:00
Vern Paxson
f535a7c3a7 ZAM support for bit-shifting 2022-07-30 18:33:57 -07:00
Vern Paxson
99e265bf87 don't allow deprecated-style mixing of vectors and scaling for shifting
leverage restrictions placed on shifting (RHS is always unsigned)
split deprecated vector operations into separate test, with separate ZAM baseline
2022-07-30 18:17:22 -07:00
Vern Paxson
6185d1c389 ZAM fix for vector "in" operator 2022-07-30 18:17:13 -07:00
Vern Paxson
5569d81953 ensure that language tests pay attention to .stderr 2022-07-29 21:30:40 -07:00
Vern Paxson
8d3265d540 fix vector tests, including checking for errors 2022-07-29 21:26:02 -07:00
Tim Wojtulewicz
8e4017f781 GH-1344: Give better warning when using a type that doesn't exist 2022-07-29 12:38:25 -07:00
Tim Wojtulewicz
6d16f9bb42 Merge remote-tracking branch 'origin/topic/timw/bit-shift-error-handling'
* origin/topic/timw/bit-shift-error-handling:
  Add btest for vector bit-shift operators
  Handle error cases for bit-shift operators more cleanly
2022-07-29 12:10:27 -07:00
Tim Wojtulewicz
25b49bf6ea Merge remote-tracking branch 'origin/topic/timw/clang-format-patricia'
* origin/topic/timw/clang-format-patricia:
  Update 3rdparty submodule to get patricia reformat
2022-07-29 12:01:07 -07:00
Tim Wojtulewicz
cfd977c4dd Update 3rdparty submodule to get patricia reformat 2022-07-29 11:21:13 -07:00
Arne Welzel
07f1895925 testing/missing-enum-value: redef exit_only_after_terminate=T
Seems this was the intention all along as the corresponding terminate()
call is there.
2022-07-29 18:22:03 +02:00
Arne Welzel
11cde53373 option.bif: Short-circuit option changes when terminating
Due to the asynchronous behavior of the input framework and broker
communication, change handlers were previously called even after
zeek_done() event processing completed and also broker shutdown.

Accessing broker store handles within change handlers this late
triggered invalid Broker store handle messages:

    error in ././my_option_store.zeek, line 13: invalid Broker store handle (Broker::put(Test::store, to_any_coercemy_option, to_any_coerceTest::new_value, 0 secs) and broker::store::{})

Fixes #2010
2022-07-29 18:22:03 +02:00
Fatema BW
33bfe67562
Fixing clang pre-commit error 2022-07-28 23:10:35 -07:00
Fatema BW
e2bd8f0eb1
Add check for option 27 2022-07-28 22:54:59 -07:00
Fatema BW
70b3e28dd9
Add the parsed fields for TCP option 27 2022-07-28 22:53:36 -07:00
Fatema BW
622733c4ba
Add TCP options bad length check 2022-07-28 22:51:15 -07:00
Tim Wojtulewicz
28081d1efa Update 3rdparty submodule [nomail] 2022-07-28 12:12:46 -07:00
Peter Cullen
fb4858d42b Prevent large dhcp log entries
A flood of DHCP traffic can result if very large log entries consisting
of many uids and/or msg_types. Such large log entries can disrupt a SIEM
ingestion pipeline. This change forcing a log entry to be written when
the number of uids or the number of msg_Types exceed a certain value.
The values are treated as options for easy configuration.
2022-07-28 11:34:18 -07:00
Tim Wojtulewicz
c56e895bee Merge remote-tracking branch 'origin/topic/timw/reenable-coverage-upload'
* origin/topic/timw/reenable-coverage-upload:
  Re-enable sending coverage data to Coveralls via Cirrus
2022-07-28 11:22:09 -07:00