Commit graph

15697 commits

Author SHA1 Message Date
peter.cullen
c391bdba5d Fix mmdb pointer destruction
The mmdb references needs to use reset() instead of release()
so that the destructor gets called and the stale DB is actually
cleaned up. Otherwise, the pointer is leaked and the stale DB
remains in memory.
2023-10-23 23:29:19 +02:00
Benjamin Bannier
d3eaf587e7 Merge remote-tracking branch 'origin/topic/robin/gh-3370' 2023-10-23 11:30:12 +02:00
zeek-bot
1aa9de2811 Update doc submodule [nomail] [skip ci] 2023-10-21 00:23:06 +00:00
Arne Welzel
ebb8780d6a quic: Skip new test if have-quic is false 2023-10-20 20:57:19 +02:00
Tim Wojtulewicz
bf75f56ef7 Merge remote-tracking branch 'origin/topic/awelzel/quic-longer-but-configurable-history-max-length'
* origin/topic/awelzel/quic-longer-but-configurable-history-max-length:
  quic: Bump maximum history length, make configurable
2023-10-20 11:45:04 -07:00
Arne Welzel
6604010a05 quic: Bump maximum history length, make configurable
From zeek/spicy-quic#15
2023-10-20 20:42:30 +02:00
zeek-bot
16a51218a5 Update doc submodule [nomail] [skip ci] 2023-10-20 00:24:08 +00:00
Arne Welzel
e632131e9e Merge remote-tracking branch 'origin/topic/awelzel/add-ssl-fuzzer'
* origin/topic/awelzel/add-ssl-fuzzer:
  fuzzers: Add SSL fuzzer
2023-10-19 20:00:04 +02:00
Arne Welzel
043f3216f7 fuzzers: Add SSL fuzzer
Corpus was generated from a few btest pcaps, fuzzing for 60 seconds
locally and minimizing afterwards as in the documentation.

List of pcaps:

    certificate-request-failed.pcap
    certificate-with-sct.pcap
    cert-no-cn.pcap
    chrome-34-google.trace
    chrome-63.0.3211.0-canary-tls_experiment.pcap
    heartbleed-encrypted.pcap
    heartbleed-encrypted-short.pcap
    heartbleed-encrypted-success.pcap
    heartbleed.pcap
    heartbleed-success.pcap
    ssl-v2.trace
    ssl.v3.trace
    tls1_1.pcap
    tls-1.2-handshake-failure.trace
    tls1.2-protocol-violation.pcap
    tls1.2.trace
    tls13_wolfssl.pcap
    tls-early-alert.trace
2023-10-19 18:20:49 +02:00
Arne Welzel
ee827a0a63 Merge remote-tracking branch 'origin/topic/robin/gh-3383'
* origin/topic/robin/gh-3383:
  Fix missing version number in `spicyz`.
2023-10-19 16:26:05 +02:00
Robin Sommer
ab78cfa5a2
Spicy: Avoid creating Zeek types multiple times.
We now cache the first time we create a (named) Zeek type so that we
can reuse it later when needed again.

Closes #3370.
2023-10-19 11:29:55 +02:00
Robin Sommer
8d10bf7178
Spicy: Unroll Zeek type registrations.
For records and enums, the type registration calls could get pretty
large, and then slow to compile. We now build up their vectors
entry by entry instead of all at once.
2023-10-19 11:29:50 +02:00
Robin Sommer
77f17ab4e5
Fix missing version number in spicyz.
Needs associated `cmake` PR.

Closes #3383.
2023-10-19 11:27:25 +02:00
Arne Welzel
a503c2a672 Merge remote-tracking branch 'origin/topic/awelzel/quic-ldap-event-prototypes'
* origin/topic/awelzel/quic-ldap-event-prototypes:
  ldap: Use longer event names
  ldap: Add spicy-events.zeek
  quic: Add spicy-events.zeek
2023-10-19 11:08:36 +02:00
Arne Welzel
e1864ec131 ldap: Use longer event names
It's unusual to compress and shorten event names of protocol analyzers,
switch to a slightly longer name instead.
2023-10-19 10:49:19 +02:00
Arne Welzel
fb31ad0c6e ldap: Add spicy-events.zeek 2023-10-19 10:48:34 +02:00
Arne Welzel
2389f6f6c5 quic: Add spicy-events.zeek 2023-10-19 10:48:24 +02:00
Tim Wojtulewicz
fc62bb477c Merge remote-tracking branch 'origin/topic/timw/3382-update-ssh-key-exchanges'
* origin/topic/timw/3382-update-ssh-key-exchanges:
  Add new SSH key exchange algorithms reported by OpenSSH 9.0
2023-10-18 12:05:37 -07:00
Tim Wojtulewicz
a0a1328e02 Add new SSH key exchange algorithms reported by OpenSSH 9.0 2023-10-18 12:05:00 -07:00
Arne Welzel
a5b94f04fd Merge remote-tracking branch 'origin/topic/awelzel/better-gre-over-udp-pcap'
* origin/topic/awelzel/better-gre-over-udp-pcap:
  gre-over-udp: Update testing pcap with both endpoints
2023-10-17 19:34:01 +02:00
Arne Welzel
a17923da50 Merge branch 'ldap-asn1-fixes' of https://github.com/pauldokas/zeek
* 'ldap-asn1-fixes' of https://github.com/pauldokas/zeek:
  performance improvements for the LDAP ASN.1 analyzer
2023-10-17 17:20:53 +02:00
Arne Welzel
536686f02d gre-over-udp: Update testing pcap with both endpoints
The first pcap only contained packets from the originator, not the responder.

What stands out here is that the Linux kernel doesn't seem to use a symmetric
flow hash for the tunneled connection, resulting in a total of four tunnel
connections for the two inner connections. Sigh.
2023-10-17 12:30:14 +02:00
zeek-bot
ae0f8677b3 Update doc submodule [nomail] [skip ci] 2023-10-17 00:20:37 +00:00
Tim Wojtulewicz
d4993ebf7f Merge remote-tracking branch 'origin/topic/timw/3344-gre-over-udp'
* origin/topic/timw/3344-gre-over-udp:
  Add registration for GRE-over-UDP
2023-10-16 11:52:18 -07:00
Tim Wojtulewicz
6d9d4523bc Add registration for GRE-over-UDP 2023-10-16 11:42:24 -07:00
Tim Wojtulewicz
01302a8989 Merge remote-tracking branch 'origin/topic/timw/update-cares'
* origin/topic/timw/update-cares:
  Update c-ares to v1.20.1 [nomail]
2023-10-16 09:48:08 -07:00
Tim Wojtulewicz
6990d50e08 Merge remote-tracking branch 'origin/topic/neverlord/broker-refactoring'
* origin/topic/neverlord/broker-refactoring:
  Broker: Adapt to upstream API adjustments
2023-10-13 14:40:34 -07:00
Paul Dokas
07a010a643 performance improvements for the LDAP ASN.1 analyzer 2023-10-13 16:44:48 -04:00
Dominik Charousset
015608fef6 Broker: Adapt to upstream API adjustments 2023-10-13 13:27:32 -07:00
Tim Wojtulewicz
c9551c0a59 Update c-ares to v1.20.1 [nomail] 2023-10-13 12:48:37 -07:00
Tim Wojtulewicz
738c39379f Start of 6.2.0 development 2023-10-13 10:58:29 -07:00
Tim Wojtulewicz
7332c45ee1 Update docs submodule [nomail] [skip ci] 2023-10-13 10:49:39 -07:00
Tim Wojtulewicz
a4da0c64a1 Add missing NEWS entries for upcoming 6.1 release, reformat slightly 2023-10-13 10:00:34 -07:00
Arne Welzel
bd9b82f1fb Merge remote-tracking branch 'origin/topic/awelzel/quic-reuse-openssl-ctxs'
* origin/topic/awelzel/quic-reuse-openssl-ctxs:
  protocol/quic/decrypt_crypto: Reuse OpenSSL context objects
2023-10-13 13:16:15 +02:00
Arne Welzel
4365e81fe2 Merge remote-tracking branch 'origin/topic/bbannier/bump-spicy'
* origin/topic/bbannier/bump-spicy:
  Bump auxil/spicy to latest development snapshot
2023-10-13 13:14:00 +02:00
Benjamin Bannier
e67d18c2fa Bump auxil/spicy to latest development snapshot 2023-10-13 12:00:31 +02:00
Arne Welzel
701eb6161a Merge remote-tracking branch 'origin/topic/timw/docker-builder-timeouts'
* origin/topic/timw/docker-builder-timeouts:
  CI: Add more logging during docker builds
  CI: Add timeouts for apt commands in docker builder Dockerfiles
2023-10-13 08:16:54 +02:00
zeek-bot
384fc07050 Update doc submodule [nomail] [skip ci] 2023-10-13 00:20:14 +00:00
Tim Wojtulewicz
3d1380305b CI: Add more logging during docker builds 2023-10-12 15:00:52 -07:00
Arne Welzel
84d5c63fa3 protocol/quic/decrypt_crypto: Reuse OpenSSL context objects
It is not necessary to allocate and free the context objects used for
HKDF and AES all the time, they can be re-used. The main assumption here
is no cross-thread usage, but this should be guaranteed even with the
fibers: QUIC_decrypt_crypto_payload() always runs to completion.

A pcap with ~12k QUIC connections had ~15% samples in
QUIC_decrypt_crypto_payload. After this change it is down to 5%
of samples. The improvement in runtime is ~16%, 12.2 seconds
to 10.2 seconds.

From zeek/spicy-quic#14
2023-10-12 20:29:30 +02:00
Benjamin Bannier
e121654ee7 Merge remote-tracking branch 'origin/topic/bbannier/fix-signed-unsigned-comparison' 2023-10-12 17:11:38 +02:00
Benjamin Bannier
7ad0255274 Fix signed-unsigned comparison.
We compared the return value of `sizeof` which returns a `std::size_t`
with an `int` which GCC warned about. This patch changes the `int` to a
`size_t`.
2023-10-12 15:59:32 +02:00
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