Commit graph

14697 commits

Author SHA1 Message Date
Tim Wojtulewicz
88c6d64cc5 Update zeekctl test baseline for changes to Site::local_nets 2023-03-18 20:23:00 -07:00
Tim Wojtulewicz
7c92a58e05 Merge remote-tracking branch 'origin/topic/neverlord/gh-2853'
* origin/topic/neverlord/gh-2853:
  Update Broker for fixing #2853
2023-03-18 17:10:46 -07:00
Christian Kreibich
ebbed2aa04 Merge branch 'topic/christian/fix-signedness-warning'
* topic/christian/fix-signedness-warning:
  Fix integer signedness comparison warning with GCC 12.2
2023-03-17 14:39:52 -07:00
Dominik Charousset
ffb31a64af Update Broker for fixing #2853 2023-03-17 19:52:18 +01:00
Christian Kreibich
2eabbd2a0d Fix integer signedness comparison warning with GCC 12.2
This fixes a "warning: comparison of integer expressions of different
signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’".
2023-03-16 18:10:59 -07:00
zeek-bot
85acdea90f Update doc submodule [nomail] [skip ci] 2023-03-17 00:17:22 +00:00
Arne Welzel
61a5a16ed0 Merge remote-tracking branch 'origin/topic/awelzel/remove-dns-ad-cd-from-log-again'
* origin/topic/awelzel/remove-dns-ad-cd-from-log-again:
  dns: Remove AD and CD flags from log
2023-03-16 10:19:04 +01:00
Arne Welzel
cf2da5160b dns: Remove AD and CD flags from log
There was a misunderstanding whether to include them by default in
the dns.log, so remove them again.

There had also been a discussion and quirk that AD of a request would
always be overwritten by reply in the dns.log unless the reply is
missing. For now, let users extend dns.log themselves for what best
fits their requirements, rather than adding these flags by default.

Add a btest to print AD and CD flags for smoke testing still.
2023-03-16 10:09:27 +01:00
Christian Kreibich
e25d9bdee9 Merge branch 'topic/christian/gh-2761-default-localnets'
* topic/christian/gh-2761-default-localnets:
  Update NEWS to cover new Site::local_nets behavior.
  Bump external testsuites to reflect updated baselines
  Add btests for new Site::local_nets behavior
  Update plugins.hooks baseline to reflect added config framework activity
  Update scripts.policy.misc.dump-events baseline
  Update btest baselines to reflect the use of local address ranges.
  Tighten local-nets filtering in the logging framework's path-func-column-demote test
  Fix scripts.policy.frameworks.intel.removal test given address locality info
  Treat private address space as site-local by default
  Provide a mechanism to suppress logging of internal config framework activity
2023-03-15 20:05:40 -07:00
Christian Kreibich
7a21a90f19 Updating CHANGES and VERSION. 2023-03-15 20:00:10 -07:00
zeek-bot
edf726f84a Update doc submodule [nomail] [skip ci] 2023-03-16 00:41:33 +00:00
Christian Kreibich
c456f0206d Update NEWS to cover new Site::local_nets behavior. 2023-03-15 17:33:00 -07:00
Christian Kreibich
fa15d1b258 Bump external testsuites to reflect updated baselines 2023-03-15 17:32:56 -07:00
Christian Kreibich
b2319ba5d9 Add btests for new Site::local_nets behavior 2023-03-15 17:11:08 -07:00
Christian Kreibich
c3cde56a0a Update plugins.hooks baseline to reflect added config framework activity 2023-03-15 17:11:08 -07:00
Christian Kreibich
f73c4e91d1 Update scripts.policy.misc.dump-events baseline 2023-03-15 17:11:08 -07:00
Christian Kreibich
1843e2daae Update btest baselines to reflect the use of local address ranges. 2023-03-15 17:11:04 -07:00
Christian Kreibich
4281d704c1 Tighten local-nets filtering in the logging framework's path-func-column-demote test
With private addresses treated as local ones, this picked up some private-range
flows in the test pcap involved.
2023-03-15 17:01:01 -07:00
Christian Kreibich
d387da9f71 Fix scripts.policy.frameworks.intel.removal test given address locality info
This test used `Site::is_local_addr()` as part of a filtering criterion, perhaps
unintentionally. The fact that it applied to all tested addresses kept a Zeek
process from exiting, failing the test. It also doesn't need to prioritize its
zeek_init() handler.
2023-03-15 17:01:00 -07:00
Christian Kreibich
693d8e9251 Treat private address space as site-local by default
This makes Site::private_address_space work like a subset of Site::local_nets,
to match many user's intuition of how we should treat site locality out of the
box. As config options, changes/redefs to Site::private_address_space propagate
to Site::local_nets, while changes to the latter don't affect the former.

A new global bit `Site::private_address_space_is_local` controls the behavior.
It defaults to true, and redefing to false brings back the original behavior.
2023-03-15 17:01:00 -07:00
Christian Kreibich
19829765d4 Provide a mechanism to suppress logging of internal config framework activity 2023-03-15 17:01:00 -07:00
Tim Wojtulewicz
a16bd28284 Move port_masked variable inside #else block 2023-03-15 12:30:02 -07:00
Tim Wojtulewicz
266d36bee6 Merge remote-tracking branch 'origin/topic/timw/2571-portval-caching'
* origin/topic/timw/2571-portval-caching:
  Add configure option for preallocating PortVal objects
2023-03-15 10:48:00 -07:00
Tim Wojtulewicz
4f902c0f39 Add configure option for preallocating PortVal objects 2023-03-15 10:12:32 -07:00
Johanna Amann
aa3053db00 Merge remote-tracking branch 'origin/topic/johanna/fix-scripts.base.protocols.ssl.x509-invalid-extension-on-openssl-3.1'
* origin/topic/johanna/fix-scripts.base.protocols.ssl.x509-invalid-extension-on-openssl-3.1:
  Fix the x509-invalid-extension test on OpenSSL 3.1
2023-03-15 14:11:10 +01:00
Johanna Amann
dcbc809189 Merge remote-tracking branch 'origin/topic/johanna/certificate-req'
* origin/topic/johanna/certificate-req:
  SSL/TLS CertificateRequest message: Address review feedback
  SSL/TLS: Parse CertificateRequest message
2023-03-15 10:03:25 +01:00
Johanna Amann
3524883008 Fix the x509-invalid-extension test on OpenSSL 3.1
OpenSSL 3.1 switched from outputting UNDEF to not giving a short name in
this case. Luckily this only requires a tiny test change.

We might consider pulling this into older versions, for ease of CI
testing.

Fixes GH-2869
2023-03-15 09:35:10 +01:00
Johanna Amann
b8d658ac77 SSL/TLS CertificateRequest message: Address review feedback
Minor stylistic changes; see https://github.com/zeek/zeek/pull/2855 for
details
2023-03-15 09:19:26 +01:00
zeek-bot
13648c88aa Update doc submodule [nomail] [skip ci] 2023-03-15 00:17:01 +00:00
Arne Welzel
33090d7a27 Merge branch 'dnssec-flag-parse' of github.com:micrictor/zeek-codespace
* 'dnssec-flag-parse' of github.com:micrictor/zeek-codespace:
  Update external testing commit hash for DNS flag changes
  Parse DNSSEC AD and CD bits

Updated dump-events baseline which seemed unrelated.
2023-03-14 10:35:50 +01:00
Michael
33a6dd131d Update external testing commit hash for DNS flag changes
Update external testing commit hash to match
https://github.com/zeek/zeek-testing/pull/11
2023-03-13 14:35:43 -07:00
Michael R. Torres
fe8390c646 Parse DNSSEC AD and CD bits
Parse authentic data (AD) and checking disabled (CD) bits according to
RFC 2535. Leaves the Z field as-is, in case users are already handling
this elsewhere and depend on the value being the integer for all 3 bits.

https://www.rfc-editor.org/rfc/rfc2535#section-6.1

Fixes #2672
2023-03-13 14:35:06 -07:00
Arne Welzel
c29b98b224 Merge remote-tracking branch 'origin/topic/awelzel/http-content-range-parsing-robustness'
* origin/topic/awelzel/http-content-range-parsing-robustness:
  HTTP: Make Content-Range parsing more robust
2023-03-13 18:41:16 +01:00
Arne Welzel
b21e6f72da HTTP: Make Content-Range parsing more robust
This was exposed by OSS-Fuzz after the HTTP/0.9 changes in zeek/zeek#2851:
We do not check the result of parsing the from and last bytes of a
Content-Range header and would reference uninitialized values on the stack
if these were not valid.

This doesn't seem as bad as it sounds outside of yielding non-sensible values:
If the result was negative, we weird/bailed. If the result was positive, we
already had to treat it with suspicion anyway and the SetPlainDelivery()
logic accounts for that.
2023-03-13 18:00:39 +01:00
Arne Welzel
e62e57a7cf Merge remote-tracking branch 'origin/topic/awelzel/http09-reset-reply-message'
* origin/topic/awelzel/http09-reset-reply-message:
  HTTP: Reset reply_message for HTTP/0.9
2023-03-13 17:54:29 +01:00
Tim Wojtulewicz
c72b163f0f Merge remote-tracking branch 'origin/topic/timw/coverity-issues'
* origin/topic/timw/coverity-issues:
  dlclose() handle if the library loaded wasn't a plugin
  Fix uninitialized variables in Ascii writer
  Fix use-after-move bug in Scope constructor
  Add missing field initializations for ConnTuple
  Fix possible resource leak in analyzer unit tests
2023-03-13 09:02:58 -07:00
Tim Wojtulewicz
ada22fbf42 dlclose() handle if the library loaded wasn't a plugin 2023-03-13 08:08:40 -07:00
Tim Wojtulewicz
6a2e43635f Fix uninitialized variables in Ascii writer 2023-03-13 08:08:40 -07:00
Tim Wojtulewicz
9eaa2cb45b Fix use-after-move bug in Scope constructor 2023-03-13 08:08:40 -07:00
Tim Wojtulewicz
06bac61607 Add missing field initializations for ConnTuple 2023-03-13 08:08:40 -07:00
Tim Wojtulewicz
78636e9c30 Fix possible resource leak in analyzer unit tests 2023-03-13 08:08:40 -07:00
Arne Welzel
fbf9d53c44 HTTP: Reset reply_message for HTTP/0.9
OSS-Fuzz tickled an assert when sending a HTTP response before a HTTP/0.9
request. Avoid this by resetting reply_message upon seeing a HTTP/0.9 request.

PCAP was generated artificially: Server sending a reply providing a
Content-Length. Because HTTP/0.9 processing would remove the ContentLine
support analyzer, more data was delivered to the HTTP_Message than
expected, triggering an assert.

This is a follow-up for zeek/zeek#2851.
2023-03-13 14:13:50 +01:00
Arne Welzel
c5a9eb920c Merge remote-tracking branch 'origin/topic/awelzel/pkt-src-get-next-timeout-rework'
* origin/topic/awelzel/pkt-src-get-next-timeout-rework:
  Allow offline packet sources to register FDs.
  PktSrc: Avoid calling ExtractNextPacketInternal() in GetNextTimeout()
2023-03-13 09:56:44 +01:00
Arne Welzel
32ddeac540 cirrus: Do not run builtin-plugin CI during PRs 2023-03-13 09:47:06 +01:00
Arne Welzel
dc068270ea Merge remote-tracking branch 'origin/topic/awelzel/2837-builtin-plugin-ci-take-two'
* origin/topic/awelzel/2837-builtin-plugin-ci-take-two:
  cirrus: Add smoke testing for builtin plugins
  ci/collect-repo-info: Make plugin VERSION reading more robust
  configure: Quote --include-plugins argument
  Fix --no-install-recommends typo
2023-03-13 09:41:12 +01:00
zeek-bot
0907c78e42 Update doc submodule [nomail] [skip ci] 2023-03-13 00:25:46 +00:00
Tim Wojtulewicz
0567d336d2 Merge remote-tracking branch 'origin/topic/timw/centos-7-ci-install-git'
* origin/topic/timw/centos-7-ci-install-git:
  Force rebuild of CentOS 7 CI image to pick up git install
2023-03-12 13:52:26 -07:00
Tim Wojtulewicz
dfde432a37 Force rebuild of CentOS 7 CI image to pick up git install 2023-03-12 13:34:12 -07:00
Tim Wojtulewicz
22b98e16aa Merge remote-tracking branch 'origin/topic/awelzel/more-dns-stats'
* origin/topic/awelzel/more-dns-stats:
  get_dns_stats: Expose total cache size and cached text entries
2023-03-12 13:09:53 -07:00
Tim Wojtulewicz
b14cc413d8 Merge remote-tracking branch 'origin/topic/timw/2845-http-09'
* origin/topic/timw/2845-http-09:
  Add weird for unknown HTTP/0.9 request method
  Special case HTTP 0.9 early on
  Remove a couple unnecessary break statements
2023-03-10 15:50:17 -07:00