Commit graph

14950 commits

Author SHA1 Message Date
mAsk°
e08e4a5fee Fix memory leak caused by pattern compilation failure 2023-05-10 05:42:03 +00:00
zeek-bot
c543387ce0 Update doc submodule [nomail] [skip ci] 2023-05-10 00:37:23 +00:00
Tim Wojtulewicz
04d23a8b5b Merge remote-tracking branch 'origin/topic/awelzel/3013-btest-core-network-time-broker'
* origin/topic/awelzel/3013-btest-core-network-time-broker:
  core.network_time.broker: Test reliability improvement
2023-05-09 13:38:52 -07:00
Tim Wojtulewicz
9d46db484f Merge remote-tracking branch 'origin/topic/awelzel/3005-public-ecr-vacuum'
* origin/topic/awelzel/3005-public-ecr-vacuum:
  ci: Add public-ecr-vacuum.sh
2023-05-09 13:38:25 -07:00
Tim Wojtulewicz
51b7a81926 Merge remote-tracking branch 'origin/topic/timw/update-submodule-pointers'
* origin/topic/timw/update-submodule-pointers:
  Updating submodule(s) [nomail]
2023-05-09 12:54:36 -07:00
Tim Wojtulewicz
2a587ad9c9 Updating submodule(s) [nomail] 2023-05-09 12:52:28 -07:00
Arne Welzel
ef2b30ba34 Merge remote-tracking branch 'origin/topic/awelzel/2930-2931-add-log2-and-ceil'
* origin/topic/awelzel/2930-2931-add-log2-and-ceil:
  zeek.bif: Add log2() and ceil()
2023-05-09 19:11:35 +02:00
Arne Welzel
6cb391f9a2 zeek.bif: Add log2() and ceil()
Closes #2930, #2931.
2023-05-09 18:57:57 +02:00
Tim Wojtulewicz
c0d15d6d0e Merge remote-tracking branch 'origin/topic/timw/cmake-format'
* origin/topic/timw/cmake-format:
  Use the same rules as cmake submodule to reformat Zeek
  Update cmake submodule after reformat
2023-05-09 09:06:00 -07:00
Tim Wojtulewicz
84e3f414a7 Use the same rules as cmake submodule to reformat Zeek 2023-05-09 08:31:43 -07:00
Tim Wojtulewicz
fd72d81bad Update cmake submodule after reformat 2023-05-09 08:31:43 -07:00
Arne Welzel
9330a74fe1 Merge remote-tracking branch 'origin/topic/awelzel/zeek-archiver-multiple-loggers'
* origin/topic/awelzel/zeek-archiver-multiple-loggers:
  cluster/supervisor: Multi-logger awareness
  Bump zeek-archiver submodule
2023-05-09 15:20:53 +02:00
Arne Welzel
1facc34e09 Fixup Val.h/Val.cc: Actually move ValFromJSON into zeek::detail
Lost during merge..
2023-05-09 11:23:32 +02:00
Arne Welzel
264284150b Merge remote-tracking branch 'amazing-pp/topic/fupeng/from_json_bif'
* amazing-pp/topic/fupeng/from_json_bif:
  Implement from_json bif

Minor updates during merge: Moved ValFromJSON into zeek::detail for the
time being, removed gotos, normalized some error messages to lower case,
minimal test extension and added a raw reader input framework test reading
"json lines" as a demo, adding notes about the implicit type
conversions.
2023-05-09 10:36:58 +02:00
Fupeng Zhao
584e68434d Implement from_json bif 2023-05-06 00:42:46 +00:00
Tim Wojtulewicz
49b01c3867 Merge remote-tracking branch 'origin/topic/vern/script-opt-maint.May23'
* origin/topic/vern/script-opt-maint.May23:
  BTest baseline updates for -O gen-C++
  updates to C++ maintenance scripts to better handle uncompilable BTests
  added ZEEK_REPORT_UNCOMPILABLE environment variable for "-O report-uncompilable"
  BTest baseline updates for ZAM
2023-05-05 14:08:28 -07:00
Arne Welzel
02b7439d44 Revert "Skip version.h by default for Zeek sources"
This reverts commit 8246baf25c.

Actually fails the include_plugins CI test and I had just
opened another related issue.
2023-05-05 21:05:17 +02:00
Vern Paxson
832f48382c BTest baseline updates for -O gen-C++ 2023-05-05 12:03:00 -07:00
Vern Paxson
7d7a293c04 updates to C++ maintenance scripts to better handle uncompilable BTests 2023-05-05 12:01:31 -07:00
Vern Paxson
c173cfdbe7 added ZEEK_REPORT_UNCOMPILABLE environment variable for "-O report-uncompilable" 2023-05-05 12:00:55 -07:00
Arne Welzel
ab4f231232 Merge remote-tracking branch 'origin/topic/neverlord/gh-3019'
* origin/topic/neverlord/gh-3019:
  Skip version.h by default for Zeek sources
2023-05-05 20:15:12 +02:00
Tim Wojtulewicz
152f7aae40 Merge remote-tracking branch 'origin/topic/timw/docs-action-only-for-master'
* origin/topic/timw/docs-action-only-for-master:
  generate-docs: Only update submodule pointer during scheduled builds
2023-05-05 08:48:28 -07:00
Dominik Charousset
8246baf25c Skip version.h by default for Zeek sources 2023-05-05 17:12:10 +02:00
Arne Welzel
979f2df57d core.network_time.broker: Test reliability improvement
I wasn't able to reproduce this locally, but after looking at
-B main-loop,tm for a bit it dawned that if the manager is sending
ticks too fast, the Broker IO source may consume two ticks in one go
before expiring timers and that would explain the observed baseline
differences.

Solve this by removing the reliance on realtime delays and switch to
a request-reply pattern instead.

Also fix indentation and bogus messages.

Fixes #3013
2023-05-05 14:08:29 +02:00
Arne Welzel
c813872915 cluster/supervisor: Multi-logger awareness
When multiple loggers are configured in a Supervisor controlled cluster
configuration, encode extra information into the rotated filename to
identify which logger produced the log.

This is similar to the approach taken for ZeekControl, re-using the
log_suffix terminology, but as there's only a single zeek-archiver
process and no postprocessors and no other side-channel for additional
information, we encode extra metadata into the filename. zeek-archiver
is extended to recognize the special metadata part of the filename.

This also solves the issue that multiple loggers in a supervisor setup
overwrite each others log files within a single log-queue directory.
2023-05-05 12:27:25 +02:00
Arne Welzel
2f035dbc07 Bump zeek-archiver submodule 2023-05-05 12:24:18 +02:00
Arne Welzel
4387532613 ci: Add public-ecr-vacuum.sh 2023-05-05 12:11:09 +02:00
zeek-bot
2044cf661a Update doc submodule [nomail] [skip ci] 2023-05-05 00:28:17 +00:00
Tim Wojtulewicz
223de9c815 generate-docs: Only update submodule pointer during scheduled builds 2023-05-04 14:52:21 -07:00
Arne Welzel
630db664a8 Merge remote-tracking branch 'origin/topic/awelzel/2998-ntp-flip-roles'
* origin/topic/awelzel/2998-ntp-flip-roles:
  NTP: Detect out-of-order packets
2023-05-04 20:08:50 +02:00
Tim Wojtulewicz
44b7e91f87 Merge remote-tracking branch 'origin/topic/neverlord/gh-2711'
* origin/topic/neverlord/gh-2711:
  Integrate review feedback
  Include compiler in --show-config output
  Fix CMake option defaults on Windows
  Move build defaults from configure to CMake
2023-05-04 10:56:46 -07:00
Vern Paxson
148673a5c1 BTest baseline updates for ZAM 2023-05-04 10:52:38 -07:00
Arne Welzel
2c8b97c522 NTP: Detect out-of-order packets
The NTP mode provides us with the identity of the endpoints. For the
simple CLIENT / SERVER modes, flip the connection if we detect
orig/resp disagreeing with what the message says. This mainly
results in the history getting a ^ and the ntp.log / conn.log
showing the corrected endpoints.

Closes #2998.
2023-05-04 19:44:02 +02:00
Arne Welzel
12252743b1 Merge remote-tracking branch 'origin/topic/awelzel/smb2-state-handling'
* origin/topic/awelzel/smb2-state-handling:
  NEWS: Add entry about SMB::max_pending_messages and state discarding
  scripts/smb2-main: Reset script-level state upon smb2_discarded_messages_state()
  smb2: Limit per-connection read/ioctl/tree state
2023-05-04 09:40:19 +02:00
zeek-bot
8e49c87912 Update doc submodule [nomail] [skip ci] 2023-05-04 00:24:39 +00:00
Tim Wojtulewicz
8eed46dfa1 Merge remote-tracking branch 'origin/topic/johanna/update-ssl-databases'
* origin/topic/johanna/update-ssl-databases:
  Update Mozilla CA and Google CT lists
2023-05-03 11:13:23 -07:00
Tim Wojtulewicz
87636947a6 Merge remote-tracking branch 'origin/topic/timw/zeek-config-quoted-strings'
* origin/topic/timw/zeek-config-quoted-strings:
  Surround string assignments in zeek-config in quotes
2023-05-03 09:31:44 -07:00
Tim Wojtulewicz
7305f2ba9b Merge remote-tracking branch 'origin/topic/timw/2997-ding-dong-bro-init-is-dead'
* origin/topic/timw/2997-ding-dong-bro-init-is-dead:
  Remove parser error message for bro_init, et al
2023-05-03 09:31:26 -07:00
Tim Wojtulewicz
bc82b657c4 Merge remote-tracking branch 'origin/topic/timw/ieee-80211-length-check'
* origin/topic/timw/ieee-80211-length-check:
  Add additional length check to IEEE 802.11 analyzer
2023-05-03 09:31:08 -07:00
Johanna Amann
bef1d51015 Update SQLite to 3.41.2
[nomail]
2023-05-03 14:22:08 +01:00
Johanna Amann
9742d9a76e Merge branch 'topic/johanna/no-error-message-durning-tls-or-dtls-protocol-violations'
* topic/johanna/no-error-message-durning-tls-or-dtls-protocol-violations:
  SSL: failing analyzer handling - address review feedback
  SSL: do not try to disable failed analyzer

Also folds in minor feedback from GH-3012
2023-05-03 14:20:44 +01:00
Johanna Amann
9a47e201f8 SSL: failing analyzer handling - address review feedback
Fold the two analyzer_violation_info events into one. See GH-3012
2023-05-03 13:41:36 +01:00
Johanna Amann
21888a145a SSL: do not try to disable failed analyzer
Currently, if a TLS/DTLS analyzer fails with a protocol violation, we
will still try to remove the analyzer later, which results in the
following error message:

error: connection does not have analyzer specified to disable

Now, instead we don't try removing the analyzer anymore, after a
violation occurred.
2023-05-03 11:16:14 +01:00
Johanna Amann
40a4da94b6 Update Mozilla CA and Google CT lists 2023-05-03 10:46:41 +01:00
Arne Welzel
042aa1383b NEWS: Add entry about SMB::max_pending_messages and state discarding 2023-05-03 11:22:01 +02:00
Arne Welzel
3ac877e20d scripts/smb2-main: Reset script-level state upon smb2_discarded_messages_state()
This is similar to what the external corelight/zeek-smb-clear-state script
does, but leverages the smb2_discarded_messages_state() event instead of
regularly checking on the state of SMB connections.

The pcap was created using the dperson/samba container image and mounting
a share with Linux's CIFS filesystem, then copying the content of a
directory with 100 files. The test uses a BPF filter to imitate mostly
"half-duplex" traffic.
2023-05-03 11:22:01 +02:00
Arne Welzel
5caab1a667 smb2: Limit per-connection read/ioctl/tree state
Users on Slack observed memory growth in an environment with a lot of
SMB traffic. jeprof memory profiling pointed at the offset and fid maps
kept per-connection for smb2 read requests.

These maps can grow unbounded if responses are seen before requests, there's
packet drops, just one side of the connection is visible, or we fail to parse
responses properly.

Forcefully wipe out these maps when they grow too large and raise
smb2_discarded_messages_state() to notify script land about this.
2023-05-03 10:58:59 +02:00
zeek-bot
cc25129b2f Update doc submodule [nomail] [skip ci] 2023-05-03 00:48:40 +00:00
Tim Wojtulewicz
7782f73251 Add additional length check to IEEE 802.11 analyzer 2023-05-02 16:12:43 -07:00
Dominik Charousset
94ec8167b2
Integrate review feedback
Co-authored-by: Tim Wojtulewicz <timwoj@gmail.com>
2023-05-02 21:24:53 +02:00