Commit graph

16055 commits

Author SHA1 Message Date
Robin Sommer
2e58d6a1a9 Merge remote-tracking branch 'origin/topic/awelzel/2422-exclude-empty-dirs'
* origin/topic/awelzel/2422-exclude-empty-dirs:
  cmake: Exclude empty directories due to headers install
2022-09-27 13:33:02 +02:00
Robin Sommer
5e5a309b5f Merge remote-tracking branch 'origin/topic/awelzel/vxlan-per-packet-analyzer-confirmation'
* origin/topic/awelzel/vxlan-per-packet-analyzer-confirmation:
  packet_analysis: Do not raise analyzer_confirmation per-packet for tunnels
2022-09-27 13:30:47 +02:00
Arne Welzel
3a320fc6b6 packet_analysis: Do not raise analyzer_confirmation per-packet for tunnels
There's a logic error in the packet analyzer's AnalyzerConfirmation()
method that causes analyzer_confirmation() events to be raised for every
packet rather than stopping after the first confirmation which appears to
have been the intention. This affects, for example, VXLAN and Geneve tunnels.

The optional arg_tag parameter was used for short-circuit'ing, but the return
value of GetAnalyzerTag() used for setting the session state causing the
disconnect.

In scenarios where Zeek receives purely tunneled monitoring traffic, this may
result in a non-negligible performance impact.

Somewhat related, ensure the session state is set to violated before
short-circuiting if no analyzer_violations are installed.

Suggesting this as a 5.0.3 candidate.
2022-09-27 12:49:56 +02:00
Arne Welzel
38e226bf75 http: Prevent script errors when http$current_entity is not set
The current_entity tracking in HTTP assumes that client/server never
send HTTP entities at the same time. The attached pcap (generated
artificially) violates this and triggers:

    1663698249.307259 expression error in <...>base/protocols/http/./entities.zeek, line 89: field value missing (HTTP::c$http$current_entity)

For the http-no-crlf test, include weird.log as baseline. Now that weird is
@load'ed from http, it is actually created and seems to make sense
to btest-diff it, too.
2022-09-26 10:18:24 +02:00
Vern Paxson
71d1022269 fix for deprecated when's where the inner frame is larger than the outer frame 2022-09-25 19:55:47 -07:00
Vern Paxson
96668ca0d3 fixes for compiling "standalone" C++ scripts 2022-09-24 14:56:42 -07:00
Arne Welzel
d704b27e81 cmake: Exclude empty directories due to headers install
This followed some pointers from here and opted for explicit exclusion:

https://stackoverflow.com/questions/55451084/cmake-files-matching-pattern-copies-empty-directories

Fixes #2422
2022-09-24 17:01:29 +02:00
Tim Wojtulewicz
19ba30d77a Merge remote-tracking branch 'origin/topic/timw/skip-darwin-builds'
* origin/topic/timw/skip-darwin-builds:
  Skip darwin builds on zeek-security repo
2022-09-23 13:33:27 -07:00
Tim Wojtulewicz
a7070aae9d Skip darwin builds on zeek-security repo 2022-09-23 13:03:46 -07:00
zeek-bot
aa4031ea22 Update doc submodule [nomail] [skip ci] 2022-09-22 00:52:42 +00:00
Tim Wojtulewicz
157a859104 Fix some Coverity issues in the recent ZAM updates 2022-09-21 10:52:29 -07:00
Christian Kreibich
c05d61d6e2 Merge branch 'topic/awelzel/dpd-ditch-service-negation'
* topic/awelzel/dpd-ditch-service-negation:
  scripts/conn: Open-code determine_service()
  Make connection$service_violation a set[string]
  strings: Implement join_string_set() as bif
  dpd: Replace negated service fmt() magic with dedicated field
2022-09-20 21:11:23 -07:00
zeek-bot
fdf8bf8bac Update doc submodule [nomail] [skip ci] 2022-09-21 00:50:27 +00:00
Arne Welzel
660172013b scripts/conn: Open-code determine_service()
...and avoid doing it as suggested by Justin to avoid the extra over-head
in scan scenarios where c$service is empty.
2022-09-20 23:07:26 +02:00
Arne Welzel
7ed6cbeee5 Make connection$service_violation a set[string]
To stay consistent with connection$service.
2022-09-20 23:07:26 +02:00
Arne Welzel
0e28a7faf5 strings: Implement join_string_set() as bif
Haven't measured speed, but this is probably faster than
the cat() and string invocations.
2022-09-20 23:07:26 +02:00
Arne Welzel
31aeb58e10 dpd: Replace negated service fmt() magic with dedicated field
...the only known cases where the `-` for `connection$service` was
handled is to skip/ignore these analyzers.

Slight suspicion that join_string_set() should maybe become a bif
now determine_service() runs once for each connection.

Closes #2388
2022-09-20 23:07:26 +02:00
Tim Wojtulewicz
20226f084b Merge remote-tracking branch 'origin/topic/timw/2387-cleanup'
* origin/topic/timw/2387-cleanup:
  Dict: Mark iterator move operator/constructors as noexcept
  Remove unused headers from Dict.cc
  Dict: Reduce some math required in repeatedly-called functions
  Dict: use std::log2, remove custom Log2 method
2022-09-20 13:05:07 -07:00
Tim Wojtulewicz
f2ae1da764 Dict: Mark iterator move operator/constructors as noexcept 2022-09-20 13:04:19 -07:00
Tim Wojtulewicz
02cc4fd1b8 Remove unused headers from Dict.cc 2022-09-20 13:04:04 -07:00
Tim Wojtulewicz
1befb9ba6f Dict: Reduce some math required in repeatedly-called functions 2022-09-20 13:04:04 -07:00
Tim Wojtulewicz
25a280d6a1 Dict: use std::log2, remove custom Log2 method 2022-09-20 13:03:50 -07:00
Tim Wojtulewicz
7e65b285ea Fix some typos in the 5.1.0 NEWS 2022-09-20 13:01:40 -07:00
Tim Wojtulewicz
2b60f63123 Start of 5.2.0 development 2022-09-20 09:23:50 -07:00
Tim Wojtulewicz
b3c2988c90 Update broker submodule 2022-09-20 09:02:50 -07:00
Christian Kreibich
d20ffb100c Merge branch 'topic/amazingpp/2384-record-deprecation' of github.com:/AmazingPP/zeek
* 'topic/amazingpp/2384-record-deprecation' of github.com:/AmazingPP/zeek:
  Replace all the Warning() calls after IsFieldDeprecated() over to Warn()
  Fix deprecation not flagged and incorrect line number in record
2022-09-19 18:15:39 -07:00
Tim Wojtulewicz
a32609a5b2 Updating submodule(s) [nomail] 2022-09-19 18:01:33 -07:00
Tim Wojtulewicz
f02475d01a Update broker submodule 2022-09-19 16:35:42 -07:00
Tim Wojtulewicz
94a315ad97 Update NEWS for 5.1.0 [nomail] [skip ci] 2022-09-19 16:34:56 -07:00
Tim Wojtulewicz
7d3a8edb9c Update docs submodule [nomail] [skip ci] 2022-09-19 15:40:56 -07:00
Tim Wojtulewicz
f04f070d9f Merge remote-tracking branch 'origin/topic/vern/cpp-maint-Sep22'
* origin/topic/vern/cpp-maint-Sep22:
  oof more manual fixups
  undo inadvertently committed tweak to test
  update for btest only run in some environments
  btest tweaks for recent changes
  updates to notes for compile-to-C++ maintenance
  newly-created btest files
  baseline updates for -a cpp alternative (compile-to-C++)
  tweak btest so it's recognized as a candidate for C++ compilation testing
  split basic "int" btests into main part versus now-separate overflow part
  fix deprecated "local" scoping in test scripts
  annotated scripts to skip when testing compilation-to-C++
  C++ script generation fix for lambdas that have identical bodies
  fix for C++ scripts that refer to "opaque" types
  C++ compilation support for 2-valued vector "for" loops
  C++ compilation support for RE /s operator
  run-time checking of vector operations for overflows and division-by-zero
  error propagation fix to avoid a crash
2022-09-19 13:51:41 -07:00
Tim Wojtulewicz
ee4a232c25 Merge remote-tracking branch 'origin/topic/vern/ZAM-maint-Aug22.final'
* origin/topic/vern/ZAM-maint-Aug22.final:
  updates to ZAM btest baselines
  specialized ZAM operators for speeding up cat() operations
  ZAM support for two-valued "for" loops over vectors
  make it non-fatal for optimized scripts to encounter an empty "for" body
  script optimization fix for new-style table constructors
2022-09-19 13:44:23 -07:00
Tim Wojtulewicz
95e758e012 Add better length check to BuildOptionsVal() 2022-09-19 12:41:42 -07:00
Arne Welzel
4c00c3c4ca smb: Unify transaction_data_to_val() usage
the data/string handling in smb1-com-transaction.pcac was improved
with c75519ca88, re-use the added
functionality also for smb1-com-transaction-secondary.pac to avoid
buffer overflows.
2022-09-19 12:41:28 -07:00
Tim Wojtulewicz
56f9110eca Add some additional checks for caplen in ICMP analyzer 2022-09-19 12:41:27 -07:00
Arne Welzel
6b6bd7e9f6 irc: Check parts.size() before removing the nick
...also, don't remove the nick twice.
2022-09-19 12:41:24 -07:00
Tim Wojtulewicz
ef81116278 Check IP payload length before casting to transport structure 2022-09-19 12:38:06 -07:00
Vern Paxson
2dfaa00c61 oof more manual fixups 2022-09-16 18:45:46 -07:00
Vern Paxson
bf0a74264a undo inadvertently committed tweak to test 2022-09-16 18:44:09 -07:00
Vern Paxson
3c0b07d149 update for btest only run in some environments 2022-09-16 18:43:05 -07:00
Vern Paxson
9d24e9f71a btest tweaks for recent changes 2022-09-16 17:04:06 -07:00
Vern Paxson
eec733beae updates to notes for compile-to-C++ maintenance 2022-09-16 16:53:42 -07:00
Vern Paxson
914caf2f88 newly-created btest files 2022-09-16 16:53:31 -07:00
Vern Paxson
d7adf81859 baseline updates for -a cpp alternative (compile-to-C++) 2022-09-16 16:51:45 -07:00
Vern Paxson
b6b4503dd7 tweak btest so it's recognized as a candidate for C++ compilation testing 2022-09-16 16:49:55 -07:00
Vern Paxson
fd5fa528ca split basic "int" btests into main part versus now-separate overflow part 2022-09-16 16:49:22 -07:00
Vern Paxson
510f83c889 fix deprecated "local" scoping in test scripts 2022-09-16 16:48:19 -07:00
Vern Paxson
ce5d840800 annotated scripts to skip when testing compilation-to-C++ 2022-09-16 16:47:43 -07:00
Vern Paxson
dbae112bdc C++ script generation fix for lambdas that have identical bodies 2022-09-16 16:46:35 -07:00
Vern Paxson
7210225bba fix for C++ scripts that refer to "opaque" types 2022-09-16 16:45:37 -07:00