zeek/scripts
Arne Welzel 5659cf18f8 MIME: Cap nested MIME analysis depth to 100
OSS-Fuzz managed to produce a MIME multipart message construction with
thousands of nested entities (or that's what Zeek makes out of it anyhow).
Prevent such deep analysis by capping at a nesting depth of 100,
preventing unnecessary resource usage. A new weird named exceeded_mime_max_depth
is reported when this limit is reached.

This change reduces the runtime of the OSS-Fuzz reproducer from ~45 seconds
to ~2.5 seconds.

The test PCAP was produced from a Python script using the email package
and sending the rendered version via POST to a HTTP server.

Closes #208

(cherry picked from commit 4e5849fe82c6097df5d25cd1a74d69ab4fa50f46)
2024-01-19 08:22:19 -07:00
..
base MIME: Cap nested MIME analysis depth to 100 2024-01-19 08:22:19 -07:00
policy Merge remote-tracking branch 'origin/topic/awelzel/3540-known-hosts-expire-time' 2024-01-12 12:15:38 -07:00
site Merge remote-tracking branch 'origin/topic/awelzel/no-metrics-centralization' 2023-06-21 15:42:10 -07:00
spicy Simplify code generated for Spicy analyzer port ranges. 2023-05-29 12:20:44 +02:00
zeekygen Merge remote-tracking branch 'origin/topic/awelzel/cluster-at-if-removal' 2023-06-12 11:23:01 -07:00
CMakeLists.txt Use the same rules as cmake submodule to reformat Zeek 2023-05-09 08:31:43 -07:00
test-all-policy.zeek Merge remote-tracking branch 'origin/topic/awelzel/no-metrics-centralization' 2023-06-21 15:42:10 -07:00