Closed
Conversation
For probing parsers used with a pattern, restrict the max depth to these probing parsers and not all probing parsers. Finishing protocol detection earlier allows to parse data earlier in the case we recognize only one side.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #8448 +/- ##
==========================================
+ Coverage 81.85% 81.93% +0.08%
==========================================
Files 963 963
Lines 278400 278487 +87
==========================================
+ Hits 227890 228191 +301
+ Misses 50510 50296 -214
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
WARNING: ERROR: QA failed on SURI_TLPW1_files_sha256.
Pipeline 12051 |
Contributor
Author
|
@ct0br0 could you provide me with a pcap with one (or more) flows that are recognized as FTP by master, and not by this PR ? |
Contributor
Author
|
Replaced by #8512 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/1125
Describe changes:
The most special trick is that the (server) probing parser waits for the client side to have seen some data to take a definitive positive decision.
So that If it looks like a SMTP server (it could be a FTP server), let's see if the client looks like SMTP or FTP or something unknown...
Modifies #8327 by rebasing to rerun rebased QA
I wonder if SMTP parser should also relax its condition to set
state->parser_state |= SMTP_PARSER_STATE_FIRST_REPLY_SEEN;