]> git.ipfire.org Git - thirdparty/suricata.git/commit
ssh: avoid quadratic complexity from long banner
authorPhilippe Antoine <pantoine@oisf.net>
Thu, 22 Feb 2024 09:14:36 +0000 (10:14 +0100)
committerVictor Julien <vjulien@oisf.net>
Tue, 19 Mar 2024 09:40:16 +0000 (10:40 +0100)
commita947228259541c6cec9dbbffdb4957d8af9e0621
tree6c2c4e639b34986f853778a6aecebcf7d28560c1
parent0dfa339cc97aef513fb68c47bc0408c58af3cd1f
ssh: avoid quadratic complexity from long banner

Ticket: 6799

When we find an overlong banner, we get into the state just
waiting for end of line, and we just want to skip the bytes
until then.
Returning AppLayerResult::incomplete made TCP engine retain
the bytes and grow the buffer that we parsed again and again...

(cherry picked from commit 271ed2008bb7392ca2803ab6dac8952491616151)
rust/src/ssh/ssh.rs