zeek/scripts/base/frameworks
Johanna Amann c72c1cba6f DPD: change handling of pre-confirmation violations, remove max_violations
This commit revamps the handling of analyzer violations that happen
before an analyzer confirms the protocol.

The current state is that an analyzer is disabled after 5 violations, if
it has not been confirmed. If it has been confirmed, it is disabled
after a single violation.

The reason for this is a historic mistake. In Zeek up to versions 1.5,
analyzers were unconditianally removed when they raised the first
protocol violation.

When this script was ported to the new layout for Zeek 2.0 in
b4b990cfb5, a logic error was introduced
that caused analyzers to no longer be disabled if they were not
confirmed.

This was the state for ~8 years, till the DPD::max_violations options
was added, which instates the current approach of disabling unconfirmed
analyzers after 5 violations. Sadly, there is not much discussion about
this change - from my hazy memory, I think this was discovered during
performance tests and the new behavior was added without checking into
the history of previous changes.

This commit reinstates the originally intended behavior of DPD. When an
analyzer that has not been confirmed raises a protocol violation, it is
immediately removed from the connection. This also makes a lot of sense
- this allows the analyzer to be in a "tasting" phase at the beginning
of the connection, and to error out quickly once it realizes that it was
attached to a connection not containing the desired protocol.

This change also removes the DPD::max_violations option, as it no longer
serves any purpose after this change. (In practice, the option remains
with an &deprecated warning, but it is no longer used for anything).

There are relatively minimal test-baseline changes due to this; they are
mostly triggered by the removal of the data structure and by less
analyzer errors being thrown, as unconfirmed analyzers are disabled
after the first error.
2025-01-30 16:59:44 +00:00
..
analyzer DPD: change handling of pre-confirmation violations, remove max_violations 2025-01-30 16:59:44 +00:00
broker Support re-peering with Broker peers that fall behind 2024-12-06 15:18:05 -08:00
cluster Merge remote-tracking branch 'origin/topic/awelzel/fix-cluster-publish-any' 2024-12-12 13:17:08 -07:00
config config: Move to Cluster::publish() 2024-12-12 17:54:42 +01:00
control annotate base scripts with &is_used as needed 2022-05-26 17:39:17 -07:00
files Move python signatures to a separate file 2024-12-09 11:08:30 -07:00
input More bro-to-zeek renaming in scripts and other files 2019-05-16 02:36:41 -05:00
intel intel: Move to Cluster::publish() 2024-12-12 17:54:42 +01:00
logging Fix incorrect uses of zeek:see 2025-01-01 15:35:59 +01:00
netcontrol netcontrol: Move to Cluster::publish() 2024-12-12 17:54:42 +01:00
notice notice: Move to Cluster::publish() 2024-12-12 17:54:42 +01:00
openflow openflow: Move to Cluster::publish() 2024-12-12 17:54:42 +01:00
packet-filter Add PacketFilter::remove_exclude function 2024-04-17 21:25:35 +00:00
reporter Support for log filter policy hooks 2020-09-30 12:32:45 -07:00
signatures allow signature actions to be dynamically updated 2023-07-13 17:25:32 -07:00
software frameworks/software: Fix stale value used for stripping 2023-11-17 14:37:28 +01:00
spicy Spicy: Register well-known ports through an event handler. 2024-08-22 10:24:55 +02:00
sumstats sumstats: Move to Cluster::publish() 2024-12-12 17:54:42 +01:00
supervisor Management framework: add metrics port in management & Supervisor node records 2024-07-08 23:05:24 -07:00
telemetry Merge branch 'topic/christian/telemetry-make-bifs-primary' 2024-10-24 07:09:16 -07:00
tunnels Add GTPv1 packet analyzer, disable old analyzer 2021-11-23 19:36:50 -07:00