]> git.ipfire.org Git - thirdparty/suricata.git/commit
smtp: handle long lines per direction
authorShivani Bhardwaj <shivani@oisf.net>
Tue, 23 May 2023 04:41:38 +0000 (10:11 +0530)
committerVictor Julien <vjulien@oisf.net>
Wed, 14 Jun 2023 04:58:35 +0000 (06:58 +0200)
commit342e21a5ef051831b9e3d2e974aa96407b100ede
treec342d5a30ee30baf799ecc9fd8e4aaef8f5bd727
parent79a1b2edb5f4063d270bfbd7e765ace275ba9267
smtp: handle long lines per direction

Issue:
Currently, while handling of long lines, if the line exceeded the limit,
we'd set a variable state->discard_till_lf which will be reset in the
later stages based on the data that arrives. However, because there was
one variable per state, this meant that a later stage in the other
direction could also modify it which is incorrect.

Fix:
Use separate variables for each direction.

Bug 6053
src/app-layer-smtp.c
src/app-layer-smtp.h