Commit graph

15201 commits

Author SHA1 Message Date
Tim Wojtulewicz
dbaa9bf33d Update CHANGES, VERSION, and NEWS for 6.0.2 release 2023-10-27 11:37:26 -07:00
Tim Wojtulewicz
e57bbf6ff6 Update docs submodule for 6.0.2 release [nomail] [skip ci] 2023-10-27 11:35:15 -07:00
Tim Wojtulewicz
ed9eddabb5 Merge remote-tracking branch 'security/topic/timw/6.0.2-patches' into release/6.0
* security/topic/timw/6.0.2-patches:
  ftp: Do not base seq on number of pending commands
  ssl: Prevent unbounded ssl_history growth
  ssl: Cap number of alerts parsed from SSL record
  X509Common/SCT parsing: Fix memory leak in error case
  IEEE802_11: Fix buffer-overflow due to not accounting for the amsdu header
2023-10-27 10:53:27 -07:00
Tim Wojtulewicz
fe4aa31b5f Merge remote-tracking branch 'origin/topic/bbannier/bump-spicy-6.0' into release/6.0
* origin/topic/bbannier/bump-spicy-6.0:
  Bump auxil/spicy to latest 1.8 release
2023-10-26 08:52:12 -07:00
Benjamin Bannier
8af0200f4a Bump auxil/spicy to latest 1.8 release 2023-10-26 14:16:18 +02:00
Arne Welzel
b745556d36 ftp: Do not base seq on number of pending commands
Previously, seq was computed as the result of |pending_commands|+1. This
opened the possibility to override queued commands, as well as logging
the same pending ftp reply multiple times.

For example, when commands 1, 2, 3 are pending, command 1 may be dequeued,
but the incoming command then receives seq 3 and overrides the already
pending command 3. The second scenario happens when ftp_reply() selected
command 3 as pending for logging, but is then followed by many ftp_request()
events. This resulted in command 3's response being logged for every
following ftp_request() over and over again.

Avoid both scenarios by tracking the command sequence as an absolute counter.
2023-10-25 10:05:09 -07:00
Arne Welzel
f6615753f1 ssl: Prevent unbounded ssl_history growth
The previous fix also made it clear that the ssl_history field may grow
unbounded via the ssl_alert event. Prevent by capping using a configurable
limit (default 100) and raise a weird once reached.
2023-10-25 10:05:09 -07:00
Arne Welzel
da91cee022 ssl: Cap number of alerts parsed from SSL record
Limit the number of events raised from an SSL record with content_type
alert (21) to a configurable maximum number (default 10). For TLS 1.3,
the limit is set to 1 as specified in the RFC. Add a new weird for the
in cases where the limit is exceeded.

OSS-Fuzz managed to generate a reproducer that raised ~660k ssl_plaintext
and ssl_alert events together given ~810kb of input data. This prevents
it with hopefully no negative side-effect in the real-world.
2023-10-25 10:05:09 -07:00
Arne Welzel
3933102c84 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-24 18:05:06 -07:00
Arne Welzel
72a54376bc 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-24 18:02:56 -07:00
Tim Wojtulewicz
63391d974a Updating CHANGES and VERSION. 2023-10-24 14:53:13 -07:00
Tim Wojtulewicz
506fd92ec7 Update cmake submodule for caching fix [nomail] 2023-10-24 14:51:14 -07:00
Arne Welzel
65f8222b92 Merge remote-tracking branch 'origin/topic/awelzel/mmdb-fix-and-tests'
* origin/topic/awelzel/mmdb-fix-and-tests:
  base/frameworks/spicy: Do not load base/misc/version
  btest/core/mmdb: Basic lookup_autonomous_system / lookup_location tests
  btest/files: Add mmdb testing databases and generator code
  zeek.bif: Switch mmdb stale check to network_time
  Fix mmdb pointer destruction

(cherry picked from commit 44b67894ac)
2023-10-24 13:49:25 -07:00
Arne Welzel
4d80668f1f Merge remote-tracking branch 'origin/topic/awelzel/3190-supervisor-eventmgr-shared-pipe-fix'
* origin/topic/awelzel/3190-supervisor-eventmgr-shared-pipe-fix:
  event: Reinitialize EventMgr's flare after fork() from stem

(cherry picked from commit 22fb445a7f)
2023-10-24 13:34:11 -07:00
Tim Wojtulewicz
143f112a5c Bump libunistd submodule to get poll() implementation 2023-10-17 09:05:32 -07:00
Tim Wojtulewicz
c6c5650e88 Updating CHANGES and VERSION. 2023-10-16 13:39:30 -07:00
Tim Wojtulewicz
e778daa9af Update zeekjs submodule to v0.9.6 [nomail] 2023-10-16 13:32:12 -07:00
Tim Wojtulewicz
190df38f12 Updating CHANGES and VERSION. 2023-10-16 13:30:20 -07:00
Benjamin Bannier
3d2c69a13b Merge branch 'origin/topic/bbannier/spicy-reject_protocol-during-teardown'
(cherry picked from commit 03597d210d)
2023-10-16 13:27:18 -07:00
Tim Wojtulewicz
64f96e0a78 Updating CHANGES and VERSION. 2023-10-16 13:25:10 -07:00
Tim Wojtulewicz
6de304e0dd Merge remote-tracking branch 'origin/topic/awelzel/3309-dns-mgr-revents-ouch'
* origin/topic/awelzel/3309-dns-mgr-revents-ouch:
  DNS_Mgr: Fix | vs & for pollfd.revents

(cherry picked from commit 0424eefd96)
2023-10-16 13:23:01 -07:00
Arne Welzel
7291ac4f26 DNS_Mgr: Replace ares_fds() with ares_getsock()
On Slack, a user reported "fortify source" aborts within ares_fds() due
to the FDs used by c-ares exceeding 1024 and thereby larger than the
maximum fd value that a fd_set can hold.

Switch to ares_get_socks() and poll() to avoid this.

Closes #3309.

(cherry picked from commit c4c4a23bfd)
2023-10-16 13:22:14 -07:00
Tim Wojtulewicz
526e0ae0ad Update cmake submodule [nomail] 2023-10-16 13:21:18 -07:00
Arne Welzel
651b208937 Merge remote-tracking branch 'origin/topic/bbannier/issue-3279'
* origin/topic/bbannier/issue-3279:
  Fix handling of module scope when checking exported Spicy types for collisions

(cherry picked from commit 30dc6af831)
2023-10-16 13:15:40 -07:00
Tim Wojtulewicz
b6090f1fe6 Merge remote-tracking branch 'origin/topic/bbannier/bump-spicy-6.0' into release/6.0
* origin/topic/bbannier/bump-spicy-6.0:
  Bump auxil/spicy to latest 1.8 development snapshot
2023-10-13 12:59:21 -07:00
Tim Wojtulewicz
498d31fb24 NEWS: Clarify the VLAN patch in 6.0.1 2023-10-13 12:58:36 -07:00
Benjamin Bannier
450483041f Bump auxil/spicy to latest 1.8 development snapshot 2023-10-13 12:19:56 +02:00
Arne Welzel
876d16b4be ci/benchmark: Send more Cirrus, GitHub and Zeek version information
I wonder if we hit a query string limitation and should instead switch
to post body here. It's the `curl -G -X POST` part making this a POST
with a long query string.

(cherry picked from commit 7b28152a92)
2023-09-19 19:57:51 +02:00
Tim Wojtulewicz
1c84aa0d53 Update docs submodule for v6.0.1 [nomail] 2023-09-12 13:37:49 -07:00
Tim Wojtulewicz
684a9b3624 Updating CHANGES and VERSION. 2023-09-12 12:47:58 -07:00
Tim Wojtulewicz
8e04583831 Remove EOL Ubuntu 22.10 build, update Ubuntu 22.04 docker image 2023-09-12 11:17:35 -07:00
Tim Wojtulewicz
850723400e Update CHANGES, VERSION, and NEWS for 6.0.1 release 2023-09-12 10:12:49 -07:00
Tim Wojtulewicz
f0bf803dd2 Update dump_events test baseline after fseek changes 2023-09-12 09:41:10 -07:00
Johanna Amann
3c3a3c92ea Add extract_limit_includes_missing option for file extraction
Setting this option to false does not count missing bytes in files towards the
extraction limits, and allows to extract data up to the desired limit,
even when partial files are written.

When missing bytes are encountered, files are now written as sparse
files.

Using this option requires the underlying storage and utilities to support
sparse files.

(cherry picked from commit afa6f3a0d3b8db1ec5b5e82d26225504c2891089)
2023-09-12 09:41:03 -07:00
Johanna Amann
9ab61fb626 File extraction: use fseek
In the past, we allocated a buffer with zeroes and wrote that with
fwrite. Now, instead we just fseek to the correct offset.

This changes the way in which the file extract limit is counted a bit;
skipped bytes do no longer count against the file size limit.

(cherry picked from commit 5071592e9b7105090a1d9de19689c499070749d4)
2023-09-12 09:40:56 -07:00
Arne Welzel
a96bcef839 ftp: Do not log non-pending commands
OSS Fuzz generated a CWD request and reply followed by very many EPRT
requests. This caused Zeek to re-log the CWD request and invoke `build_url_ftp()`
over and over again resulting in long processing times.

Avoid this scenario by not logging commands that aren't pending anymore.

(cherry picked from commit b05dd31667ff634ec7d017f09d122f05878fdf65)
2023-09-12 09:40:51 -07:00
Arne Welzel
3724c14ad2 http/smtp: Fix wrong character class usage
A call to `extract_filename_from_content_disposition()` is only
efficient if the string is guaranteed to contain the pattern that
is removed by `sub()`. Due to missing brackets around the `[:blank:]`
character class, an overly long string (756kb) ending in
"Type:dtanameaa=" matched the wrong pattern causing `sub()` to
exhibit quadratic runtime. Besides that, we may have potentially
extracted wrong information from a crafted header value.

(cherry picked from commit 6d385b1ca724a10444865e4ad38a58b31a2e2288)
2023-09-12 09:40:38 -07:00
Tim Wojtulewicz
ef19a30015 Make sure that all sessions/connections are done before deleting plugins
(cherry picked from commit e29b499a211137cf3cf0c24a4ff82db1b806f132)
2023-09-12 09:40:32 -07:00
Tim Wojtulewicz
02af9a9787 VLAN: Fix length checking for non-Ethernet type 2 frames
(cherry picked from commit c579eb7b7cf3ca1d9008e74d7934155866c7e4f7)
2023-09-12 09:40:27 -07:00
Arne Welzel
a0c384015a Merge remote-tracking branch 'origin/topic/awelzel/dns-mgr-fixes'
* origin/topic/awelzel/dns-mgr-fixes:
  DNS_Mgr: Use Process() for timeout expiration
  DNS_Mgr: Fix GetNextTimeout() returning absolute values

(cherry picked from commit 1441b83411)
2023-09-08 11:10:16 -07:00
Arne Welzel
fe9c7d4191 Merge remote-tracking branch 'origin/topic/jazoff/gh-3268t '
* origin/topic/jazoff/gh-3268:
  Fix check for emailed notices

Changes: Added a test-case printing email_delay_tokens to compare email vs
non-email notice types. Previously, both notice types would have email
delay tokens at that point in the flow.

(cherry picked from commit 7e11501d3c)
2023-09-08 11:09:56 -07:00
Tim Wojtulewicz
8507d58141 Update CHANGES, VERSION, and NEWS 2023-09-07 18:32:06 -07:00
Arne Welzel
c413c6d71a Merge remote-tracking branch 'origin/topic/awelzel/3278-spicy-fix-port-range-off-by-one'
* origin/topic/awelzel/3278-spicy-fix-port-range-off-by-one:
  spicy: Do not register port N+1 for port N in .evt file

(cherry picked from commit 6e6a2bee8a)
2023-09-07 18:13:48 -07:00
Christian Kreibich
846d764886 Updating auxil/zeek-client submodule [nomail]
(cherry picked from commit 21562cfbb2)
2023-09-07 18:12:35 -07:00
Tim Wojtulewicz
973bdbec19 Merge remote-tracking branch 'origin/topic/neverlord/gh-3247'
* origin/topic/neverlord/gh-3247:
  Forward OpenSSL include path to plugins

(cherry picked from commit 19719b1862)
2023-08-29 12:15:20 -07:00
Johanna Amann
ab2b241c3f Merge remote-tracking branch 'origin/topic/johanna/gh-3242'
* origin/topic/johanna/gh-3242:
  Community-id: load main script in notice script, fix notice script

(cherry picked from commit 70c76977cf)
2023-08-23 10:16:45 -07:00
Tim Wojtulewicz
d4036f423d Update NEWS for upcoming 6.0.1 release 2023-08-22 12:42:19 -07:00
Tim Wojtulewicz
38d951964d CI: refresh all docker images, fix package installation on opensuse-tumbleweed 2023-08-16 15:10:09 -07:00
Tim Wojtulewicz
c7cfeeb572 Update scripts.policy.misc.dump-events baseline for connection flipping PR 2023-08-16 11:05:34 -07:00
Tim Wojtulewicz
1e348d885d CI: update freebsd to 13.2 and 12.4
(cherry picked from commit 6761aebef7)
2023-08-16 10:14:40 -07:00