Commit graph

10010 commits

Author SHA1 Message Date
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
Max Kellermann
dd74df9c5e Type: use class IntrusivePtr in TypeType 2020-03-06 09:06:38 +01:00
Max Kellermann
184fb9a980 Type: use class IntrusivePtr in FuncType 2020-03-06 09:06:38 +01:00
Max Kellermann
73cea5dcad Type: use class IntrusivePtr in TypeList 2020-03-06 09:06:38 +01:00
Max Kellermann
de0289125b Type: use class IntrusivePtr in IndexType 2020-03-06 09:06:38 +01:00
Max Kellermann
674e141a15 Val: use class IntrusivePtr in class TableVal 2020-03-06 09:06:38 +01:00
Max Kellermann
93c2064b9a Val: use class IntrusivePtr in class TableEntryVal 2020-03-06 09:06:38 +01:00
Max Kellermann
7924e948b9 CompHash: return IntrusivePtr 2020-03-06 09:06:38 +01:00
Max Kellermann
ba35ebec4c Type: return IntrusivePtr 2020-03-06 09:06:38 +01:00
Max Kellermann
0a6ddfb6b5 Val: add TableVal::Assign() overload with IntrusivePtr
Prepare the transition to IntrusivePtr for various callers.
2020-03-06 09:06:38 +01:00
Max Kellermann
78712d009f zeekygen/IdentifierInfo: use class IntrusivePtr more
With this in place, we can eliminate the manually imeplemented copy
constructor/operator.
2020-03-06 09:06:37 +01:00
Max Kellermann
a0c831a1bd Func: use class IntrusivePtr 2020-03-06 09:06:37 +01:00
Max Kellermann
b18573c804 Expr: add missing include for IntrusivePtr<Val>
Fixes build failure with clang.
2020-03-06 09:06:37 +01:00
Max Kellermann
df7a47510a Expr: reference id_list before passing to new BroFunc
Passing the `id_list` pointer to `BroFunc` transfers ownership of the
contained `ID` instances, because `~BroFunc()` unreferences them.
Therefore, we need to increase the reference counters for each
`BroFunc` instance to fix the use-after-free bug.

Closes https://github.com/zeek/zeek/issues/845
2020-03-06 09:06:37 +01:00
Max Kellermann
4d39f53ab2 input/Manager: fix three use-after-free bugs
The code comment said "ref'd by lookupwithdefault", but the `fields`
variable was not referenced; only `fields_val` was, and its reference
was released earlier.

Same for `idx` and `val` in method CreateTableStream().

Fixes a regression from commit d81bfed45d
2020-03-06 08:58:13 +01:00
Jon Siwek
2286865674 Updating submodule(s).
[nomail]
2020-03-05 19:55:28 -08:00
Jon Siwek
26265246c1 Move libkqueue submodule to the aux directory 2020-03-05 19:40:03 -08:00
Jon Siwek
ba9c06fc2b Move rapidjson submodule to aux directory
This also now installs the full rapidjson include/ tree in order to
allow external plugins to properly build if they include
threading/formatters/JSON.h
2020-03-05 19:24:13 -08:00
Jon Siwek
9a8fa25002 Updating submodule(s).
[nomail]
2020-03-05 16:43:08 -08:00
Jon Siwek
363fc49518 Fix a btest to order zeek_init() events via &priority 2020-03-05 14:19:34 -08:00
Vlad Grigorescu
5a1a9ba98e Add support to MySQL for deprecation of EOF packets.
From the docs: "As of MySQL 5.7.5, OK packes are also used to indicate
EOF, and EOF packets are deprecated."

The client sets a capability flag (CLIENT_DEPRECATE_EOF) to indicate
that it expects an OK instead of an EOF after the resultset rows.
2020-03-05 12:18:31 -06:00
Vlad Grigorescu
c38e1fa91a Whitespace cleanup & fixes
[nomail]
2020-03-05 11:50:41 -06:00