Commit graph

14938 commits

Author SHA1 Message Date
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
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
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
Tim Wojtulewicz
e07f3f305d Remove parser error message for bro_init, et al 2023-05-02 12:06:41 -07:00
Arne Welzel
df0788252e Merge remote-tracking branch 'origin/topic/awelzel/2994-ip-mf-df-offset'
* origin/topic/awelzel/2994-ip-mf-df-offset:
  ip4_hdr: Add DF, MF, offset and sum fields
2023-05-02 20:45:43 +02:00
Dominik Charousset
7b35d471ad Include compiler in --show-config output 2023-05-02 20:44:48 +02:00
Dominik Charousset
c2c34148ca Fix CMake option defaults on Windows 2023-05-02 20:43:33 +02:00
Arne Welzel
5570f806ca Merge remote-tracking branch 'origin/topic/awelzel/2991-unload-zeek-package'
* origin/topic/awelzel/2991-unload-zeek-package:
  unload: Fix unloading of packages
2023-05-02 20:28:07 +02:00
Tim Wojtulewicz
86839aee34 Surround string assignments in zeek-config in quotes 2023-05-02 11:24:40 -07:00
Tim Wojtulewicz
c02940e4f3 Merge remote-tracking branch 'origin/topic/timw/windows-setvbuf'
* origin/topic/timw/windows-setvbuf:
  Use workaround for setvbuf on Windows in DebugLogger/Extract file analyzer
  Add ifdef'd implementation of setvbuf to zeek::util
2023-05-02 11:13:03 -07:00
Tim Wojtulewicz
29b0380815 Use workaround for setvbuf on Windows in DebugLogger/Extract file analyzer 2023-05-02 10:28:50 -07:00
Tim Wojtulewicz
f2a3e23dfa Add ifdef'd implementation of setvbuf to zeek::util 2023-05-02 10:28:50 -07:00
Tim Wojtulewicz
71731ffcb1 Merge remote-tracking branch 'origin/topic/timw/smith-waterman-compare-semantics'
* origin/topic/timw/smith-waterman-compare-semantics:
  Fix smith-waterman sorting to follow correct Compare semantics
2023-05-02 09:42:33 -07:00
Tim Wojtulewicz
81b94423a0 Fix smith-waterman sorting to follow correct Compare semantics 2023-04-30 11:54:08 -07:00
Arne Welzel
df4f90b65c ip4_hdr: Add DF, MF, offset and sum fields
For low-level packet analysis use-cases, these fields are currently
not script-land accessible via raw_packet() or so. They are accessible
on the icmp_context record, but not on the actual ip4_hdr record, so
add them.
2023-04-29 17:09:43 +02:00