Commit graph

12680 commits

Author SHA1 Message Date
Tim Wojtulewicz
f93c5a6942 Store some additional information in the packet during processing
- Session related to the packet
- is_orig information if a UDP header was found
2021-11-23 19:36:49 -07:00
Tim Wojtulewicz
5f58ce8a5d Minor fix in UDP to avoid duplicating tunnels 2021-11-23 19:36:49 -07:00
Tim Wojtulewicz
1dede6dd70 Fix error text in IPTunnel analyzer 2021-11-23 19:36:49 -07:00
Tim Wojtulewicz
ed798c6aba Change Packet::ip_hdr to be a shared_ptr so it can be copied into EncapsulatingConn 2021-11-23 19:36:49 -07:00
Tim Wojtulewicz
d4f57a6100 Add method for packet analyzers to register for protocol detection 2021-11-23 19:36:49 -07:00
Tim Wojtulewicz
a7d3cb48ef Add concept of "parent" tag namespaces
This allows us to create an EnumType that groups all of the analyzer
tag values into a single type, while still having the existing types
that split them up. We can then use this for certain events that benefit
from taking all of the tag types at once.
2021-11-23 19:36:49 -07:00
Tim Wojtulewicz
7d66f4252f Unify plugin::Component and plugin::TaggedComponent into a single class
These two are almost always used in conjunction with each other, and
TaggedComponent is never used by itself. Combining them together into
a single class will help simplify some of the code around managing
the mapping between Tags and Components.
2021-11-23 19:36:49 -07:00
Tim Wojtulewicz
8b544d648d Remove uses of deprecated Tag types 2021-11-23 19:36:49 -07:00
Tim Wojtulewicz
331161138a Unify all of the Tag types into one type
- Remove tag types for each component type (analyzer, etc)
- Add deprecated versions of the old types
- Remove unnecessary tag element from templates for TaggedComponent and ComponentManager
- Enable TaggedComponent to pass an EnumType when initializing Tag objects
- Update some tests that are affected by the tag enum values changing order
2021-11-23 19:36:49 -07:00
zeek-bot
4f9f46a0c4 Update doc submodule [nomail] [skip ci] 2021-11-24 00:42:06 +00:00
Johanna Amann
3fe6ad1a82 Merge remote-tracking branch 'origin/topic/johanna/gh-1829-test'
* origin/topic/johanna/gh-1829-test:
  Add testcase for TCP segment offloading.
2021-11-23 15:35:35 +00:00
Johanna Amann
3846f69f38 Merge remote-tracking branch 'origin/topic/johanna/openssl-3-compat'
* origin/topic/johanna/openssl-3-compat:
  Update cmake submodule for OpenSSL 3.0 changes
  OpenSSL 3: normalize self-signed-cert error message
  Make cmake & ci like OpenSSL 3.0
  Add OpenSSL 3.0 CI test
  OpenSSL 3: fix warnings and tests
  Switch OpaqueVal hashing back to legacy OpenSSL implementation

Fixes GH-1379
2021-11-23 13:48:26 +00:00
Johanna Amann
d3f16af4ab Add testcase for TCP segment offloading.
Relates to GH-1829
2021-11-23 12:37:55 +00:00
Johanna Amann
12d81b27ed Merge remote-tracking branch 'origin/master' into topic/johanna/openssl-3-compat 2021-11-23 10:23:12 +00:00
Johanna Amann
48ee7db3c1 Merge remote-tracking branch 'origin/topic/johanna/gh-1829'
* origin/topic/johanna/gh-1829:
  Add documentation for GH-1829
  Packets with TSO: address review feedback.
  Accept packets that use tcp segment offloading.

Fixes GH-1829
2021-11-23 10:20:07 +00:00
Vern Paxson
84423369b4 use iterator-based idiom for check-if-present-then-access 2021-11-22 15:28:15 -08:00
Vern Paxson
735d584d9f const-ify member function 2021-11-22 10:55:38 -08:00
Christian Kreibich
f6a9dc416e Updates to NEWS to cover recent additions. [nomail] [skip ci] 2021-11-18 17:25:36 -08:00
Christian Kreibich
ee28e3e8b1 Update doc and auxil/zeek-aux submodules [nomail] [skip ci] 2021-11-18 17:09:40 -08:00
Vern Paxson
ffbbacd3b1 switch looping over vectors to use iterators 2021-11-18 08:58:04 -08:00
Vern Paxson
6f82c1610e remove unused local variables 2021-11-18 08:57:03 -08:00
Vern Paxson
8e77e3e92c efficiency fix - return a reference rather than a copy of a map 2021-11-18 08:56:24 -08:00
Johanna Amann
0b517c01e0 Update cmake submodule for OpenSSL 3.0 changes 2021-11-18 07:44:01 +00:00
Christian Kreibich
67cbec9123 Update cmake and aux/zeek-aux submodules [nomail] [skip ci] 2021-11-17 16:42:04 -08:00
Christian Kreibich
c9229b68cf Merge branch 'topic/christian/fix-docker-doublebuild'
* topic/christian/fix-docker-doublebuild:
  Clean up fully after successful Docker btests
2021-11-17 11:58:13 -08:00
Johanna Amann
ff0bc86021 OpenSSL 3: normalize self-signed-cert error message
The message changed between OpenSSL 1.1 and 3.0 - we just use the old
one to not mess up the external test baselines.
2021-11-17 17:21:21 +00:00
Johanna Amann
0dc8dfacb7 Make cmake & ci like OpenSSL 3.0
Older cmake versions have problems with the version number. When
installing OpenSSL on a 64 bit linux one also needs to create an
additional symlink to get cmake to use the correct library.
2021-11-17 14:57:23 +00:00
Johanna Amann
ce38b5a056 Add OpenSSL 3.0 CI test 2021-11-17 13:33:49 +00:00
Johanna Amann
253d214126 OpenSSL 3: fix warnings and tests
This commit fixes the compile-time warnings that OpenSSL 3.0 raises for
our source-code. For the cases where this was necessary we now have two
implementations - one for OpenSSL 1.1 and earlier, and one for OpenSSL
3.0.

This also makes our testsuite pass with OpenSSL 3.0

Relates to GH-1379
2021-11-17 13:33:49 +00:00
Christian Kreibich
1dd6c1d716 Clean up fully after successful Docker btests
If we leave files sitting around, we trigger a Docker image double-build in CI,
because the build runs once, gets tested, and then gets run again when we push
the Docker image: the additional btest files cause Docker to detect a different
source tree, causing an image layer violation.

Also rename "cleanup" target to "clean", to align with rest of our tree.
2021-11-16 15:13:10 -08:00
Johanna Amann
6217851d6d Switch OpaqueVal hashing back to legacy OpenSSL implementation
This commit switches hashing from the more modern EVP message digest to
the older direct function calls, that are deprecated as of OpenSSL 3.0.

The reason is that we require the ability to store the internal state of
hash operations to disk. This is no longer possible with the
architecture that is used by the EVP digests; it is, however, possible
when using the legacy methods.

There might be a way to do this more cleanly in OpenSSL 3.1 - but for
the moment this seems like the easiest solution - even though I am not
really happy about it.

For details see zeek/zeek#1379 and openssl/openssl#14222
2021-11-16 15:33:31 +00:00
Johanna Amann
14f919895d Add documentation for GH-1829
This adds documentation that clarifies that the `ignore_checksums`
option now also allows IPv4 packets with a length of 0.
2021-11-16 13:51:29 +00:00
Christian Kreibich
bdb5222c27 Merge branch 'topic/christian/docker-tag-fix'
* topic/christian/docker-tag-fix:
  Fix ref-naming typo in the Github Docker workflow
2021-11-15 10:11:27 -08:00
Christian Kreibich
9675d866bb Fix ref-naming typo in the Github Docker workflow
When triggering upon a tag push, we now correctly compute the Docker image tag
based on the VERSION file.
2021-11-15 09:51:32 -08:00
zeek-bot
59d7d2896c Update doc submodule [nomail] [skip ci] 2021-11-13 00:42:02 +00:00
Tim Wojtulewicz
3cd9387eab Merge remote-tracking branch 'origin/topic/timw/1736-update-libkqueue'
* origin/topic/timw/1736-update-libkqueue:
  Update libkqueue submodule
2021-11-12 13:46:52 -07:00
Tim Wojtulewicz
362df3f1db Merge remote-tracking branch 'origin/topic/timw/1620-unprocessed-packets'
* origin/topic/timw/1620-unprocessed-packets:
  Added plugin.unprocessed_packet_hook btest
  Fix whitespace in help output
  Add command-line option to write unprocessed packets to a file
  GH-1620: Add event and plugin hook to track packets not processed
2021-11-12 09:31:10 -07:00
Tim Wojtulewicz
6e8dae316b Added plugin.unprocessed_packet_hook btest 2021-11-12 09:30:26 -07:00
Tim Wojtulewicz
d0f8c50417 Fix whitespace in help output 2021-11-12 09:30:26 -07:00
Tim Wojtulewicz
92b84a00f9 Add command-line option to write unprocessed packets to a file
This commit also changes the PcapDumper to automatically flush after
every called to Dump(). This is because pcap_dump has an internal buffer
of some sort that only writes to the file after a set amount of bytes.
When using the new option on a low-traffic network, it might be a while
before you see any packets written since it has to overcome that buffer
limit first.
2021-11-12 09:30:26 -07:00
Tim Wojtulewicz
fe932944c4 GH-1620: Add event and plugin hook to track packets not processed 2021-11-12 09:30:26 -07:00
Christian Kreibich
8fece3d8ea Update cmake submodule [nomail] [skip ci] 2021-11-11 14:35:43 -08:00
Tim Wojtulewicz
362566369f Update libkqueue submodule 2021-11-11 19:05:31 +00:00
zeek-bot
a6f18d514d Update doc submodule [nomail] [skip ci] 2021-11-11 00:43:13 +00:00
Tim Wojtulewicz
87d17cf56d Merge remote-tracking branch 'origin/topic/bbannier/install-3rdparty-headers'
* origin/topic/bbannier/install-3rdparty-headers:
  Install include headers from `src/3rdparty/`.
2021-11-10 10:20:13 -07:00
Johanna Amann
d451fb8184 Merge branch 'topic/AbdelSaTd/case-insensitive-find'
* topic/AbdelSaTd/case-insensitive-find:
  testing-do-find-str_case-insensitive
  case-insensitive-search-features-for-do_find_str

I did a few small style-fixes while merging this and expanded the test
a bit. I also removed unecessary commits.

Closes GH-1828
2021-11-10 11:33:47 +00:00
Abdel
effa8c403f testing-do-find-str_case-insensitive 2021-11-10 11:25:20 +00:00
Abdel
82b3606cdd case-insensitive-search-features-for-do_find_str 2021-11-10 11:25:20 +00:00
Robin Sommer
1bb21bfcb4 Merge remote-tracking branch 'origin/topic/robin/gh-1757-loadfile2'
* origin/topic/robin/gh-1757-loadfile2:
  Tweaking a couple of debug message.
  Add new hook `HookLoadFileExtended` that allows plugins to supply Zeek script code to parse.
  Move logic to execute `HookLoadFile` for signatures into rule matcher code.
2021-11-10 11:28:53 +01:00
Robin Sommer
64e34b52aa Tweaking a couple of debug message.
As suggested during review.
2021-11-10 09:39:16 +01:00