Commit graph

16449 commits

Author SHA1 Message Date
Vern Paxson
d69738849e bug fixes 2024-05-16 13:48:02 -07:00
Vern Paxson
2befa8d3a9 better printing of expressions 2024-05-16 13:45:11 -07:00
Vern Paxson
25b71c7d66 bug-squashing 2024-05-08 17:40:06 -07:00
Vern Paxson
039e670097 remove vestigial statement counterparts 2024-05-08 16:53:37 -07:00
Vern Paxson
265788b50b script optimization support 2024-05-08 16:48:02 -07:00
Vern Paxson
905ed55389 add/delete expressions working w/ interpreter 2024-05-08 12:52:06 -07:00
Tim Wojtulewicz
2c46d3139c Merge remote-tracking branch 'origin/topic/timw/3417-packet-analysis-detail'
* origin/topic/timw/3417-packet-analysis-detail:
  Move packet_analysis::Dispatcher to detail namespace
2024-05-08 09:55:16 -07:00
zeek-bot
8e06e1cad0 Update doc submodule [nomail] [skip ci] 2024-05-08 00:19:30 +00:00
Tim Wojtulewicz
554294bb84 Merge remote-tracking branch 'origin/topic/vern/ssh-half-duplex'
* origin/topic/vern/ssh-half-duplex:
  make SSH analyzer robust to half-duplex connections
2024-05-07 12:02:43 -07:00
Vern Paxson
a0888b7e36 make SSH analyzer robust to half-duplex connections 2024-05-07 11:40:47 -07:00
Tim Wojtulewicz
29f5a49baf Merge remote-tracking branch 'origin/topic/christian/private_address_clarification'
* origin/topic/christian/private_address_clarification:
  Clarify membership in the Site::private_address_space prefix list. [skip ci]
2024-05-07 10:26:50 -07:00
Tim Wojtulewicz
d463141ded Merge remote-tracking branch 'origin/topic/christian/fix-zeekygen-crash'
* origin/topic/christian/fix-zeekygen-crash:
  Avoid segfault when generating Zeekygen docs on Zeek-internal identifiers.
  Add btest for Zeekygen docs extraction on identifiers defined by the Zeek core.
2024-05-07 10:26:19 -07:00
Robin Sommer
9c1ecd205c
Updating CHANGES and VERSION, and bump Spicy and docs. 2024-05-07 10:03:17 +02:00
Robin Sommer
8ce3c877ff
Merge remote-tracking branch 'origin/topic/robin/gh-3573-replaces-cleanup'
* origin/topic/robin/gh-3573-replaces-cleanup:
  Fix packet analyzer replacement.
  Spicy: Wenn replacing an analyzer add a component mapping.
  Add component API to transparently remap one component to another one.
  Move enabled/disabled functionality from analyzers into `Component` base class API.
2024-05-07 09:45:25 +02:00
Robin Sommer
083c682878
Merge remote-tracking branch 'origin/topic/robin/gh-3440-file-handles'
* origin/topic/robin/gh-3440-file-handles:
  Spicy: Query Zeek scriptland for file handles.
2024-05-07 09:44:41 +02:00
Robin Sommer
383a77dab7
Merge remote-tracking branch 'origin/topic/robin/gh-3606-port-enum'
* origin/topic/robin/gh-3606-port-enum:
  Spicy: Cleanup some runtime code.
  Spicy: Map Spicy's `Protocol` enum to Zeek's `transport_proto`.
2024-05-07 09:42:04 +02:00
zeek-bot
b3fbe50c7f Update doc submodule [nomail] [skip ci] 2024-05-07 00:10:28 +00:00
Tim Wojtulewicz
fc0d4d2216 Merge remote-tracking branch 'origin/topic/timw/update-broker'
* origin/topic/timw/update-broker:
  Update broker submodule [nomail]
2024-05-06 17:00:01 -07:00
Tim Wojtulewicz
03c5f18ad0 Update broker submodule [nomail] 2024-05-06 16:04:12 -07:00
Tim Wojtulewicz
fb0dab2fb2 Merge remote-tracking branch 'origin/topic/timw/3389-tuning-defaults-deprecation'
* origin/topic/timw/3389-tuning-defaults-deprecation:
  Move the options from policy/tuning/defaults to actual Zeek defaults, deprecate that package
2024-05-06 11:16:34 -07:00
Tim Wojtulewicz
6821a41c4e Move the options from policy/tuning/defaults to actual Zeek defaults, deprecate that package 2024-05-06 11:13:04 -07:00
Robin Sommer
ccfeffaf2b
Fix packet analyzer replacement.
Also reworking the existing test, which was pretty odd/broken.
2024-05-06 09:45:11 +02:00
Robin Sommer
3a469b3619
Spicy: Wenn replacing an analyzer add a component mapping.
This uses the new API to replace components internally.

With these changes in place, replacing protocol analyzers now don't
need to register their ports anymore if they match what the original
analyzer was using (because the old one's registrations will map
over).

Packet analyzer replacement doesn't quite work yet but will be fixed
in next commit.

Closes #3573.
2024-05-06 09:45:11 +02:00
Robin Sommer
5d0c61e68b
Add component API to transparently remap one component to another one.
When a specific component is requested through its tag or name, one
can now have the component manager transparently return a different
one that has been registered to replace the original one. We limit
this to disabled components to avoid unnecessary confusion. That also
means that remappings are currently only supported for analyzers
(because other types of components cannot be disabled for now, per the
previous change).
2024-05-06 09:45:11 +02:00
Robin Sommer
ac1a7508ee
Move enabled/disabled functionality from analyzers into Component base class API.
The different analyzers types all had their own methods for
enabling/disabling their availability. This change abstracts that into
a new API inside their base class (`plugin::Component`) so that they
can be toggled in a unified way.

In principle, other types of components could/should use this as well
now, so that, e.g., an input reader's availability could be toggled at
runtime. The code doesn't make that broader change for now because it
would requires a series of changes wherever these other component
types are being used. However, that means that one now could try
toggling some other component through the new API without that having
any effect. To catch that, there's a runtime check in place that turns
any such attempt into an internal error.
2024-05-06 09:45:11 +02:00
Robin Sommer
56b9a79a65
Spicy: Query Zeek scriptland for file handles.
Like traditional file analyzers, we now query Zeek's
`get_file_handle()` event for handles when a connection begins
analyzing an embedded file. That means that Spicy-side protocol
analyzers that are forwarding data into file analysis now need to call
Zeek's `Files::register_protocol()` and provide a callback for
computing file handles. If that's missing, Zeek will now issue a
warning. This aligns with the requirements Zeek's traditional protocol
analyzers. (If the EVT file defines a protocol analyzer to `replace`
an existing one, that one's `register_protocol()` will be consulted.)

Because Zeek's `get_file_handle()` event requires a current
connection, if a Spicy file analyzer isn't directly part of a
connection context (e.g., with nested files), we continue to use
hardcoded, built-in file handle. Scriptland won't be consulted in
that case, just like before.

Closes #3440.
2024-05-06 09:20:38 +02:00
Christian Kreibich
0554951cb6 Clarify membership in the Site::private_address_space prefix list. [skip ci]
IANA's IPv6 special-purpose address registry now has members that technically
meet the definition of not being globally reachable, but don't imply operating
locally. An example: https://datatracker.ietf.org/doc/draft-ietf-6man-sids/06/

This change just explains that distinction.
2024-05-04 11:21:26 -07:00
zeek-bot
966d411ed5 Update doc submodule [nomail] [skip ci] 2024-05-04 00:21:41 +00:00
Christian Kreibich
0bde62efec Avoid segfault when generating Zeekygen docs on Zeek-internal identifiers.
Identifiers that Zeek generates explicitly in-core for example during component management
("Analyzer::ANALYZER_FOO", "Input::READER_FOO", etc), aren't associated with any
scripts and would lead to nullpointer derefs when trying to identify
modification time.

This fix returns a zero timestamp in such cases, ensuring it never triggers docs
refreshes. We do the same e.g. in PackageInfo instances.
2024-05-03 12:23:49 -07:00
Christian Kreibich
9d89b1156c Add btest for Zeekygen docs extraction on identifiers defined by the Zeek core.
Mainly, this should not crash. :-) The baseline output file also should remain
empty, since Zeekygen's staleness test should conclude that it's sufficiently
fresh.
2024-05-03 12:22:42 -07:00
Tim Wojtulewicz
da705c1199 Revert "Install gcc9 on CentOS Stream 8"
This reverts commit 09cc5c37e0.
2024-05-02 19:12:03 -07:00
Tim Wojtulewicz
09cc5c37e0 Install gcc9 on CentOS Stream 8 2024-05-02 19:10:58 -07:00
Tim Wojtulewicz
cdcd83c8cc Merge remote-tracking branch 'origin/topic/vern/val-footprint-strings'
* origin/topic/vern/val-footprint-strings:
  refine Val "footprint" to equate long strings with multiple objects
2024-05-02 19:01:06 -07:00
Tim Wojtulewicz
404c756286 Merge remote-tracking branch 'origin/topic/timw/const-rulematcher'
* origin/topic/timw/const-rulematcher:
  Constify classes in RuleMatcher, fixes c++20 build failure
2024-05-02 10:21:55 -07:00
Tim Wojtulewicz
38dae684bd Constify classes in RuleMatcher, fixes c++20 build failure 2024-05-01 16:59:54 -07:00
Vern Paxson
1f9fa4304d refine Val "footprint" to equate long strings with multiple objects 2024-04-29 12:39:36 -07:00
Tim Wojtulewicz
d7e30d9ee2 Merge remote-tracking branch 'origin/topic/johanna/gh-3700'
* origin/topic/johanna/gh-3700:
  Fix cid propagation into files.log
2024-04-29 09:09:41 -07:00
Tim Wojtulewicz
522bce8d58 Merge remote-tracking branch 'origin/topic/vern/script-opt.May24'
* origin/topic/vern/script-opt.May24:
  factored BTest constants into globals to prevent premature ZAM optimization when testing
  addressed minor issues flagged by Coverity
2024-04-29 09:08:28 -07:00
Tim Wojtulewicz
19702b06e7 Merge remote-tracking branch 'origin/topic/timw/val-avoid-type-casting'
* origin/topic/timw/val-avoid-type-casting:
  Avoid calling typecasts in Val when we have direct access to the underlying value object
2024-04-29 09:06:39 -07:00
Johanna Amann
2217eab38a Fix cid propagation into files.log
Changes to the connection id were not propagated to files.log in all
cases.

Fixes GH-3700
2024-04-29 14:13:19 +01:00
Johanna Amann
07c84fddbc Update broker submodule
[nomail]
2024-04-29 13:56:58 +01:00
Robin Sommer
cee92cbf6b
Spicy: Cleanup some runtime code. 2024-04-29 08:38:53 +02:00
Robin Sommer
5a74db30ef
Spicy: Map Spicy's Protocol enum to Zeek's transport_proto.
We now hardcode this specific enum mapping to make Zeek-side usage
more convenient.

Closes #3606.
2024-04-29 08:38:53 +02:00
Vern Paxson
033cf2d8dd factored BTest constants into globals to prevent premature ZAM optimization when testing 2024-04-27 19:40:39 -07:00
Vern Paxson
cf456f943f addressed minor issues flagged by Coverity 2024-04-27 19:40:03 -07:00
zeek-bot
bbcb90741d Update doc submodule [nomail] [skip ci] 2024-04-27 00:11:19 +00:00
Tim Wojtulewicz
6900f3301e Move packet_analysis::Dispatcher to detail namespace 2024-04-26 13:11:45 -07:00
Tim Wojtulewicz
ad6d70d4e6 Merge remote-tracking branch 'pbcullen/topic/pbcullen/shadow-file-handling'
* pbcullen/topic/pbcullen/shadow-file-handling:
  reformat changes
  Gracefully handle empty/missing shadow file
2024-04-26 12:29:28 -07:00
Christian Kreibich
7fdbb73511 Merge branch 'topic/christian/3671-fix-icmp-caplen-violations'
* topic/christian/3671-fix-icmp-caplen-violations:
  Factor in caplens in ICMPAnalyzer::DeliverPacket length calculations
2024-04-26 11:18:34 -07:00
Tim Wojtulewicz
12b1030c1b Update binpac submodule [nomail] 2024-04-26 09:12:38 -07:00