Commit graph

12419 commits

Author SHA1 Message Date
Vern Paxson
df3c61120a standalone templator for ZAM operations 2021-09-08 10:23:38 -07:00
Vern Paxson
cffc954905 computing of identifier definition regions 2021-09-08 10:23:38 -07:00
Vern Paxson
16bd121ea0 for parse-only, only do script analysis if looking for usage issues 2021-09-08 10:23:38 -07:00
Vern Paxson
9a9995bdd1 tracking of optimization information associated with identifiers 2021-09-08 10:23:38 -07:00
Vern Paxson
074b18f3e8 tracking of optimization information associated with expressions 2021-09-08 10:23:38 -07:00
Vern Paxson
3ac725f44b tracking of optimization information associated with statements 2021-09-08 10:23:38 -07:00
Vern Paxson
ed3c87d253 simple AST optimization for ?: operator 2021-09-08 10:23:38 -07:00
Vern Paxson
fb101f7b0e track implicit assignments when profiling, associate counts with assignees 2021-09-08 10:23:38 -07:00
Vern Paxson
dbb509448f preparing for a new Stmt subclass for ZAM function bodies 2021-09-08 10:23:38 -07:00
Vern Paxson
51fee244c9 provide ZAM execution with direct access to ZVal elements 2021-09-08 10:23:38 -07:00
Vern Paxson
9f68002392 factoring to support debugging of Dict iterators - no semantic changes 2021-09-08 10:23:38 -07:00
Vern Paxson
b4a44ed663 low-level tidying/nits - no semantic changes 2021-09-08 10:23:38 -07:00
Vern Paxson
4c80bd6782 fix for looping over vectors with holes per https://github.com/zeek/zeek/issues/1763 2021-09-07 10:26:42 -07:00
Vern Paxson
87fce26a0b btest for https://github.com/zeek/zeek/issues/1763 2021-09-07 10:21:50 -07:00
Tim Wojtulewicz
58cb9163d1 Fix mis-usage of string::append that leads to an overflow 2021-09-07 09:16:53 -07:00
Tim Wojtulewicz
404fed6923 Use json_escape_utf8 for all utf8 data in ODesc 2021-09-07 09:16:53 -07:00
Seth Hall
a4ceb98bf8 Switch the TSV Zeek logs to be UTF8 by default.
There is a paired zeek-testing branch for some updates there.
2021-09-07 09:16:53 -07:00
Justin Azoff
3bf8c8ceb6 Optimzie software framework version parsing
Add a small cache in front of the parse method.  This cache should
reduce most of the calls to parse, and ultimately save memory because
redundant versions of the parsed strings will not be created in memory.

Move the parsing itself to the proxies where the caching can be more
efficient.
2021-09-05 13:18:51 -04:00
Tim Wojtulewicz
0746ef7ecc Merge remote-tracking branch 'origin/topic/vlad/analyzer_coverage'
* origin/topic/vlad/analyzer_coverage:
  Add btests for DNS WKS and BINDS
  Add btest for DNS WKS RR.
  Add btest for DNS NSEC3PARAM RR.
2021-09-03 18:12:28 +00:00
Tim Wojtulewicz
a54ffd18f3 Merge remote-tracking branch 'origin/topic/vlad/snmp_asn1_oid_performance'
* origin/topic/vlad/snmp_asn1_oid_performance:
  Code modernization: use ranged-based for loop where possible
  Improve performance of asn1_oid_to_val string conversions.
2021-09-03 18:11:01 +00:00
Tim Wojtulewicz
0b708e3625 Merge remote-tracking branch 'origin/topic/timw/1500-disable-tsan-sqlite'
* origin/topic/timw/1500-disable-tsan-sqlite:
  Disable the scripts.base.frameworks.logging.sqlite.simultaneous-writes test under TSan
  Mark MsgThread::cnt_sent_{in,out} as atomic to avoid a data race
  Disable call to sqlite3_enable_shared_cache under ThreadSanitizer
2021-09-03 18:09:31 +00:00
Tim Wojtulewicz
0369ca01bc Disable the scripts.base.frameworks.logging.sqlite.simultaneous-writes test under TSan
Due to a bug (or intentional code) in SQLite, we disabled enabling the shared cache
in sqlite3 if running under ThreadSanitizer (see cf1fefbe0b0a6163b389cc92b5a6878c7fc95f1f).
Unfortunately, this has the side-effect of breaking the simultaneous-writes test because
the shared cache is disabled. This is hopefully a temporary fix until SQLite fixes the
issue on their side.
2021-09-03 10:38:15 -07:00
Tim Wojtulewicz
4dc20826fd Mark MsgThread::cnt_sent_{in,out} as atomic to avoid a data race 2021-09-03 10:38:15 -07:00
Tim Wojtulewicz
a2ab1b1484 Disable call to sqlite3_enable_shared_cache under ThreadSanitizer
See https://sqlite.org/forum/forumpost/54424d80ee for details.
2021-09-03 10:38:15 -07:00
Tim Wojtulewicz
f1f7ab5870 Merge remote-tracking branch 'origin/topic/timw/1589-ip-regexes'
* origin/topic/timw/1589-ip-regexes:
  GH-1589: Avoid extracting IP-like strings from SMTP headers
2021-09-03 17:36:36 +00:00
Tim Wojtulewicz
569552b320 GH-1589: Avoid extracting IP-like strings from SMTP headers 2021-09-03 17:35:10 +00:00
Christian Kreibich
f8e87d3814 Update doc submodule [nomail] [skip ci] 2021-09-03 09:49:29 -07:00
Christian Kreibich
283cf927ea Merge branch 'topic/christian/external-testsuite-tweaks'
* topic/christian/external-testsuite-tweaks:
  Minor updates to the external-testsuite scripts
2021-09-03 09:45:29 -07:00
Christian Kreibich
b999448e3d Minor updates to the external-testsuite scripts
Delete the unused Baseline folder, remove a Bro-era name from gitignore,
change create-new-repo to work with a second argument that is actually
a URL, and tweak whitespace. Expand description in README and update the
explanation of OPENSSL_ENABLE_MD5_VERIFY in subdir-btest.cfg.
2021-09-01 17:29:40 -07:00
Vlad Grigorescu
418bfe1fab Merge remote-tracking branch 'origin/master' into topic/vlad/analyzer_coverage 2021-09-01 12:01:01 -05:00
Vlad Grigorescu
f9c36f5c37 Add btests for DNS WKS and BINDS 2021-09-01 12:00:50 -05:00
Vlad Grigorescu
6e5e2c8cb3 Merge branch 'master' into topic/vlad/analyzer_coverage 2021-08-31 15:58:42 -05:00
Robin Sommer
6997f83e57 Merge remote-tracking branch 'origin/topic/johanna/gh-1709'
* origin/topic/johanna/gh-1709:
  Fix signed integer overflow in PIA on big sequence number holes
2021-08-31 15:58:48 +02:00
Robin Sommer
1e5161a469 Merge branch 'topic/bbannier/non_debug_-B' of ssh://github.com/bbannier/zeek
* 'topic/bbannier/non_debug_-B' of ssh://github.com/bbannier/zeek:
  Allow `-B` flag in non-Debug builds, but ignore it.
2021-08-31 15:56:29 +02:00
Robin Sommer
4bb59cdaeb Updating CHANGES and VERSION. 2021-08-31 15:54:49 +02:00
Vlad Grigorescu
6082ab23d9 Code modernization: use ranged-based for loop where possible 2021-08-30 18:34:22 -05:00
Vlad Grigorescu
a357c609b0 Improve performance of asn1_oid_to_val string conversions. 2021-08-30 16:42:50 -05:00
Benjamin Bannier
ebe285f591 Allow -B flag in non-Debug builds, but ignore it.
The `-B` flag allows to enable debug streams in Debug builds. We
previously didn't support passing the flag for other builds. With that
whether an invocation of `zeek` executed or not depended on the way zeek
was built.

With this patch we accept and parse the flag when passed in the
invocation, but ignore any requests for actual debug streams in
non-Debug builds (no streams are available). If `-B help` is passed we
emit a message and abort.
2021-08-27 13:52:50 +02:00
Christian Kreibich
fda1b1db68 Merge branch 'topic/christian/ci-support-update'
* topic/christian/ci-support-update:
  CI support refresh
2021-08-26 14:35:28 -07:00
Christian Kreibich
7b60800231 CI support refresh
- Add Debian 11 (Bullseye)
- Drop Ubuntu 16.04

Includes submodule bumps for corresponding updates
2021-08-26 13:32:02 -07:00
Johanna Amann
f6fe613c61 Fix signed integer overflow in PIA on big sequence number holes
This patch fixes a signed integer overflow in PIA. When starting a
connection, and then ack-ing ~0x7FFFFFFF (INT32_MAX) bytes, the integer
holding the size of buffered bytes will overflow.

This change simply switches that count to only count bytes that were
actually seen on the wire. In my opinion, this is actually the desired
beavior here - the size is only used to decide if buffering should be
continued, as well as for the output of some debug messages (which, in
my opinion, so far is wrong if there are TCP holes).

This fixes GH-1709. Please see that ticket for more discussion.
2021-08-26 14:06:12 +01:00
Christian Kreibich
853b49ea48 Merge branch 'topic/christian/warning-fix'
* topic/christian/warning-fix:
  Remove unneccessary >= 0 check in a UTF32 comparison
  Trivial signedness warning fix
2021-08-25 14:23:59 -07:00
Christian Kreibich
66e71c7fd2 Remove unneccessary >= 0 check in a UTF32 comparison
Resolves Coverity CID 1461523.
2021-08-25 14:13:17 -07:00
Christian Kreibich
ddbba17e57 Trivial signedness warning fix 2021-08-25 13:45:19 -07:00
zeek-bot
d75663c4b8 Update doc submodule [nomail] [skip ci] 2021-08-20 00:31:54 +00:00
Christian Kreibich
2bcaa33563 Merge branch 'topic/christian/gh-1731-broker-peers-bug'
* topic/christian/gh-1731-broker-peers-bug:
  Fix addr/string type confusion in Broker::peers()
2021-08-19 15:13:37 -07:00
Christian Kreibich
7d5ca89860 Merge branch 'topic/christian/broker_listen_default'
* topic/christian/broker_listen_default:
  Simplify the supervisor's listen() on default address/port
2021-08-19 15:13:27 -07:00
Tim Wojtulewicz
8d9b06a12e Add template to NEWS for 4.2.0 2021-08-19 09:42:47 -07:00
Tim Wojtulewicz
fe22d7cbb4 Merge remote-tracking branch 'origin/topic/timw/1581-utf8-escaping'
* origin/topic/timw/1581-utf8-escaping:
  Return fully-escaped string if utf8 conversion fails
2021-08-19 09:39:35 -07:00
Tim Wojtulewicz
f442893c98 Return fully-escaped string if utf8 conversion fails
This adds a new function for validating UTF-8 sequences by converting to
UTF-32. This allows us to also check for various blocks of codepointsi
that we consider invalid while checking for valid sequences in general.
2021-08-19 08:56:27 -07:00