Commit graph

16055 commits

Author SHA1 Message Date
Arne Welzel
688d68cbf6 zeek.bif: Switch mmdb stale check to network_time
Makes testing easier and aligns better with log rotation and timer
expiration. Should not have an effect in practice. Also, log detail
about whether inode or modification time changed, too.
2023-10-24 11:11:00 +02:00
Benjamin Bannier
254d7ebfa2 Merge remote-tracking branch 'origin/topic/bbannier/bump-spicy' 2023-10-24 10:10:54 +02:00
zeek-bot
c0e982f5d9 Update doc submodule [nomail] [skip ci] 2023-10-24 00:25:50 +00:00
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
Dominik Charousset
6451a4e750 Update CMake submodule for caching fix 2023-10-23 18:04:48 +02:00
Benjamin Bannier
603308f324 Bump auxil/spicy to latest development snapshot 2023-10-23 17:05:30 +02:00
Arne Welzel
ab157777e3 X509Common/SCT parsing: Fix memory leak in error case
Failed to free the copy of the OCSP extension's value the inner
octet string couldn't be parsed.
2023-10-23 16:57:15 +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
Arne Welzel
d8a0822221 event: Reinitialize EventMgr's flare after fork() from stem
Because EventMgr is defined globally as an object (rather than a global
pointer to an EventMgr object), its pipe is created even before main()
is entered. This further means that in the fork-based supervisor setup,
all Zeek processes created from the top-level supervisor process share
the same pipe object for the EventMgr. In turn, whenever any of the
processes enqueued an event, the flare was fired and ready for reading
on all other processes in the cluster, causing much contention and
unneeded overhead.

Closes #3190
2023-10-20 17:52:48 +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
bccf1a9253 IEEE802_11: Fix buffer-overflow due to not accounting for the amsdu header
The fuzzer generated input where data length left was 14 and the amsdu_len
field set to 14. That caused buffer overread due not taking into account
the amsdu header length of 14.
2023-10-18 10:53:06 +02: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