Commit graph

3882 commits

Author SHA1 Message Date
Henrik Kramselund Jereminsen
cd5d80c13d Copy of ascii-empty test, just changed path in the beginning 2021-06-10 10:33:35 +01:00
Vern Paxson
2acaacee2d whoops overlooked the need to canonicalize filenames 2021-06-09 15:29:39 -07:00
Vern Paxson
7904701ffb another set of tweaks per review comments 2021-06-09 09:41:41 -07:00
Tim Wojtulewicz
d15fca7e17 Merge remote-tracking branch 'origin/topic/timw/fix-ip-header-length-checking'
* origin/topic/timw/fix-ip-header-length-checking:
  Fix handling of IP packets with bogus IP header lengths
2021-06-04 08:28:57 -07:00
Vern Paxson
b3e3cb847b baseline updates for merge 2021-06-03 09:21:45 -07:00
Vern Paxson
4172b9e147 Merge remote-tracking branch 'origin/master' into topic/vern/ZAM-prep 2021-06-03 08:13:48 -07:00
Johanna Amann
011ac442a1 Remove the Stepping Stone analyzer
This commit removes the stepping stone analyzer. It has been deactivated
by default since at least Zeek 2.0, is dysfunctional in cluster settings
and has a bunch of other issued.

Relates to GH-1573
2021-06-03 14:28:12 +01:00
Christian Kreibich
c96a177d88 Make update-traces fail when the curl invocation fails 2021-06-02 19:12:46 -07:00
Vern Paxson
7a96d2fa61 better descriptions for named record constructors 2021-06-02 15:57:25 -07:00
Tim Wojtulewicz
b171f94729 Merge remote-tracking branch 'zeek-security/topic/timw/mobile-ipv6-overflow'
* zeek-security/topic/timw/mobile-ipv6-overflow:
  Add some extra length checking when parsing mobile ipv6 packets
2021-06-02 10:02:59 -07:00
Vern Paxson
a6480e5eec test suite baseline updates for "-a opt" optimize-AST alternative 2021-06-01 15:00:28 -07:00
Vern Paxson
9ab43ebe28 test suite baseline updates for "-a xform" alternative / AST transformation 2021-06-01 14:14:19 -07:00
Vern Paxson
783b6d1fdb updates to "-a inline" test suite alternative baseline 2021-06-01 13:00:47 -07:00
Vern Paxson
eb75db8b56 updates for the main test suite baseline 2021-06-01 12:47:21 -07:00
Tim Wojtulewicz
ff79a58f59 Merge remote-tracking branch 'origin/topic/neverlord/telemetry-scraper'
* origin/topic/neverlord/telemetry-scraper:
  Integrate review feedback
  Sync new broker options, fix name inconsistencies
  Integrate new Broker metric exporter parameters
2021-06-01 10:19:46 -07:00
Vern Paxson
b6e9776a11 updates to test suite tests for compatibility with upcoming ZAM functionality 2021-06-01 09:25:30 -07:00
Tim Wojtulewicz
0e34f2e02f Fix handling of IP packets with bogus IP header lengths
Credit to OSS-Fuzz for discovery
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34711
(Link to details becomes public 30 days after patch release)
2021-05-27 16:33:50 -07:00
Jon Siwek
77f1ede661 GH-839: Fix use of &optional sub-records within table/set indices 2021-05-26 13:28:13 -07:00
Dominik Charousset
44ca01eb18 Merge branch master into topic/neverlord/telemetry-scraper 2021-05-26 08:06:13 +02:00
Dominik Charousset
7767c3d36c Sync new broker options, fix name inconsistencies 2021-05-25 17:22:45 +02:00
Dominik Charousset
f9cd05f00b Integrate new Broker metric exporter parameters 2021-05-24 17:20:48 +02:00
Tim Wojtulewicz
54271657a8 Add some extra length checking when parsing mobile ipv6 packets
Credit to OSS-Fuzz for discovery
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34263
(Link to details becomes public 30 days after patch release)
2021-05-20 15:32:07 -07:00
Tim Wojtulewicz
c21af39a30 Add new UDP packet analyzer, remove old one 2021-05-18 11:52:04 -07:00
Tim Wojtulewicz
d8adfaef65 Add new ICMP packet analyzer, remove old one 2021-05-18 11:52:03 -07:00
Tim Wojtulewicz
c1f0d312b5 Add base class for IP-based packet analyzers 2021-05-18 11:52:03 -07:00
Tim Wojtulewicz
0c3e3069d0 Added skeletons for TCP/UDP/ICMP packet analysis plugins.
This includes integration into the IP plugin and calling of the sessions code from each plugin.
2021-05-18 11:52:03 -07:00
Jon Siwek
8996dfbfef Omit unneeded decimal points in modp_dtoa2() scientific notation output
For example, "1e-13" is now used instead of "1.e-13".
2021-05-17 17:56:19 -07:00
Jon Siwek
48ee0f31a1 GH-1244: Change modp_dtoa2() to use scientific notation for small values
This fixes problems where printing floating point numbers less than
10^-6 output as "0.0".  Such numbers now use using scientific notation
and preserve the value's actual floating point representation.
2021-05-17 17:44:23 -07:00
Jon Siwek
45b2d3b4f2 GH-1558: Fix reading vector of enum types from config files 2021-05-14 16:59:51 -07:00
Jon Siwek
e35888a994 GH-1555: Fix reading empty set[enum] values from config files 2021-05-14 16:32:19 -07:00
Jon Siwek
37b7c65310 Merge remote-tracking branch 'origin/topic/vern/cpp'
* origin/topic/vern/cpp: (34 commits)
  fixed cut-and-paste botch (redundant line of code)
  Fix LGTM warnings in script_opt/CPP code
  bug fixes for stand-alone compiles with empty records
  remove -O force-C++, and also some inadvertently replicated code
  better initial workflow, thanks to Jon Siwek
  remove optimization no longer needed
  removed redundant Traverse invocation
  style nit: removed std:: where not needed due to "using" clause
  Fix various compiler/linter warnings in script_opt/CPP code
  first cut at embedding filenames in C++ function names - for Justin to test
  fixes for personal build scripts - will go away once workflow is streamlined
  whoops removed a std:: from generated code
  decluttered code by removing "std::" - no semantic changes (also some whitespace fixes)
  porting fixes from Justin
  documenting poor run-time error messages
  README documentation
  minor tweaks tidyness tweaks
  notes for tests that are problematic when using compile-to-C++
  new "-a cpp" btest alternative
  hooks for activating the compiler & associated BiF
  ...
2021-05-10 12:57:56 -07:00
Johanna Amann
f76a95a2c2 Merge remote-tracking branch 'origin/topic/christian/install-btest-tooling'
* origin/topic/christian/install-btest-tooling:
  Explain zeek-config options in help output
  Sort variables at top of zeek-config alphabetically
  Install Zeek's btest tooling with the distribution
2021-05-10 10:26:59 +01:00
Vern Paxson
f9c1f57f9c notes for tests that are problematic when using compile-to-C++ 2021-05-05 16:55:04 -07:00
Vern Paxson
db7f88e661 new "-a cpp" btest alternative 2021-05-05 16:55:04 -07:00
Vern Paxson
24e92fa54a hooks for activating the compiler & associated BiF 2021-05-05 16:55:04 -07:00
Jon Siwek
9e8eb30620 Add missing zeek/ prefix to a telemetry header's includes 2021-04-30 18:29:34 -07:00
Tim Wojtulewicz
72ba93d9a3 Merge remote-tracking branch 'origin/topic/jsiwek/gh-1534-better-duplicate-enum-error'
* origin/topic/jsiwek/gh-1534-better-duplicate-enum-error:
  GH-1534: Fix excessive coredump for duplicate enum definitions
2021-04-30 09:42:40 -07:00
Tim Wojtulewicz
ad67d810be Merge remote-tracking branch 'origin/topic/jsiwek/fix-netbios-decode-bifs'
* origin/topic/jsiwek/fix-netbios-decode-bifs:
  Fixes to `decode_netbios_name` and `decode_netbios_name_type` BIFs
2021-04-30 09:40:46 -07:00
Jon Siwek
13f3cb377f GH-1534: Fix excessive coredump for duplicate enum definitions
An adequate error message was previously reported for duplicate enum
definitions, this just now prevents trying to access it as a constant in
subsequent parsing and further generating a coredump.
2021-04-29 15:20:09 -07:00
Tim Wojtulewicz
0b7ca5e7bc Remove Session prefix from some session-related classes and files 2021-04-29 11:09:35 -07:00
Tim Wojtulewicz
18c6aaaa33 Move session code into new directory and into zeek::session namespace 2021-04-29 11:09:35 -07:00
Tim Wojtulewicz
db1d753b35 Rename NetSessions to SessionManager
This also includes:
- Deprecating the NetSessions name.
- Renaming the zeek::sessions global to zeek::session_mgr and deprecating the old name.
- Renaming Sessions.{h,cc} to SessionManager.{h,cc}.
2021-04-29 10:24:45 -07:00
Tim Wojtulewicz
f7e3556a67 Store a single map of Sessions instead of split maps of Connections.
This commit also includes:
- Storing the transport protocol in ConnID and ConnIDKey to allow tcp and
  udp connections from the same IP/Port combinations. This happens in the
  core.cisco-fabric-path test, for example.
- Lots of test updates. The reasons for these are two fold. First, with
  the change to only store a single map means that TCP, UDP, and ICMP
  connections are now mixed. When Zeek drains the map at shutdown, it drains
  each of those protocols together instead of separately. The second is
  because of how Sessions are stored in the map. We're now storing them
  keyed by the hash of the key stored by the Session objects, which causes
  them to again be in the map in a different order.
2021-04-29 10:24:45 -07:00
Tim Wojtulewicz
114077fd93 Add test for get_conn_stats BIF before reworking session stats 2021-04-29 10:24:45 -07:00
Tim Wojtulewicz
14ffd9646f Merge remote-tracking branch 'origin/topic/bbannier/issue-1517'
* origin/topic/bbannier/issue-1517:
  Add basic testing for Geneve protocol analyzer
  GH-1517: Add Geneve decap support
2021-04-29 09:01:11 -07:00
Jon Siwek
76fb1e7fd0 Fixes to decode_netbios_name and decode_netbios_name_type BIFs
Fixes to `decode_netbios_name`:

* Improve validation that input string is a NetBIOS encoding
  (32 bytes, with characters ranging from 'A' to 'P').  This helps
  prevent Undefined Behavior of left-shifting negative values.
  Invalid encodings now cause a return-value of an empty string.

* More liberal in what decoded characters are allowed.  Namely,
  spaces are now allowed (but any trailing null-bytes and spaces
  are trimmed, similar to before).

Fixes to `decode_netbios_name_type`:

* Improve validation that input string is a NetBIOS encoding
  (32 bytes, with characters ranging from 'A' to 'P').  This helps
  prevent Undefined Behavior of left-shifting negative values and
  a heap-buffer-overread when the input string is too small.
  Invalid encodings now cause a return-value of 256.
2021-04-27 15:27:04 -07:00
Benjamin Bannier
83ecbeea6d Add basic testing for Geneve protocol analyzer
The added pcap file was downloaded from an attachment to
https://gitlab.com/wireshark/wireshark/-/issues/10193 without explicit
license.
2021-04-27 11:21:29 +02:00
Benjamin Bannier
5b2bf374fd GH-1517: Add Geneve decap support
This patch adds the ability to decap Geneve packets to process the inner
payload. The structure of the analyzer borrows heavily from the VXLAN
analyzer.
2021-04-27 11:21:29 +02:00
Jon Siwek
d51bd4bc46 Fix using clear_table() within an &expire_func
This previously crashed since clear_table()/TableVal::RemoveAll() left
behind a stale iterator to the old table causing a heap-use-after-free
when resuming table expiry iteration in TableVal::DoExpire().
2021-04-26 22:49:44 -07:00
Vlad Grigorescu
ac720a1313 Add tests for e-mail actions, and cleanup the new logic a bit. 2021-04-26 23:01:34 -05:00