mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
ssl: Cap number of alerts parsed from SSL record
Limit the number of events raised from an SSL record with content_type alert (21) to a configurable maximum number (default 10). For TLS 1.3, the limit is set to 1 as specified in the RFC. Add a new weird cases where the limit is exceeded. OSS-Fuzz managed to generate a reproducer that raised ~660k ssl_plaintext and ssl_alert events given ~810kb of input data. This change prevents this with hopefully no negative side-effect in the real-world.
This commit is contained in:
parent
a5b94f04fd
commit
c960d279a2
4 changed files with 46 additions and 1 deletions
|
@ -4490,6 +4490,11 @@ const SSL::dtls_max_version_errors = 10 &redef;
|
|||
## Maximum number of invalid version errors to report in one DTLS connection.
|
||||
const SSL::dtls_max_reported_version_errors = 1 &redef;
|
||||
|
||||
## Maximum number of Alert messages parsed from an SSL record with
|
||||
## content_type alert (21). The remaining alerts are discarded. For
|
||||
## TLS 1.3 connections, this is implicitly 1 as defined by RFC 8446.
|
||||
const SSL::max_alerts_per_record = 10 &redef;
|
||||
|
||||
}
|
||||
|
||||
module GLOBAL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue