Commit graph

11634 commits

Author SHA1 Message Date
Tim Wojtulewicz
e6cf7413f9 Merge remote-tracking branch 'origin/topic/timw/hardware-checksum'
* origin/topic/timw/hardware-checksum:
  Cleanup in iosource/Packet
  Add ability for packet sources to flag a packet's l2 or l3 checksum as valid.
2020-03-17 16:55:19 -07:00
Jon Siwek
9c70bcecbc GH-865: fix parsing of SMB NegotiateContextList
* The compression capability was incorrectly set to 0x0004 instead of 0x0003

* The padding was 4-byte instead of 8-byte aligned and also the spec.
  does not strictly require the padding for the last item in the list.

* Add a default case to handle parsing of unknown context types.
2020-03-16 19:00:01 -07:00
Jon Siwek
acb3b27a2c Merge branch 'master' of https://github.com/shirkdog/zeek
* 'master' of https://github.com/shirkdog/zeek:
  Duplicate smb2_negotiate_response events defined.
2020-03-16 12:38:27 -07:00
M.Shirk
9cd914b5cf Duplicate smb2_negotiate_response events defined. 2020-03-16 11:47:39 -04:00
Jon Siwek
d560aceced Updating submodule(s).
[nomail]
2020-03-13 23:02:23 -07:00
Jon Siwek
e5e4fd6af6 Add branch whitelist for CI notifications 2020-03-13 13:41:46 -07:00
Jon Siwek
7a397d2746 Initialize RecordVal default fields when redef'd
If a RecordVal had been created, but later its RecordType redef'd to
contain fields with &default, those fields were incorrectly left
uninitialized.
2020-03-12 18:46:37 -07:00
Jon Siwek
71b82595ba GH-857: fix redefining record types used to index tables
This change tracks all TableVals created at parse-time whose index
depends on a given RecordType.  Should that RecordType be redef'd, those
TableVals are immediately rebuilt such that they are valid to
subsequently use in either parse-time initializations or eventually in
any arbitrary run-time expression.
2020-03-12 18:25:48 -07:00
Tim Wojtulewicz
ce17a1f38b Cleanup in iosource/Packet 2020-03-12 16:08:31 -07:00
Tim Wojtulewicz
c6f7665953 Add ability for packet sources to flag a packet's l2 or l3 checksum as valid.
This lets packet source plugins implement handling of hardware checksum offloading, if available. Setting the flags will skip the internal checksumming for either layer 2 and/or layer 3.
2020-03-12 16:08:22 -07:00
Jon Siwek
a61ad9ea5c Change RecordVals to get resized at time of RecordType redef
Opposed to unconditionally checking all RecordVals whether they need to
be resized after parsing ends.
2020-03-12 15:51:37 -07:00
Johanna Amann
da5fca7163 Merge branch 'topic/johanna/gh-744-cache-the-heck-out-of-these-certs'
* topic/johanna/gh-744-cache-the-heck-out-of-these-certs:
  X509 caching API change: callback gets entry directly
  Address feedback
  Small default updates & external baselines.
  X509 caching: small API changes, tests & test updates
  Certificate caching - now working in principle.
  First (sadly not completely working) approach at caching X509 certificates
2020-03-12 13:44:07 -07:00
Jon Siwek
860f851a66 Update pointer to external test repo 2020-03-12 12:04:24 -07:00
Johanna Amann
e228061f1d X509 caching API change: callback gets entry directly
Suggestion from Jon: now the callback is passed the table-entry
directly. This allows us to skip one lookup.
2020-03-12 11:31:13 -07:00
Johanna Amann
3ed9379b9e Address feedback
Smaller fixes. I split out the API change of the fallback function into
a separate commit.
2020-03-12 11:21:39 -07:00
Johanna Amann
0a7b358985 Small default updates & external baselines.
Update default caching time to be slightly more than a minute - to catch
cases that happen once a minute.

Also update external baselines.
2020-03-12 10:52:39 -07:00
Jon Siwek
b811f7cee3 Fix whitespace in connection record comments 2020-03-11 16:40:20 -07:00
Johanna Amann
4b09947f41 X509 caching: small API changes, tests & test updates
Changed some configuration defaults to potentially more same values.

The callback function is now a hook to allow costomization of the events
that are raised.

Tests now exist. Test baselines are updated.
2020-03-11 13:27:56 -07:00
Jon Siwek
26af1f55af Merge remote-tracking branch 'origin/topic/vladg/gh-843'
Added a comment to clarify comparison of EOF packet length to 13.

* origin/topic/vladg/gh-843:
  Update baselines
  Made additional MySQL fixes.
  Add support to MySQL for deprecation of EOF packets.
  Whitespace cleanup & fixes
  Fix EOF detection in the MySQL protocol analyzer.
2020-03-11 11:25:00 -07:00
Jon Siwek
dc7c7d004b Updating submodule(s).
[nomail]
2020-03-11 10:21:43 -07:00
Johanna Amann
65e99bafed Certificate caching - now working in principle.
I moved the replay function to a callback - which now means that the replayed
functions are called before file_state remove. Which makes this virtually
identical with the events raised by the core.

Currently this is mostly missing tests, leak-testing and performance-tests.
2020-03-09 14:40:10 -07:00
Tim Wojtulewicz
b2a707a7bf Merge remote-tracking branch 'origin/topic/jsiwek/coverity-gh-action'
* origin/topic/jsiwek/coverity-gh-action:
  Stop running GitHub Actions in forked repos
  Remove Travis CI configuration
  Add GitHub Action for Coverity Scan
2020-03-09 13:36:08 -07:00
Jon Siwek
065d055700 Updating submodule(s).
[nomail]
2020-03-09 12:54:59 -07:00
Vlad Grigorescu
a362189856 Update baselines 2020-03-06 22:49:26 -06:00
Vlad Grigorescu
6667af85ca Made additional MySQL fixes.
1) There are a couple more places where the new protocol uses and OK
packet instead of the deprecated EOF.

2) With > 255 results, we could end up in an situation where the uint8
sequence number would wrap, and we'd naively think it'd be a new
handshake.

Now, we track the previous sequence number, and assume overflow if it
was 255 previously and 0 now.

We also reset the previous sequence number to 0 in various packets
that we'd expect at the end of other commands.
2020-03-06 22:41:36 -06:00
Jon Siwek
c5feccb8f6 Merge remote-tracking branch 'origin/topic/timw/urgent-flag'
* origin/topic/timw/urgent-flag:
  Add urgent flag to tcp_flags documentation
2020-03-06 16:33:24 -08:00
Tim Wojtulewicz
b1378c7e0c Add urgent flag to tcp_flags documentation 2020-03-06 16:38:46 -07:00
Johanna Amann
0829164a3e First (sadly not completely working) approach at caching X509 certificates
This approach mostly relies on script-level changes. In scriptland, we track
which certificates should be cached - and also perform the caching and the
replaying of events there.

This actually is probably nearly functional - the problem is the fact that now
the event ordering is wrong - and file_state_remove is called before the x509
events are thrown.

The fix probably is to move to a callback from the core - which can execute
things in the right order again. (Or just write the whole event-raising inside
the core - but that is both less flexible and a lot more cumbersome).
2020-03-06 15:21:45 -08:00
Jon Siwek
2c46be0d6e Updating submodule(s).
[nomail]
2020-03-06 11:58:19 -08:00
Jon Siwek
64855dfa0e Updating submodule(s).
[nomail]
2020-03-06 10:40:35 -08:00
Johanna Amann
0c44c3135c Merge remote-tracking branch 'origin/topic/jsiwek/gh-836-move-3rdparties-up'
* origin/topic/jsiwek/gh-836-move-3rdparties-up:
  Move libkqueue submodule to the aux directory
  Move rapidjson submodule to aux directory
2020-03-06 07:59:59 -08:00
Johanna Amann
ca6e6b2b75 Merge remote-tracking branch 'origin/topic/jsiwek/gh-831-binary-pkg-bro-symlink'
* origin/topic/jsiwek/gh-831-binary-pkg-bro-symlink:
  GH-831: Fix the "bro" symlink for binary packaging mode
2020-03-06 07:45:31 -08:00
Max Kellermann
785ff57d11 Scope: store IntrusivePtr in local 2020-03-06 13:03:41 +01:00
Max Kellermann
6e0d331267 Scope: pass IntrusivePtr to AddInit() 2020-03-06 13:02:15 +01:00
Max Kellermann
9e00c28e48 DNS_Mgr: use class IntrusivePtr 2020-03-06 13:00:45 +01:00
Max Kellermann
dc518c0fb4 Scope: use class IntrusivePtr 2020-03-06 13:00:45 +01:00
Max Kellermann
36a26a7b43 Attr: use class IntrusivePtr 2020-03-06 12:59:47 +01:00
Max Kellermann
097a362c80 Expr: check_and_promote_expr() returns IntrusivePtr
Instead of returning a pseudo-boolean integer, it now returns a
referenced object or nullptr on error.  The old API was very error
prone because of its obscure reference counting semantics.
2020-03-06 09:39:30 +01:00
Max Kellermann
78e736621c Frame: use class IntrusivePtr 2020-03-06 09:12:03 +01:00
Max Kellermann
79570fdfd6 Val: RecordVal::LookupWithDefault() returns IntrusivePtr 2020-03-06 09:06:46 +01:00
Max Kellermann
d180ab0dd2 Type: RecordType::FieldDefault() returns IntrusivePtr
Fixes memory leak in EventHandler::NewEvent().
2020-03-06 09:06:45 +01:00
Max Kellermann
d2961c72e1 Val: TableVal::Delete() returns IntrusivePtr 2020-03-06 09:06:38 +01:00
Max Kellermann
6495193aae Type: base_type() returns IntrusivePtr 2020-03-06 09:06:38 +01:00
Max Kellermann
f0a357cadf Type: init_type() returns IntrusivePtr 2020-03-06 09:06:38 +01:00
Max Kellermann
cf11d78483 Type: merge_types() returns IntrusivePtr 2020-03-06 09:06:38 +01:00
Max Kellermann
50d53b2973 Type: use class IntrusivePtr in VectorType 2020-03-06 09:06:38 +01:00
Max Kellermann
cc8af19bf9 Type: use class IntrusivePtr in EnumType 2020-03-06 09:06:38 +01:00
Max Kellermann
7704d52d28 Type: use class IntrusivePtr in FileType 2020-03-06 09:06:38 +01:00
Max Kellermann
43af5f8349 Type: use class IntrusivePtr in TypeDecl 2020-03-06 09:06:38 +01:00
Max Kellermann
838bba5206 Type: make TypeDecl final and the dtor non-virtual
Nobody derives from this class.
2020-03-06 09:06:38 +01:00