stream: non infinite default value for reassembly.depth

So that empty config have a safer default.

Ticket: 8290
pull/14843/head
Philippe Antoine 7 months ago committed by Victor Julien
parent db2e97ab5f
commit d378610e93

@ -42,6 +42,8 @@ Major Changes
- Encrypted quic traffic bypass is now independently controlled through
``app-layer.protocols.quic.encryption-handling`` setting. The setting can either
be ``bypass``, ``track-only`` or ``full``.
- Default value for ``stream.reassembly.depth`` when the value is not specified in
suricata.yaml is now 1 MiB instead of 0/unlimited.
Logging Changes
~~~~~~~~~~~~~~~

@ -89,6 +89,8 @@
#define STREAMTCP_DEFAULT_TOCLIENT_CHUNK_SIZE 2560
#define STREAMTCP_DEFAULT_MAX_SYN_QUEUED 10
#define STREAMTCP_DEFAULT_MAX_SYNACK_QUEUED 5
// 1 MiB
#define STREAM_DEPTH_DEFAULT 1024 * 1024
/* Settings order as in the enum */
// clang-format off
@ -735,7 +737,7 @@ void StreamTcpInitConfig(bool quiet)
exit(EXIT_FAILURE);
}
} else {
stream_config.reassembly_depth = 0;
stream_config.reassembly_depth = STREAM_DEPTH_DEFAULT;
}
if (!quiet) {

@ -1670,8 +1670,9 @@ flow-timeouts:
# memcap-policy: ignore # The exception policy value can be "drop-flow",
# # "pass-flow", "bypass", "drop-packet", "pass-packet",
# # "reject" or "ignore" default is "ignore"
# depth: 1 MiB # Can be specified in KiB, MiB, GiB. Just a number
# depth: 1 MiB # Can be specified in KiB, MiB, GiB. Just a number
# # indicates it's in bytes.
# # 1 MiB is the default when this value is not specified
# toserver-chunk-size: 2560 # inspect raw stream in chunks of at least
# # this size. Can be specified in KiB, MiB, GiB.
# # Just a number indicates it's in bytes.
@ -1717,7 +1718,7 @@ stream:
oob-limit-policy: drop
memcap: 256 MiB
#memcap-policy: ignore
depth: 1 MiB # reassemble 1 MiB into a stream
#depth: 1 MiB # reassemble 1 MiB into a stream
toserver-chunk-size: 2560
toclient-chunk-size: 2560
randomize-chunk-size: yes

Loading…
Cancel
Save