Commit graph

16055 commits

Author SHA1 Message Date
Arne Welzel
aa665435a6 Merge remote-tracking branch 'origin/topic/awelzel/no-bytes-in-variable-length-integer'
* origin/topic/awelzel/no-bytes-in-variable-length-integer:
  quic: Avoid bytes for VariableLengthInteger
2023-10-12 15:54:04 +02:00
Arne Welzel
994d66185c quic: Avoid bytes for VariableLengthInteger
Allocation of bytes objects due to parsing and usage of pack and the
invocation of to_uint() showed significantly in profiles (3.3% sample
matches). Switch to a more procedural approach to avoid the allocation
overhead.

From zeek/spicy-quic/pull/13
2023-10-12 14:17:09 +02:00
zeek-bot
e33528ec5b Update doc submodule [nomail] [skip ci] 2023-10-12 00:22:10 +00:00
Tim Wojtulewicz
2d8e7368ae CI: Add timeouts for apt commands in docker builder Dockerfiles 2023-10-11 12:56:30 -07:00
Arne Welzel
dc8e98d790 protocol/quic: Add doc-id/doc-description to .evt file
Without this, the QUIC enums end up under Zeek::Spicy and we don't
have an extra Zeek::QUIC section in the docs.
2023-10-11 18:48:42 +02:00
Arne Welzel
007bcefd09 Merge remote-tracking branch 'origin/topic/awelzel/2326-import-quic'
* origin/topic/awelzel/2326-import-quic:
  ci/btest: Remove spicy-quic helper, disable Spicy on CentOS 7
  btest/core/ppp: Run test in bare mode
  btest/quic: Update other tests
  testing/quic: Fixups and simplification after Zeek integration
  quic: Integrate as default analyzer
  quic: Include Copyright lines to the analyzer's source code contributed by Fox-IT
  quic: Squashed follow-ups: quic.log, tests, various fixes, performance
  quic: Initial implementation
2023-10-11 18:05:14 +02:00
Arne Welzel
1774a25f00 ci/btest: Remove spicy-quic helper, disable Spicy on CentOS 7
The have-quic pattern wasn't great and it wouldn't scale.
2023-10-11 17:17:23 +02:00
Arne Welzel
01bf1d4764 Merge remote-tracking branch 'origin/topic/awelzel/update-zeekygen-docs-show-stderr'
* origin/topic/awelzel/update-zeekygen-docs-show-stderr:
  ci/update-zeekygen-docs.sh: Do output stderr by default
  zeekygen: Disable zeek_init() handlers causing error output
  zeekygen/example: Squelch unused function warning
2023-10-11 15:21:31 +02:00
Arne Welzel
94a8cf2a09 Merge remote-tracking branch 'origin/topic/awelzel/pcap-reading-configurable-buffer'
* origin/topic/awelzel/pcap-reading-configurable-buffer:
  iosource/pcap: Support configurable buffer size
  util/setvbuf: Respect buf argument
2023-10-11 15:20:17 +02:00
Arne Welzel
2cbe76d296 ci/update-zeekygen-docs.sh: Do output stderr by default
stderr was only produced when there was a real failure as it had been a
bit noisy previously, but has hidden actual problems. Now that there is
less noise, just output stderr all the time.
2023-10-11 15:18:36 +02:00
Arne Welzel
6f3e3a10e6 zeekygen: Disable zeek_init() handlers causing error output
These modules have zeek_init() handlers with actual logic that has side-effects
and error outputs. Just disable them during zeekygen runs.
2023-10-11 15:18:33 +02:00
Arne Welzel
e51d7815f2 btest/core/ppp: Run test in bare mode 2023-10-11 15:13:23 +02:00
Arne Welzel
f814be4484 btest/quic: Update other tests 2023-10-11 15:13:18 +02:00
Arne Welzel
6fd68bc607 zeekygen/example: Squelch unused function warning 2023-10-11 14:28:33 +02:00
Arne Welzel
3f99aa7996 testing/quic: Fixups and simplification after Zeek integration 2023-10-11 14:10:22 +02:00
Arne Welzel
ee827eecf7 quic: Integrate as default analyzer 2023-10-11 14:10:22 +02:00
Arne Welzel
d0d461ec13 quic: Include Copyright lines to the analyzer's source code contributed by Fox-IT
This is primarily such that they stay intact when importing into the
Zeek project. Also move LICENSE to COPYING.
2023-10-11 14:10:22 +02:00
Arne Welzel
359f8d2ae6 quic: Squashed follow-ups: quic.log, tests, various fixes, performance 2023-10-11 14:10:22 +02:00
Joost
44d7c45723 quic: Initial implementation 2023-10-11 14:10:22 +02:00
Arne Welzel
ffc35d90ba Merge remote-tracking branch 'origin/topic/awelzel/ldap-follow-up'
* origin/topic/awelzel/ldap-follow-up:
  protocol/ldap: Add doc-id/doc-description to .evt file
  spicy/manager: Ensure Zeekygen knows identifier for registered types
2023-10-11 14:09:32 +02:00
Arne Welzel
6abe557502 protocol/ldap: Add doc-id/doc-description to .evt file 2023-10-11 13:31:25 +02:00
Arne Welzel
101c6696b9 spicy/manager: Ensure Zeekygen knows identifier for registered types
Without this, Zeekygen won't generate documentation about exported
enum types as it can not resolve the identifier. Also, only register a
type as item with the Spicy plugin if there's no _module_info currently
active.
2023-10-11 13:31:20 +02:00
Arne Welzel
72df1a0216 Merge remote-tracking branch 'origin/topic/bbannier/issue-3234'
* origin/topic/bbannier/issue-3234:
  Introduce dedicated `LDAP::Info`
  Remove redundant storing of protocol in LDAP logs
  Use LDAP `RemovalHook` instead of implementing `connection_state_remove`
  Tidy up LDAP code by using local references
  Pluralize container names in LDAP types
  Move LDAP script constants to their own file
  Name `LDAP::Message` and `LDAP::Search` `*Info`
  Make ports for LDAP analyzers fully configurable
  Require have-spicy for tests which log spicy-ldap information
  Fix LDAP analyzer setup for when Spicy analyzers are disabled
  Bump zeek-testing-private
  Integrate spicy-ldap test suite
  Move spicy-ldap into Zeek protocol analyzer tree
  Explicitly use all of spicy-ldap's modules
  Explicitly list `asn1.spicy` as spicy-ldap source
  Remove uses of `zeek` module in spicy-ldap
  Fix typos in spicy-ldap
  Remove project configuration files in spicy-ldap
  Integrate spicy-ldap into build
  Import zeek/spicy-ldap@57b5eff988
2023-10-10 20:07:03 +02:00
Benjamin Bannier
346d2c49a9 Introduce dedicated LDAP::Info 2023-10-10 18:49:25 +02:00
Benjamin Bannier
301d8722bf Remove redundant storing of protocol in LDAP logs 2023-10-10 18:49:25 +02:00
Benjamin Bannier
82b3a4048f Use LDAP RemovalHook instead of implementing connection_state_remove 2023-10-10 18:49:25 +02:00
Benjamin Bannier
1d4412a9e7 Tidy up LDAP code by using local references 2023-10-10 18:49:25 +02:00
Benjamin Bannier
3a60a60619 Pluralize container names in LDAP types 2023-10-10 18:49:25 +02:00
Benjamin Bannier
0c126f3c6b Move LDAP script constants to their own file 2023-10-10 18:28:13 +02:00
Benjamin Bannier
c43bc52e18 Name LDAP::Message and LDAP::Search *Info 2023-10-10 18:28:13 +02:00
Benjamin Bannier
9b02b93889 Make ports for LDAP analyzers fully configurable
This moves the ports the LDAP analyzers should be triggered on from the
EVT file to the Zeek module. This gives users full control over which
ports the analyzers are registered for while previously they could only
register them for additional ports (there is no Zeek script equivalent
of `Manager::UnregisterAnalyzerForPort`).

The analyzers could still be triggered via DPD, but this is intentional.
To fully disable analyzers users can use e.g.,

```zeek
event zeek_init()
    {
    Analyzer::disable_analyzer(Analyzer::ANALYZER_LDAP_TCP);
    }
```
2023-10-10 18:28:13 +02:00
Arne Welzel
7fac5837c3 iosource/pcap: Support configurable buffer size
On Linux with a default ext4 or tmpfs filesystem, the default buffer size for
reading a pcap is chosen as 4k (strace/gdb validated). When reading large pcaps
containing raw data transfers, the syscall overhead for read becomes visible
in profiles. Support configurability of the buffer size and default to 128kb.

When processing a ~830M PCAP (16 UDP connections, each transferring ~50MB) in
bare mode, this change improves runtime from 1.39 sec to 1.29 sec. Increasing
the buffer further didn't provide a noticeable boost.
2023-10-10 15:08:51 +02:00
Arne Welzel
c161b1c4b1 util/setvbuf: Respect buf argument 2023-10-10 09:29:21 +02:00
Benjamin Bannier
c0daacfbd1 Require have-spicy for tests which log spicy-ldap information 2023-10-10 09:21:57 +02:00
Benjamin Bannier
53d4052d68 Fix LDAP analyzer setup for when Spicy analyzers are disabled 2023-10-10 09:21:57 +02:00
Benjamin Bannier
20ae1129ea Bump zeek-testing-private 2023-10-10 09:21:57 +02:00
Benjamin Bannier
d7db52dff6 Integrate spicy-ldap test suite 2023-10-10 09:21:57 +02:00
Benjamin Bannier
f172febbcb Move spicy-ldap into Zeek protocol analyzer tree 2023-10-10 09:21:57 +02:00
Benjamin Bannier
e544540986 Explicitly use all of spicy-ldap's modules
This fixes building of this multi-module analyzer.
2023-10-10 09:21:57 +02:00
Benjamin Bannier
cfe24189f2 Explicitly list asn1.spicy as spicy-ldap source
This will lead to the file being installed so it can be consumed by
other parsers.
2023-10-10 09:21:57 +02:00
Benjamin Bannier
6e87f49ca8 Remove uses of zeek module in spicy-ldap 2023-10-10 09:21:57 +02:00
Benjamin Bannier
4251557464 Fix typos in spicy-ldap 2023-10-10 09:21:57 +02:00
Benjamin Bannier
ffbc45ed6e Remove project configuration files in spicy-ldap 2023-10-10 09:21:57 +02:00
Benjamin Bannier
dc0ef39fb0 Integrate spicy-ldap into build 2023-10-10 09:21:57 +02:00
Benjamin Bannier
080d7418d7 Import zeek/spicy-ldap@57b5eff988 2023-10-10 09:21:57 +02:00
Tim Wojtulewicz
255103b50a Merge branch 'topic/timw/arm-build-failure'
* topic/timw/arm-build-failure:
  CI: Disable spicy on arm_debian11 and opensuse_leap_15_4 builds
  CI: Remove sanitizers resource template
2023-10-09 12:53:30 -07:00
Tim Wojtulewicz
bbf7f34cdc CI: Disable spicy on arm_debian11 and opensuse_leap_15_4 builds
These two builds are struggling to complete due to OOM issues. Reducing the
number of CPUs didn't help, so this temporarily disables Spicy from
building on those hosts to reduce the memory usage.
2023-10-09 11:57:16 -07:00
Tim Wojtulewicz
4c6c89d863 CI: Remove sanitizers resource template
This template was added when the sanitizer builds needed more memory than all
of the other builds. We've since increased the amount of memory that the other
builds use beyond what's requested in this template, so it doesn't make sense
to keep it around.
2023-10-09 10:56:16 -07:00
Arne Welzel
d08b472871 Updating zeek-aux submodule [nomail] 2023-10-09 16:47:23 +02:00
Arne Welzel
51cbdc53f3 NEWS: Polish external plugins message [nomail] [skip ci] 2023-10-09 16:35:11 +02:00