Commit graph

11381 commits

Author SHA1 Message Date
Jon Siwek
144ca0f45b Update submodule(s) [nomail] 2020-12-14 10:56:08 -08:00
Jon Siwek
22ab203d97 Merge remote-tracking branch 'origin/topic/jsiwek/gh-1328-improve-dict-loop-invalidation'
* origin/topic/jsiwek/gh-1328-improve-dict-loop-invalidation:
  Fix typo in table iterator invalidation test comment
  GH-1328: Improve behavior of Dictionary iterator invalidation
2020-12-14 10:55:05 -08:00
Jon Siwek
7469304017 Merge remote-tracking branch 'origin/topic/johanna/ci-note'
* origin/topic/johanna/ci-note:
  Note to update support matrix in cirrus config: wording update
  Add a about the support matrix to .cirrus.yml
2020-12-14 10:54:54 -08:00
Jon Siwek
b0505277ae
Fix typo in table iterator invalidation test comment
Co-authored-by: Tim Wojtulewicz <tim@corelight.com>
2020-12-14 10:42:37 -08:00
Johanna Amann
348a301e53 Note to update support matrix in cirrus config: wording update
Make it clear that only the CI column should be updated when changing
this file.
2020-12-14 13:30:40 +00:00
Jon Siwek
f5d306a732 Update submodule(s) [nomail] [skip ci] 2020-12-13 21:44:25 -08:00
Jon Siwek
7b2ee2514e Tweak FuncInfo memory management
Idea being for everything to be automatically released when process
exits just so there's less potential noise from leak profilers.
2020-12-13 17:06:57 -08:00
Jon Siwek
c7bec09e14 Switch InlineExpr from using IDPList* to vector<IDPtr> 2020-12-13 15:04:53 -08:00
Jon Siwek
a0552f9771 Insert contents of #included script-opt files directly
Otherwise there is a functional problem caused by using #include to
insert the disconnected source code: language server/analysis tools,
like clangd, may get confused by those files and report everything
in them as an error.
2020-12-13 14:43:00 -08:00
Jon Siwek
fa418cb179 Simplify some IntrusivePtr operations in Expr::Duplicate/Inline 2020-12-13 14:20:10 -08:00
Jon Siwek
70ff4ef678 Remove Func::AsScriptFunc() methods
Not used frequently enough, so possibly better to minimize leakage of
details from non-detail API.
2020-12-13 14:03:39 -08:00
Jon Siwek
4824da0325 Remove superflous std::move's from Inliner return values 2020-12-13 13:44:00 -08:00
Jon Siwek
09d12c3716 Remove SetupResult::parse_only field
For parity with other setup() behavior to simply call exit() directly.
2020-12-13 13:33:50 -08:00
Jon Siwek
2219a03344 Rename Frame::IncreaseOffset() to Frame::AdjustOffset()
For clarity, since it's used for both increasing and decreasing.
2020-12-13 13:27:37 -08:00
Jon Siwek
7393fc6d24 Update alternative plugins.hooks baselines 2020-12-13 13:24:47 -08:00
Jon Siwek
30df2c58c0 Merge branch 'master' into topic/vern/script-inlining 2020-12-13 10:42:26 -08:00
Jon Siwek
481d989495 Superficial changes to script-opt related code
* Rename overly generic ACCESSORS macro with ZEEK_ prefix
* A few places where whitespace was noticeably wrong/distracting
* Minor/obvious reference/move semantics improvements suggested by linter
* Remove unused detail::Scope::Remove(), no need for deprecation
2020-12-13 10:33:28 -08:00
Jon Siwek
10fd5e9c19 Update submodule(s) [nomail] 2020-12-12 21:33:37 -08:00
Jon Siwek
4470b52f91 Update submodule(s) [nomail] 2020-12-12 21:21:12 -08:00
Jon Siwek
d1c659faa8 Merge remote-tracking branch 'origin/topic/christian/zkg-inclusion'
* origin/topic/christian/zkg-inclusion:
  Install zkg as part of the Zeek distribution.
2020-12-12 20:25:59 -08:00
Jon Siwek
2a48dd559a Add LGTM config file 2020-12-12 17:20:54 -08:00
Jon Siwek
9658271d19 Merge remote-tracking branch 'origin/topic/jsiwek/fix-coverity'
* origin/topic/jsiwek/fix-coverity:
  Update Coverity Scan GitHub Action

Fixes GH-1330
2020-12-12 13:40:11 -08:00
Jon Siwek
a3f1e6dafa Update Coverity Scan GitHub Action
* Remove old Python 2 vs. 3 workaround
* Build CAF separately to prevent internal errors in Coverity tools
2020-12-12 13:38:04 -08:00
Jon Siwek
8f98b068c8 GH-1328: Improve behavior of Dictionary iterator invalidation
Previously, an assertion was triggered in debug builds upon any attempt
to insert or remove a Dictionary entry while any iteration of that
Dictionary is underway and also even in cases where Dictionary membership
was not actually modified (and thus invalidates a loop).

Now, it emits run-time warnings regardless of build-type and only when
insert/remove operations truly change the Dictionary membership.  In the
context of a Zeek script causing an invalidation, the warning message
also now helps pinpoint the exact expression that causes it.
2020-12-11 18:52:31 -08:00
Christian Kreibich
d1d218b5cc Install zkg as part of the Zeek distribution.
- Add auxil/package-manager submodule as an optional build
  source. When the submodule is present, zkg gets installed into the
  Zeek installation's bin directory, its config file into etc/zkg, and
  its state into var/lib/zkg. Like zeekctl, zkg finds its own module
  independently of any PYTHONPATH. Installation via pip remains
  supported. You can skip zkg explicitly via --disable-zkg. See the
  NEWS update for details.

- Establish a "zeek/python" subdirectory under libdir as the common place
  for Python modules in the Zeek distribution. This now separates out
  the Broker Python bindings, ZeekControl, and zkg's Python module.

- Add configure flags to allow customizing this Python folder, in
  three ways: --python-dir, --python-prefix, and --python-home. These
  differ in the logic they automatically add to the path, and build on
  the logic already used in Broker.

- Include a (comented-out) @load for zkg's packages folder in
  local.zeek.

- Bump zeekctl to move to this new location.

- Bump doc to include installation instructions

- Update NEWS accordingly.
2020-12-11 18:43:47 -08:00
Johanna Amann
a204c40799 Add a about the support matrix to .cirrus.yml
It would be neat to keep the matrix aligned with our CI systems :)
2020-12-11 14:50:28 +00:00
zeek-bot
9d8bab692c Update doc submodule [nomail] [skip ci] 2020-12-11 00:39:17 +00:00
Jon Siwek
bb11ce47a0 Merge remote-tracking branch 'origin/topic/neverlord/caf-migration'
Merge adjustments:
- Fix the `--with-caf=` option from emitting messages about a variable
  having an unset value.
- Fix the `zeek-config --caf_root` option

* origin/topic/neverlord/caf-migration:
  Update submodule(s)
  Fix message ordering of Broker messages
  Fix UB in shutdown of Broker manager
  Preserve string output of Broker errors
  Migrate to CAF 0.18
2020-12-10 14:14:38 -08:00
Johanna Amann
e85621020d Update submodule
[nomail]
2020-12-10 15:45:50 +00:00
Jon Siwek
2e6ef02750 Update submodule(s) [nomail] 2020-12-09 17:29:17 -08:00
Jon Siwek
124e803a37 Merge remote-tracking branch 'origin/topic/johanna/update-certs'
* origin/topic/johanna/update-certs:
  Update Mozilla Root Store
2020-12-09 17:28:51 -08:00
Johanna Amann
14a448cddc Update Mozilla Root Store 2020-12-09 21:46:32 +00:00
Johanna Amann
533c4c7d29 Update submodule
[nomail]
2020-12-09 21:40:36 +00:00
Jon Siwek
2ae452d8aa Merge remote-tracking branch 'origin/topic/jsiwek/gh-1321-fix-connection-status-update-event'
* origin/topic/jsiwek/gh-1321-fix-connection-status-update-event:
  GH-1321: Prevent compounding of `connection_status_update` event timers
2020-12-09 10:59:14 -08:00
Jon Siwek
70d557c659 Merge remote-tracking branch 'origin/topic/jsiwek/debugger-setsignal'
* origin/topic/jsiwek/debugger-setsignal:
  Update Debug.cc to use setsignal() wrapper
2020-12-09 10:51:35 -08:00
Jon Siwek
7c27d4c1e7 Add test case to cover weird EDNS ECS parsing situations 2020-12-08 13:14:20 -08:00
Jon Siwek
a35cd2a726 GH-1321: Prevent compounding of connection_status_update event timers
Particularly for ICMP connections, a new timer got added every time a
`connection` record was updated even if there was still a pending timer
for that connection.
2020-12-08 11:20:02 -08:00
Dominik Charousset
27730aabfb Update submodule(s) 2020-12-08 13:41:29 +01:00
Jon Siwek
a4986a17cb Update Debug.cc to use setsignal() wrapper
So as to prefer sigaction() over either sigset() or signal(), which are
less favorable due to underspecification issues and some treating them
as obsolete/deprecated.
2020-12-07 18:03:24 -08:00
Jon Siwek
07c4662dc4 Fix narrowing conversion compiler error in SMB error-response logic 2020-12-07 16:56:07 -08:00
Jon Siwek
0b8535b879 Merge remote-tracking branch 'origin/topic/vlad/gh-1286'
Merge adjustments:
- Rewrote the check for error response as a switch statement to
  fix compiler warning about signed/unsigned comparison and also
  to just simplify/clarify the logic.
- Changed the btest to use `zeek -b`.

* origin/topic/vlad/gh-1286:
  Add tests for new SMB3 multichannel support
  Fix SMB2 response status parsing. Fixes #1286
2020-12-07 16:08:04 -08:00
Jon Siwek
bb928f0a30 Update submodule(s) [nomail] 2020-12-07 15:08:07 -08:00
Jon Siwek
abb4f0be03 Fix EDNS ECS option parsing bugs
* The parsing of IPv6 addresses tried to fill a stack-buffer with as
  much data as supplied in the Option even if it was in excess of the
  desired prefix or maximum IPv6 address size.  This could result in an
  overflow of that stack-buffer.

* The parsing of IPv4 addresses would overwrite the storage used for
  that address as many times as there were bytes in the Option in excess
  of the desired prefix length or maximum IPv4 address size.  This could
  cause the resulting IPv4 address to be derived from the incorrect
  data.

* Upon encountering unexpected/excessive option-length or source-prefix
  parameters, the data pointer used for parsing was also not always
  advanced to the start of the next alleged option's data.  Assuming all
  other parsing code correctly guards against invalid input, there's no
  further harm from that other than the subsequent parsing being more
  likely to encounter unexpected values and emitting more Weirds.

Credit to OSS-Fuzz for discovery
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28336
(Link to details becomes public 30 days after patch release)
2020-12-07 13:35:17 -08:00
Vlad Grigorescu
f30ca69402 Add tests for new SMB3 multichannel support 2020-12-07 15:35:04 -06:00
Dominik Charousset
25fef3da1b Fix message ordering of Broker messages
Using two separate Broker subscribers for status events and regular
messages introduces a race on the two objects. Even if Broker sends all
messages in a particular (deterministic) order, Zeek may still process
them in a different order as a result. Since several tests rely on a
strict ordering of Broker events, these tests could fail sporadically.

Using only a single subscriber for all Broker messages makes sure that
Zeek observes all messages in the same order as Broker emits them.
2020-12-07 21:40:46 +01:00
Dominik Charousset
9da68ddc3d Fix UB in shutdown of Broker manager 2020-12-07 20:37:08 +01:00
Johanna Amann
3c2fac9e87 Update submodule
[nomail]
2020-12-07 18:27:07 +00:00
Johanna Amann
8955e6c060 Merge branch 'master' of github.com:zeek/zeek 2020-12-07 18:23:18 +00:00
Johanna Amann
c85d6d6112 Merge remote-tracking branch 'origin/topic/christian/gh-1307-baseline-refresh'
* origin/topic/christian/gh-1307-baseline-refresh:
  Additional use of btest-diff --binary
  Update btest-diff calls on binary files to using "--binary"
  Switch to btest-diff with --binary support
  Update external baseline commit hashes
  Fix binary baseline & line-end problem
  Fix diff-remove-abspath on OSX
  Bump submodules for btest 0.64 update
  Canonifier improvements for the scripts.base.frameworks.logging.ascii-double test
  Baseline refresh to reflect btest 0.64
  Make diff-remove-abspath canonifier match on non-whitespace paths only
  Harden diff-remove-timestamps canonifier
2020-12-07 18:12:29 +00:00
Jon Siwek
94366fdfd9 Merge remote-tracking branch 'origin/topic/jsiwek/fix-zeekygen-misassociations'
* origin/topic/jsiwek/fix-zeekygen-misassociations:
  Fix misassociation of Zeekygen-style comments within function scopes
2020-12-07 09:43:07 -08:00