From: Eric Leblond Date: Fri, 28 May 2021 10:19:45 +0000 (+0200) Subject: stream/tcp: limit ACK validation X-Git-Tag: suricata-7.0.0-beta1~1569 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c8c043185a4700b042d2154f5076f1c82e5394b;p=thirdparty%2Fsuricata.git stream/tcp: limit ACK validation Only limit ACK value validation for packet where the ACK bit is set. --- diff --git a/src/stream-tcp.c b/src/stream-tcp.c index 898bde925f..9ed3cd8b24 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -5822,6 +5822,9 @@ static inline int StreamTcpValidateAck(TcpSession *ssn, TcpStream *stream, Packe { SCEnter(); + if (!(p->tcph->th_flags & TH_ACK)) + SCReturnInt(0); + uint32_t ack = TCP_GET_ACK(p); /* fast track */