Commit graph

4497 commits

Author SHA1 Message Date
Vern Paxson
ed75b82b3b Baseline "-a zam" update 2023-07-26 13:32:00 -07:00
Vern Paxson
35a6efbfa7 increase BTest wait time to abide ZAM compilation times 2023-07-26 13:32:00 -07:00
Tim Wojtulewicz
1f39a33442 Merge remote-tracking branch 'origin/topic/vern/ZAM-maint.Jul23'
* origin/topic/vern/ZAM-maint.Jul23:
  ZAM btest baseline update
  more extensive ZAM inlining & compilation of lambdas
  fixes for ZAM compilation of switch statements
  fix for ZAM inlining failing to inline function call arguments
  avoid constructing TypeList's on-the-fly for ListVal's with fixed types
  ZAM optimization for ?$ operator applied to non-optional fields
  ASSERT seatbelts for low-level vector accesses
  comment typo
  low-level ZAM micro-optimizations
  fix for recent smart pointer change
2023-07-17 16:33:46 -07:00
Vern Paxson
57e5d1462e ZAM btest baseline update 2023-07-17 16:31:31 -07:00
Vern Paxson
bf6d030894 -a cpp Btest baseline updates 2023-07-13 13:11:26 -07:00
Vern Paxson
42697d72f2 minor BTest generalizations & simplifications 2023-07-13 13:10:14 -07:00
Arne Welzel
b6bff8aa37 Merge remote-tracking branch 'origin/topic/awelzel/2709-colon-colon-for-global'
* origin/topic/awelzel/2709-colon-colon-for-global:
  ci: Bust Ubuntu 22.10 image cache
  Support :: prefix to reference global namespace, deprecate GLOBAL::
2023-07-12 17:29:51 +02:00
Tim Wojtulewicz
f9904511ab Merge remote-tracking branch 'origin/topic/awelzel/3145-dcerpc-state-clean'
* origin/topic/awelzel/3145-dcerpc-state-clean:
  dce-rpc: Test cases for unbounded state growth
  dce-rpc: Handle smb2_close_request() in scripts
  smb/dce-rpc: Cleanup DCE-RPC analyzers when fid is closed and limit them
  dce-rpc: Do not repeatedly register removal hooks
2023-07-11 16:17:12 -07:00
Arne Welzel
12a5616f4d Support :: prefix to reference global namespace, deprecate GLOBAL::
Closes #2709
2023-07-11 12:51:21 +02:00
Robin Sommer
cd2c193cb2
Merge remote-tracking branch 'origin/topic/robin/gh-3157-export-switch'
* origin/topic/robin/gh-3157-export-switch:
  [Spicy] Support `switch` fields when exporting Spicy types to Zeek.
2023-07-07 11:46:29 +02:00
Arne Welzel
f00dac544e Merge remote-tracking branch 'origin/topic/vern/GH-3159.B'
* origin/topic/vern/GH-3159.B:
  Fix for nested "when" statements leading to confusion over scoping
2023-07-06 11:35:47 +02:00
Robin Sommer
65e5e739d0
[Spicy] Support switch fields when exporting Spicy types to Zeek.
Closes #3157.
2023-07-06 08:40:54 +02:00
Vern Paxson
a1d25670fc Fix for nested "when" statements leading to confusion over scoping 2023-07-05 17:10:38 -07:00
Tim Wojtulewicz
d1ed0e577b Merge remote-tracking branch 'origin/topic/awelzel/3028-connection-flipped'
* origin/topic/awelzel/3028-connection-flipped:
  Update dump-events baseline, not running with OpenSSL 3
  Conn: In-place val flip and connection_flipped()
  Conn: Remove is_version_sep()
  Remove icmp_conn leftovers
2023-07-05 13:32:34 -07:00
Arne Welzel
fe71202f25 Merge remote-tracking branch 'origin/topic/awelzel/global-ids-with-modules'
* origin/topic/awelzel/global-ids-with-modules:
  global_ids(): Include module names
2023-07-05 15:33:30 +02:00
Arne Welzel
4cde1c3c3f global_ids(): Include module names
Ad-hoc include module names in the global_ids() table. Table values will
have the type_name field set to "module" and their key in the table is
prefixed with "module " to avoid clashes with existing global identifiers
shadowing module names (Management::Node being an existing example).

Closes #3136
2023-07-05 14:09:20 +02:00
Arne Welzel
cbdeb4abf2 Update dump-events baseline, not running with OpenSSL 3 2023-07-05 10:25:14 +02:00
Arne Welzel
a2214ad611 Conn: In-place val flip and connection_flipped()
Avoids loosing state on a connection value when a connection is flipped.

Fixes up the NTP baseline as well where this was visible: analyzer_confirmation_info()
was raised for a connection value which was immediately forgotten due to
the subsequent connection flipping.

Closed #3028
2023-07-04 20:01:17 +02:00
Arne Welzel
23e9928ca2 dce-rpc: Test cases for unbounded state growth
Pcaps produced as shown in #3145 using a samba container and rpcclient.
2023-06-30 15:14:35 +02:00
Arne Welzel
ccfc68fccd Fixup external hashes modified during merge 2023-06-30 11:53:59 +02:00
Arne Welzel
fcc38d3b4f Merge remote-tracking branch 'origin/topic/vern/zam-feature-complete'
* origin/topic/vern/zam-feature-complete: (23 commits)
  documentation updates
  updates to ZAM-specific BTest baseline
  Address PR review feedback on zam-feature-complete
  Updates to BTest baselines due to previous BTest tweaks
  tweaks to BTests for ZAM feature completeness; new ZAM-only btest
  removal of unused functionality and some follow-on simplifications
  feature completeness for ZAM
  -O gen-C++ tweaks to be compatible with ZAM changes
  ZAM support for "when" statements
  ZAM changes intermixed with lambda and "when" support
  WhenStmt/WhenInfo restructuring in support of ZAM "when" statements
  ZAM support for lambdas
  ZAM internals have a notion of "captures" as global-like variables
  AST profiling enhnacements in support of script optimization for lambdas/whens
  refinements to LambdaExpr's to provide flexibility, support for ZVal captures
  support in ScriptFunc class for ZVal-oriented vector of captures
  simplifications to the Frame class now that it no longer has to support old-style captures
  use Ingredients directly for constructing functions
  the "Capture" struct is now a class
  more debugging information when dumping script optimization data structures
  ...
2023-06-30 10:19:44 +02:00
Vern Paxson
bd30baf42f updates to ZAM-specific BTest baseline 2023-06-30 09:59:29 +02:00
Vern Paxson
46d3526b40 Updates to BTest baselines due to previous BTest tweaks 2023-06-30 09:36:14 +02:00
Vern Paxson
a4cf10e34d tweaks to BTests for ZAM feature completeness; new ZAM-only btest 2023-06-30 09:36:14 +02:00
Arne Welzel
95529ef7c0 Add test with MUD example
This came up as a use-case on GitHub showing the limitations of the
opinionated approach. Add it as an example.

Reference https://www.rfc-editor.org/rfc/rfc8520#section-9
2023-06-29 15:57:52 +02:00
Arne Welzel
480d52ca1f from_json: Support function to normalize key names
When a JSON document contains key names containing colons or other
special characters that are not valid in Zeek identifiers, from_json()
cannot be used to parse such input.

This change allows a customizable normalization function.

Closes #3142.
2023-06-29 15:57:49 +02:00
Arne Welzel
b18122da08 Merge branch 'master' of https://github.com/progmboy/zeek
* 'master' of https://github.com/progmboy/zeek:
  fix http AUTHORIZATION base64 decode failed

Added a test during merge.
2023-06-27 18:21:34 +02:00
Arne Welzel
0b317aced3 telemetry: Disable metrics centralization by default
Move the telemetry/cluster.zeek file over into policy/frameworks/telemetry/prometheus.zeek.

Mention it in local.zeek.

Relates to zeek/broker#366.
2023-06-21 20:13:55 +02:00
Tim Wojtulewicz
24f184fd8a Update external testing hashes for 6.1 deprecation changes 2023-06-15 19:45:05 -07:00
Tim Wojtulewicz
c45015bcb7 Remove leftover baseline files from 6.1 deprecation removal 2023-06-15 19:45:05 -07:00
Tim Wojtulewicz
3ad0bee7a2 Update external testing repo hashes to current master commits 2023-06-15 16:27:17 -07:00
Tim Wojtulewicz
38a3385daa Merge remote-tracking branch 'origin/topic/vern/CPP-Jun23-maint'
* origin/topic/vern/CPP-Jun23-maint:
  -O gen-C++ refinements for BiF failures, negative vector indices, boolean vector operations
2023-06-15 16:25:58 -07:00
Vern Paxson
18be4ba91b -O gen-C++ refinements for BiF failures, negative vector indices, boolean vector operations 2023-06-15 15:07:18 -07:00
Tim Wojtulewicz
c0a0f719d1 Merge remote-tracking branch 'origin/topic/vern/ZAM-Jun23-maint'
* origin/topic/vern/ZAM-Jun23-maint:
  ZAM documentation updates
  ZAM bug fix for incorrect management of global variables
  ZAM bug fix (simplification) for nested inline functions that don't do anything
  ZAM support for negative vector indices
  ZAM ignores new "assert" statement
  fixes for doing "script validation" to check for ZAM compile-ability
  tweak for Broker BTest that needs a delay for ZAM
  BTest baseline updates for minor Zeek differences (in one case, no difference)
  BTest to check for invalid negative vector indices
2023-06-15 14:21:26 -07:00
Arne Welzel
5a9c6d4633 Merge remote-tracking branch 'origin/topic/awelzel/duplicate-plugin-no-debug'
* origin/topic/awelzel/duplicate-plugin-no-debug:
  plugin/Manager: Warn when plugin with the same name is found
2023-06-15 18:39:49 +02:00
Vern Paxson
5165a04ae0 ZAM ignores new "assert" statement 2023-06-14 17:41:41 -07:00
Vern Paxson
cae5d30c62 tweak for Broker BTest that needs a delay for ZAM 2023-06-14 17:37:46 -07:00
Vern Paxson
6c9bab29e9 BTest baseline updates for minor Zeek differences (in one case, no difference) 2023-06-14 17:37:07 -07:00
Vern Paxson
40d7e6949a BTest to check for invalid negative vector indices 2023-06-14 17:35:08 -07:00
Tim Wojtulewicz
453c0ff7b5 Update external test baselines 2023-06-14 10:07:23 -07:00
Tim Wojtulewicz
d5b19c61ff Change table initialization deprecation to error 2023-06-14 10:07:23 -07:00
Tim Wojtulewicz
0d25583049 Remove Supervisor::NodeConfig (6.1 deprecation) 2023-06-14 10:07:22 -07:00
Tim Wojtulewicz
531276cfe0 Remove LogAscii::logdir (6.1 deprecation) 2023-06-14 10:07:22 -07:00
Tim Wojtulewicz
0110c15ee2 Make break/next/continue outside loops an error (6.1 deprecation) 2023-06-14 10:07:22 -07:00
Tim Wojtulewicz
9a79b98a1e Remove analyzer_confirmation/analyzer_violation events (6.1 deprecation) 2023-06-14 10:07:22 -07:00
Tim Wojtulewicz
a55e5e3724 Remove full scripts marked as 6.1 deprecations 2023-06-14 10:07:22 -07:00
Tim Wojtulewicz
4229af6820 Remove deprecations tagged for v6.1 2023-06-14 10:07:22 -07:00
Arne Welzel
fdd6dfd096 plugin/Manager: Warn when plugin with the same name is found
This was brought up on Slack as a potential source of confusion during
development as it's not visible when plugin directories are ignored outside
of looking into the plugin debug stream. I'd actually prefer to just
FatalError() this, but a warning seems reasonably visible for interactive
usage.
2023-06-14 17:36:18 +02:00
Arne Welzel
2f1ea789d1 Merge remote-tracking branch 'origin/topic/awelzel/2285-assert-statement'
* origin/topic/awelzel/2285-assert-statement:
  NEWS: Small section about assert statement
  Stmt: Rework assertion hooks break semantics
  Stmt: Introduce assert statement and related hooks
  ZeekArgs: Helper for empty arguments
  Reporter: Allow AssertStmt to throw InterpreterException
  Lift backtrace() code into Func.{h,cc}
2023-06-14 12:51:53 +02:00
Arne Welzel
e1a81c528c tests: Do not use archiver_rotation_format_func as postprocessor
This test triggered ubsan by putting a function with the wrong type
as a post-processor into the .shadow file. Don't do that.

Likely Zeek should provide a better error message, but hand-crafting
.shadow files isn't what is normally done and this is to fix the
master build for now.
2023-06-13 19:17:32 +02:00