Commit graph

9059 commits

Author SHA1 Message Date
Jon Siwek
47235b57a6 Merge remote-tracking branch 'origin/topic/timw/deprecate-int-types'
* origin/topic/timw/deprecate-int-types:
  Deprecate the internal int/uint types in favor of the cstdint types they were based on

Merge adjustments:
  * A bpf type mistakenly got replaced (inside an unlikely #ifdef)
  * Did a few substitutions that got missed (likely due to
    pre-processing out of DEBUG macros)
2019-08-14 15:49:24 -07:00
Jon Siwek
03c50fe520 Change file_analysis::Manager::ignored to use std::set 2019-08-14 13:48:39 -07:00
Jon Siwek
814d0ea969 Updating submodule(s).
[nomail]
2019-08-14 13:26:39 -07:00
Jon Siwek
396c1cb066 Update documentation for string_to_pattern BIF 2019-08-14 13:22:02 -07:00
Jon Siwek
6a3e53547c Updating submodule(s).
[nomail]
2019-08-14 10:18:34 -07:00
Jon Siwek
94c380297e Merge remote-tracking branch 'origin/topic/timw/easy-pdict-replacements'
* origin/topic/timw/easy-pdict-replacements:
  Cleanups related to PDict -> std::map replacements
  Remove other simple uses of PDict
  Protocols: Remove uses of PDict
  g_dbgfilemaps: Remove uses of PDict
  Scope: remove uses of PDict
  DFA: remove uses of PDict
  EventRegistry: remove uses of PDict
2019-08-13 20:16:02 -07:00
Jon Siwek
87f85ecca1 Cleanups related to PDict -> std::map replacements 2019-08-13 19:57:42 -07:00
Tim Wojtulewicz
e6558d1f19 Remove other simple uses of PDict 2019-08-13 19:57:42 -07:00
Tim Wojtulewicz
8beb710a5e Protocols: Remove uses of PDict 2019-08-13 19:57:42 -07:00
Tim Wojtulewicz
d0e8af9343 g_dbgfilemaps: Remove uses of PDict 2019-08-13 19:57:42 -07:00
Tim Wojtulewicz
a3deb0446c Scope: remove uses of PDict 2019-08-13 19:57:42 -07:00
Robin Sommer
00987c4411 Merge remote-tracking branch 'origin/topic/timw/clang-tidy'
* origin/topic/timw/clang-tidy:
  Change over to whitelisting clang-tidy options instead of blacklisting
  Use FindClangTidy in the cmake submodule to make things easier
2019-08-13 23:45:16 +00:00
Robin Sommer
4ee9276e3a Updating submodule(s).
[nomail]
2019-08-13 23:41:55 +00:00
Robin Sommer
ecd6139d09 Merge remote-tracking branch 'origin/topic/jsiwek/replace-pcap-lookupdev'
* origin/topic/jsiwek/replace-pcap-lookupdev:
  Replace use of deprecated pcap_lookupdev()
2019-08-13 23:02:43 +00:00
Robin Sommer
8167320bb7 Merge remote-tracking branch 'origin/topic/jsiwek/fatal-error-exit-behavior'
* origin/topic/jsiwek/fatal-error-exit-behavior:
  Use _exit() in Reporter::FatalError
2019-08-13 22:40:06 +00:00
Robin Sommer
59c306905c Merge remote-tracking branch 'origin/topic/jsiwek/gh-533-libdir'
* origin/topic/jsiwek/gh-533-libdir:
  GH-533: use consistent "lib" install dir
2019-08-13 22:39:13 +00:00
Jon Siwek
9ccf3549fd Merge remote-tracking branch 'origin/topic/timw/360-log-gzip'
* origin/topic/timw/360-log-gzip:
  Add new LogAscii::gzip_file_extension option.

Adjusted documentation during merge.
2019-08-13 13:49:45 -07:00
Jon Siwek
6e48bdeb38 Merge remote-tracking branch 'origin/topic/jazoff/memory-reduction-contentline'
* origin/topic/jazoff/memory-reduction-contentline:
  Remove redundant buffering in contentline

Adjusted NVT analyzer during merge for cases where it may have been
assuming the buffer was already resized before DoDeliver().
2019-08-13 12:04:15 -07:00
Jon Siwek
c91b12863e Add tests for {http,mime}_all_headers events
And remove unnecessary check for mime_all_headers in HTTP entities
(they ony raise the http_all_headers event, never mime_all_headers).
2019-08-13 11:28:00 -07:00
Jon Siwek
bc06768a67 Updating submodule(s).
[nomail]
2019-08-13 11:06:29 -07:00
Jon Siwek
7fc664b545 Merge remote-tracking branch 'origin/topic/jazoff/memory-reduction-mime'
* origin/topic/jazoff/memory-reduction-mime:
  Avoid buffering all http headers

Adjusted during merge:
  * whitespace
  * logic for HTTP needs to consider whether either mime_all_headers
    or http_all_headers events are being used
2019-08-12 19:34:42 -07:00
Jon Siwek
55fb48d04d GH-533: use consistent "lib" install dir
Previously, some sub-projects, like binpac, use GNUInstallDirs.cmake
to choose the default name of the library install directory while
others hard-code "lib" as the default.  The former may pick "lib64"
on some platforms, so for now, when installing such sub-projects as
part of Zeek, it's overridden to consistently be "lib".
2019-08-12 18:19:27 -07:00
Jon Siwek
41882263db Use _exit() in Reporter::FatalError
Using exit() here may generally not work well since:

* That will result in calling global destructors

* We have global state that we potentially modify at run-time and
  are in the middle of modiying at the time the FatalError occurs.
  E.g. out-of-memory is one situation where it's likely we could
  call the dtor of an object in which operation on it's internal
  state is no longer consistent/safe.
2019-08-12 14:13:46 -07:00
Tim Wojtulewicz
2e6e1aa5a8 Change over to whitelisting clang-tidy options instead of blacklisting 2019-08-12 13:59:17 -07:00
Tim Wojtulewicz
b42e726a8e Use FindClangTidy in the cmake submodule to make things easier 2019-08-12 13:59:17 -07:00
Tim Wojtulewicz
54752ef9a1 Deprecate the internal int/uint types in favor of the cstdint types they were based on 2019-08-12 13:50:07 -07:00
Jon Siwek
31d30bb47e GH-535: fix typo of "C_HESIOD" in DNS::classes
Fixes GH-535
2019-08-12 13:32:28 -07:00
Jon Siwek
18e4976c6c Merge remote-tracking branch 'origin/topic/timw/travis-leaks'
* origin/topic/timw/travis-leaks:
  fixup! Add new distro to Travis CI configuration for running leak tests
  Add new distro to Travis CI configuration for running leak tests
2019-08-12 13:01:55 -07:00
Jon Siwek
a1c5eddb95 GH-532: improve disable_analyzer BIF
- Add an extra "prevent" parameter (default value of false), which
  helps prevent the same analyzer type from being attached in the
  future.  It's useful in situations where you want to disable early
  on, but a DPD signature may still trigger later and re-attach
  the same analyzer.  E.g. when not using this flag, but calling
  disable_analyzer() inside an http_request event, will remove the
  HTTP analyzer that was attached due to well-known-port, but a later
  DPD signature match from upon seeing the HTTP reply will end up
  attaching another HTTP analyzer.  More surprising is that upon
  re-attaching that analyzer, you'll get the same http_request as
  before since the DPD buffer will get replayed into the new analyzer.

- Fixes disable_analyzer() to work when called even earlier, like
  within the protocol_confirmation event.  At that time, the
  Analyzer tree may have not properly added the new analyzer into
  Analyzer::children yet, but rather the temporary waiting list,
  Analyzer::new_children.  Analyzer::RemoveChildAnalyzer previously
  did not inspect the later list.

- Fixes disable_analyzer() when called on an analyzer added to the
  tree via TCP_Analyzer::AddChildPacketAnalyzer.  TCP_Analyzer
  keeps track of such children in its own list,
  TCP_Analyzer::packet_children, which the previous
  Analyzer::RemoveChildAnalyzer implementation didn't inspect.
2019-08-09 20:03:26 -07:00
Tim Wojtulewicz
b9f6992c0e fixup! Add new distro to Travis CI configuration for running leak tests 2019-08-09 11:01:16 -07:00
Jon Siwek
bf9b983f00 Merge branch 'known_services_multiprotocols' of https://github.com/mauropalumbo75/zeek
* 'known_services_multiprotocols' of https://github.com/mauropalumbo75/zeek:
  improve logging with broker store
  drop services starting with -
  remove service from key for Cluster::publish_hrw
  remove check for empty services
  update tests
  order list of services in store key
  remove repeated services in logs if already seen
  add multiprotocol known_services when Known::use_service_store = T
  remove hyphen in front of some services (for example -HTTP, -SSL)   In some cases, there is an hyphen before the protocol name in the field   connection$service. This can cause problems in known_services and   is removed here. It originates probably in some analyzer where it   would be better removed in the future.
  add multiprotocol known_services when Known::use_service_store = F

Changes during merge:
  * whitespace
  * add unit test
2019-08-09 10:47:34 -07:00
Jon Siwek
a68c9f6b71 Merge branch 'empty_services' of https://github.com/mauropalumbo75/zeek
* 'empty_services' of https://github.com/mauropalumbo75/zeek:
  remove empty services and include udp active connections when logging in connection_state_remove
2019-08-09 09:59:50 -07:00
Jon Siwek
acd1be6e7b Merge branch 'export_intel_events' of https://github.com/mauropalumbo75/zeek
* 'export_intel_events' of https://github.com/mauropalumbo75/zeek:
  minor restyle and add comments
  add an empty read_error event to the intel framework (in the export block, so that users can implement further checks with it)
  move event Intel::read_entry to export block

Adjusted whitespace in merge.
2019-08-09 09:36:19 -07:00
Jon Siwek
d726e44e0e Updating CHANGES and VERSION. 2019-08-09 09:15:22 -07:00
Tim Wojtulewicz
80e3c42526 Add new distro to Travis CI configuration for running leak tests 2019-08-08 16:36:17 -07:00
Jon Siwek
ba56cf62a7 Change version to 3.1.0-dev 2019-08-08 16:08:50 -07:00
Jon Siwek
d236f377e7 Add memory leak test of closure (un)serialization 2019-08-07 12:41:22 -07:00
Jon Siwek
662c416ad9 Updating submodule(s).
[nomail]
2019-08-07 10:29:16 -07:00
Jon Siwek
6af1bf18ac Replace use of deprecated pcap_lookupdev()
libpcap 1.9.0 has started deprecating this function in favor
of pcap_findalldevs()
2019-08-07 09:46:41 -07:00
Johanna Amann
51f565d235 Merge remote-tracking branch 'origin/topic/jsiwek/gh-527-coverity-issues'
* origin/topic/jsiwek/gh-527-coverity-issues:
  GH-527: fix parsing of MQTT Remaining Length field
  GH-527: fix LambdaExpr::Traverse
  GH-527: fix ref-counting issues in Frame unserialization
2019-08-07 08:10:29 -07:00
Mauro Palumbo
f93e41fd3f minor restyle and add comments 2019-08-07 10:32:36 +02:00
Jon Siwek
dc5aca6854 GH-527: fix parsing of MQTT Remaining Length field
Packet length is encoded in up to four bytes, with MSB (0x80)
indicating if there's more bytes in the representation still to follow.
The comparison/bitwise-mask wasn't correctly testing the MSB.

Coverity CID 1403964
2019-08-06 14:47:03 -07:00
Jon Siwek
f6f4e3e8bc GH-527: fix LambdaExpr::Traverse
Coverity CID 1403966
2019-08-06 14:47:03 -07:00
Jon Siwek
05bc680d3f GH-527: fix ref-counting issues in Frame unserialization
Coverity CIDs 1403968, 1403967
2019-08-06 14:47:03 -07:00
Johanna Amann
7521fec5b3 Update submodule
[nomail]
2019-08-06 11:49:12 -07:00
Mauro Palumbo
8e418d3c7b add an empty read_error event to the intel framework (in the export block, so that users can implement further checks with it) 2019-08-06 12:20:47 +02:00
Mauro Palumbo
1011abd5e0 move event Intel::read_entry to export block 2019-08-06 11:17:34 +02:00
Johanna Amann
3080290a5e Merge remote-tracking branch 'origin/topic/jsiwek/gh-474-mqtt-option'
* origin/topic/jsiwek/gh-474-mqtt-option:
  GH-474: change MQTT::max_payload_size to be a runtime option

Relates to GH-474
2019-08-05 21:06:50 -07:00
Jon Siwek
cc91ab5d9e Fix malformed SMB documentation 2019-08-05 19:00:43 -07:00
Jon Siwek
1eb1771c25 Fix documentation warnings for MQTT identifiers
I.e. a type was not in the export section, but a field was added
to connection record via a redef that uses the "hidden" type.
That generally doesn't help to hide it that way since a user comes
to rely on it indirectly anyway, and it also causes problems with
the Zeekygen documentation not being able to find it.
2019-08-05 18:55:48 -07:00