Commit graph

1952 commits

Author SHA1 Message Date
Robin Sommer
776250fd8c Merge remote-tracking branch 'origin/topic/jsiwek/gh-928-realpath-load-dedup'
* origin/topic/jsiwek/gh-928-realpath-load-dedup:
  GH-928: use realpath() instead of inode to de-duplicate scripts
2020-07-08 15:40:24 +00:00
Jon Siwek
7b15b82009 Merge remote-tracking branch 'origin/topic/timw/1040-str-split'
* origin/topic/timw/1040-str-split:
  GH-1040: Add zero-indexed version of str_split
2020-07-06 21:06:51 -07:00
Jon Siwek
09483619ef Merge remote-tracking branch 'origin/topic/timw/1041-compress-path'
* origin/topic/timw/1041-compress-path:
  GH-1041: Move compress_path to a bif that uses normalize_path
2020-07-06 20:41:05 -07:00
Robin Sommer
3d3d5e7eb4 Merge remote-tracking branch 'origin/topic/jsiwek/add-backtrace-bif'
(Added a Doxygen comment.)

* origin/topic/jsiwek/add-backtrace-bif:
  Add backtrace() and print_backtrace()
2020-07-06 14:56:28 +00:00
Jon Siwek
61b52b54ba Fix --enable-mobile-ipv6 build 2020-07-03 14:30:13 -07:00
Jon Siwek
3a59948238 Fix namespace of GetCurrentLocation() to zeek::detail 2020-07-03 14:18:02 -07:00
Jon Siwek
76e67ff239 Merge remote-tracking branch 'origin/topic/timw/266-namespaces-part2'
* origin/topic/timw/266-namespaces-part2:
  Rename BroString files to ZeekString
  Update NEWS entry with note about class renames
  Rename BroObj to Obj
  Rename BroString to zeek::String
  Move Func up to zeek namespace, rename BroFunc to ScriptFunc
  Mark global val_mgr as deprecated and fix uses of it to use namespaced version
  Minor cleanup items from PR review
  Update binpac and bifcl submodules with review changes
  Move Location to zeek::detail and BroObj to zeek
  Move BroString to zeek namespace
  Move Dictionary/PDict, List/PList, and Queue/PQueue to zeek namespace
  Remove typedef that should have been removed in 3.1
  Move Func and associated classes into zeek::detail namespace
  Move Frame and Scope to zeek::detail namespace
  Move all Val classes to the zeek namespaces
  Use type aliases for IntrusivePtr definitions
  Move deprecation macro to zeek-config.h.in to avoid having to over-include util.h
  Move IntrusivePtr and utility methods to the zeek namespace
2020-07-02 19:25:13 -07:00
Tim Wojtulewicz
d1814ea1ff Merge remote-tracking branch 'origin/topic/jsiwek/gh-786-fix-incomplete-casts'
* origin/topic/jsiwek/gh-786-fix-incomplete-casts:
  GH-786: fix Val::As methods casting incomplete types
  GH-786: fix Stmt::As methods casting incomplete types
  GH-786: fix Expr::As methods casting incomplete types
2020-07-02 15:57:40 -07:00
Jon Siwek
0ec2ff20c6 Merge remote-tracking branch 'origin/topic/timw/786-typecasting'
* origin/topic/timw/786-typecasting:
  GH-786: Move Type::As methods to cc file so they have type info for casting safely
2020-07-02 11:38:35 -07:00
Jon Siwek
734af6b6d1 Fix a deprecation warning compiling with GCC 2020-07-01 09:58:18 -07:00
Jon Siwek
4668378d91 Merge remote-tracking branch 'origin/topic/timw/1032-namespaced-enums'
Merge adjustments:
- Added back in deprecation tag for base_type_no_ref()
- Added back the deprecated plugin::hook_name() function

* origin/topic/timw/1032-namespaced-enums:
  Deprecate plugin::HookType and plugin::component::Type in a different way
  Deprecate init_class and IDScope in another way.
  Deprecate TypeTag and friends in a different way
  Deprecate attr_tag in a different way, rename to AttrTag
2020-06-30 16:55:36 -07:00
Jon Siwek
35fa042fd6 Merge remote-tracking branch 'origin/topic/timw/1034-IndexTypes'
Minor tweaks during merge:
- Remove/default superfluous ~Attributes()
- Added in resize() calls to accompany reserve() of associated vectors

* origin/topic/timw/1034-IndexTypes:
  Revert Attributes::Attrs back to return an attr_list and mark it deprecated
  GH-1034: Revert TypeList::Types() back to return a type_list* and mark it deprecated
2020-06-30 15:56:49 -07:00
Johanna Amann
a5a51de3c4 Merge remote-tracking branch 'origin/topic/jsiwek/gh-1036-print-log-network-time'
* origin/topic/jsiwek/gh-1036-print-log-network-time:
  GH-1036: change print.log to log network time instead of current

Fixes GH-1036
2020-06-29 19:25:16 +00:00
Jon Siwek
7e28c16dfc Merge remote-tracking branch 'origin/topic/jazoff/conn-polling-memory'
* origin/topic/jazoff/conn-polling-memory:
  reduce memory usage of ConnPolling
2020-06-29 10:25:26 -07:00
Johanna Amann
eb1a408b6a Merge remote-tracking branch 'origin/topic/jsiwek/improve-command-line-option-redefs'
* origin/topic/jsiwek/improve-command-line-option-redefs:
  Integrate review feedback: improve command-line option redef parsing
  Fix several issues with command-line option redefs
2020-06-26 16:27:42 +00:00
Jon Siwek
00a4865885 Merge branch 'dns-original-query-case' of https://github.com/rvictory/zeek
Changes during merge
- Changed the policy script to use an event handler that behaves
  for like the base script: &priority=5, msg$opcode != early-out,
  no record field existence checks
- Also extended dns_query_reply event with original_query param
- Removed ExtractName overload, and just use default param

* 'dns-original-query-case' of https://github.com/rvictory/zeek:
  Fixed some places where tabs became spaces
  Stricter checking if we have a dns field on the connection being processed
  Modified the DNS protocol analyzer to add a new parameter to the dns_request event which includes the DNS query in its original case. Added a policy script that will add the original_case to the dns.log file as well. Created new btests to test both.
2020-06-26 00:07:02 -07:00
Jon Siwek
94ba6303f3 Merge remote-tracking branch 'origin/topic/johanna/make-tables-slightly-smaller'
* origin/topic/johanna/make-tables-slightly-smaller:
  Remove last_access_time from TableEntryVal.
2020-06-19 13:34:07 -07:00
Johanna Amann
7ae5589469 Merge branch 'better_musl_support' of https://github.com/abenson/zeek
* 'better_musl_support' of https://github.com/abenson/zeek:
  cmake: Make musl support more distro agnostic
2020-06-18 20:42:33 +00:00
Johanna Amann
af2110cfc9 Merge remote-tracking branch 'origin/topic/jsiwek/reduce-ftp-cluster-msg-sizes'
* origin/topic/jsiwek/reduce-ftp-cluster-msg-sizes:
  Minimize data published for expected FTP data channel analysis
2020-06-18 20:07:26 +00:00
Jon Siwek
8d9e85b842 Fix location where CI places build.tgz 2020-06-15 11:04:50 -07:00
Jon Siwek
ebac462895 Merge remote-tracking branch 'origin/topic/timw/ci-benchmark'
* origin/topic/timw/ci-benchmark:
  Review cleanup
  Add new CI task for running benchmarks on a remote host
2020-06-15 10:28:14 -07:00
Jon Siwek
6cec268e43 Merge remote-tracking branch 'origin/topic/jsiwek/gh-977-improve-pcap-error-handling'
* origin/topic/jsiwek/gh-977-improve-pcap-error-handling:
  Compare pcap_next_ex() result to PCAP_ERROR/PCAP_ERROR_BREAK
  GH-977: Improve pcap error handling
  Remove not-useful code in iosource::Manager::OpenPktSrc
2020-06-11 23:22:19 -07:00
Jon Siwek
d4f3cad7d1 Merge remote-tracking branch 'origin/topic/timw/266-namespaces'
Merge adjustments:

- Preserved original `base_type_no_ref` argument type as ::TypeTag
- Removed superfluous #pragma guard around deprecated TableVal ctor
- Clarify NEWS regarding MetaHook{Pre,Post} deprecations
- Simplify some `::zeek::` qualifications to just `zeek::`
- Prefixed FORWARD_DECLARE_NAMESPACED macro with ZEEK_

* origin/topic/timw/266-namespaces:
  Disable some deprecation diagnostics for GCC
  Rename BroType to Type
  Update NEWS
  Review cleanup
  Move Type types to zeek namespace
  Move Flare/Pipe from the bro namespace to zeek::detail
  Move Attr to the zeek::detail namespace
  Move Trigger into the zeek::detail namespace
  Move ID to the zeek::detail namespace
  Move Anon.h into zeek::detail namespace
  Mark all of the aliased classes in plugin/Plugin.h deprecated, and fix all of the plugins that were using them
  Move all of the base plugin classes into the zeek::plugin namespace
  Expr: move all classes into zeek::detail
  Stmt: move Stmt classes into zeek::detail namespace
  Add utility macro for creating namespaced aliases for classes
2020-06-11 23:20:51 -07:00
Jon Siwek
0bc1d73c84 Optimize Connection::RemovalEvent() for bare-mode usage
It was creating RecordVals even if they wouldn't be used by any event
handler and that situation is common/expected for `zeek -b` mode.
Normally, there's at least the tunnel scripts with a `new_connection`
handler causing the connection RecordVals to be built.
2020-06-10 16:38:39 -07:00
Jon Siwek
e924370876 Restrict Cirrus CI to only zeek repo's branches 2020-06-09 15:19:29 -07:00
Jon Siwek
3255930738 Merge remote-tracking branch
* Prevent IP fragment reassembly on packets without minimal IP header
2020-06-09 09:46:46 -07:00
Johanna Amann
c4ebd7640d Merge remote-tracking branch 'origin/topic/jsiwek/gh-999-dhcp-client-id-hw0'
* origin/topic/jsiwek/gh-999-dhcp-client-id-hw0:
  GH-999: Stop formatting DHCP Client ID Hardware Type 0 as MAC

Fixes GH-999
2020-06-08 22:32:01 +00:00
Jon Siwek
02476453bc Merge remote-tracking branch 'origin/topic/jsiwek/fix-coverity-build'
* origin/topic/jsiwek/fix-coverity-build:
  Remove inline from some static KeyedHash members
  Improve Func.h inclusion
2020-06-08 11:23:24 -07:00
Jon Siwek
ef6bd3ee39 Fix use-after-move of proc_status_file breaking -U flag 2020-06-04 15:13:10 -07:00
Tim Wojtulewicz
b4aa5d9456 Merge remote-tracking branch 'origin/topic/jsiwek/gh-973-fix-topk-get-top-return-type'
* origin/topic/jsiwek/gh-973-fix-topk-get-top-return-type:
  GH-973: Fix the return type of topk_get_top()
2020-06-03 13:29:31 -07:00
Tim Wojtulewicz
640ad2d010 Merge remote-tracking branch 'origin/topic/jsiwek/double-val-subclasses'
* origin/topic/jsiwek/double-val-subclasses:
  Deprecate Val(double, TypeTag) ctor, add TimeVal/DoubleVal subclasses
2020-06-03 13:20:04 -07:00
Jon Siwek
a431f6b45d Merge remote-tracking branch 'origin/topic/jsiwek/gh-985-double-to-interval-descs'
* origin/topic/jsiwek/gh-985-double-to-interval-descs:
  GH-985: Fix descriptions of double_to_interval() return values
2020-06-02 18:14:20 -07:00
Jon Siwek
7b0931058e Decrease number of CPUs/memory for Cirrus CI tasks
New concurrency limits are 16 Linux CPUs per user rather than 8 Linux
Tasks per user (at a max of 8 CPUs per Task, they essentially allowed 64
CPUs per user before the change in policy).
2020-06-02 12:40:26 -07:00
Jon Siwek
e1f35c46f9 Change CI script to compile from build/Makefile
Helps some `make` versions properly use the `-j` option
2020-06-02 10:56:48 -07:00
Jon Siwek
1a60fb7c0d Add missing include in util.cc 2020-06-01 20:45:37 -07:00
Jon Siwek
34a1875e74 Merge remote-tracking branch 'origin/topic/timw/reduce-func-inclusion'
- Minor tweaks to some odd includes during merge

* origin/topic/timw/reduce-func-inclusion:
  Remove Analyzer.h from bro-bif.h
  Remove IPAddr.h from Reporter.h
  Remove the inclusion of Func.h from NetVar.h, which reduces the inclusion of Func.h overall.
2020-06-01 19:26:55 -07:00
Tim Wojtulewicz
503ef26a17 Merge remote-tracking branch 'origin/topic/jsiwek/gh-893-intrusive-ptr-migration'
* origin/topic/jsiwek/gh-893-intrusive-ptr-migration: (151 commits)
  Integrate review feedback
  Switch Broker Val converter visitor to return IntrusivePtr
  Change BroFunc ctor to take const-ref IntrusivePtr<ID>
  Add version of Frame::SetElement() taking IntrusivePtr<ID>
  Change Scope/Func inits from id_list* to vector<IntrusivePtr<ID>>
  Change Scope::GenerateTemporary() to return IntrusivePtr
  Deprecate Scope::ReturnType(), replace with GetReturnType()
  Deprecate Scope::ScopeID(), replace with GetID()
  Switch parsing to use vector<IntrusivePtr<Attr>> from attr_list
  Deprecate TableVal::FindAttr(), replace with GetAttr()
  Deprecate TypeDecl::FindAttr(), replace with GetAttr()
  Deprecate ID::FindAttr(), replace with GetAttr()
  Deprecate Attributes::FindAttr(), replace with Find()
  Deprecate Attributes::AddAttrs(Attributes*)
  Add Attributes ctor that takes IntrusivePtrs
  Change Attributes to store std:vector<IntrusivePtr<Attr>>
  Change Attr::SetAttrExpr() to non-template
  Deprecate Attr::AttrExpr(), replace with GetExpr()
  Deprecate ID::Attrs(), replace with GetAttrs()
  Remove weak_ref param from ID::SetVal()
  ...
2020-06-01 10:58:02 -07:00
Jon Siwek
2f918ed9b2 Merge branch 'topic/dopheide/known-services' of https://github.com/dopheide-esnet/zeek
- Updated the logic significantly: still filters out ICMP from being
  considered an active service (like before) and adds a new
  "Known::service_udp_requires_response" option (defaults to true) for
  whether to require UDP server response before being considered an
  active service.

* 'topic/dopheide/known-services' of https://github.com/dopheide-esnet/zeek:
  Log services with unknown protocols
2020-05-29 17:19:47 -07:00
Jon Siwek
138c9402c3 Update NEWS 2020-05-28 14:51:08 -07:00
Johanna Amann
433e1154da Merge branch 'add_bzar_dce_rpc_consts' of https://github.com/ct-square/zeek
* 'add_bzar_dce_rpc_consts' of https://github.com/ct-square/zeek:
  Remove dupplicate DCE-RPC endpoint
  Add DCE-RPC constants from BZAR project

Closes GH-953
2020-05-26 22:04:33 +00:00
Jon Siwek
c171af47f5 GH-979: Update libkqueue to fix use on CentOS 6 2020-05-26 11:07:40 -07:00
Tim Wojtulewicz
94ef9f4542 Merge remote-tracking branch 'origin/topic/jsiwek/gh-983-broker-opaque-missing-type'
* origin/topic/jsiwek/gh-983-broker-opaque-missing-type:
  GH-983: Fix opaque Broker types lacking a Type after (de)serialization
2020-05-21 13:05:57 -07:00
Tim Wojtulewicz
9283b1c2b2 Merge remote-tracking branch 'origin/topic/johanna/threading-allow-SendEvent-from-stuff-that-is-not-an-input-reader-because-it-turns-out-that-it-is-actually-kind-of-convenient-to-call-this-from-other-things-like-for-example-from-logging-writers'
* origin/topic/johanna/threading-allow-SendEvent-from-stuff-that-is-not-an-input-reader-because-it-turns-out-that-it-is-actually-kind-of-convenient-to-call-this-from-other-things-like-for-example-from-logging-writers:
  Make SendEvent callable from all threads
2020-05-21 13:04:44 -07:00
Jon Siwek
05f829c727 Merge remote-tracking branch 'origin/topic/jazoff/fuzz-size-limit-speedup'
- Factored check into more descriptive function: ExceedsChunkLimit()

* origin/topic/jazoff/fuzz-size-limit-speedup:
  Speed up ChunkCount validity check
2020-05-21 11:43:34 -07:00
Jon Siwek
7d98d816d8 Disable output of Reporter messages to stderr in fuzz targets 2020-05-20 11:20:59 -07:00
Jon Siwek
6d0599c537 Improve standalone fuzz driver timing output 2020-05-20 10:57:18 -07:00
Jon Siwek
c372d53d77 Merge remote-tracking branch 'origin/topic/neverlord/caf-0.18'
* origin/topic/neverlord/caf-0.18:
  Upgrade to latest Broker changes for CAF 0.18
2020-05-19 10:50:58 -07:00
Jon Siwek
2bac702a72 Merge remote-tracking branch 'origin/topic/jazoff/packet-fuzzer'
* origin/topic/jazoff/packet-fuzzer:
  Update src/fuzzers/packet-fuzzer.cc
  Update src/fuzzers/packet-fuzzer.cc
  add initial packet corpus
  add packet fuzzer
2020-05-18 10:48:22 -07:00
Johanna Amann
781c3e5914 Merge branch 'replace-bzero' of https://github.com/brimsec/zeek
* 'replace-bzero' of https://github.com/brimsec/zeek:
  Replace bzero() with memset()
2020-05-15 19:48:47 +00:00
Johanna Amann
2aeb3d8e39 Merge remote-tracking branch 'origin/topic/timw/906-find-all-urls-regex'
* origin/topic/timw/906-find-all-urls-regex:
  Restore previous url scheme capture group
  GH-906: Fix the regex in url.zeek to better match for find_all_urls
2020-05-13 15:05:54 -07:00