New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tx: fix unidirection transaction cleanup (dns tx fix) - v4 #6076
Merged
Conversation
This file contains 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
A unidirection protocol parser should only have its transactions marked as "skipped" if it is skipped in both the TS and TC directions, otherwise unidir transactions are always considered skipped and the cleanup will never updates its minimum id. Redmine issue: https://redmine.openinfosecfoundation.org/issues/4437
It doesn't look like flood protection is required with the stateless parser anymore. It actually can get in the way of TCP DNS when a large number of requests end-up in the same segment where a TX can get purged before it has a chance to go through the normal TX life-cycle.
Codecov Report
@@ Coverage Diff @@
## master #6076 +/- ##
==========================================
- Coverage 77.02% 77.02% -0.01%
==========================================
Files 612 612
Lines 187682 187684 +2
==========================================
- Hits 144558 144555 -3
- Misses 43124 43129 +5
Flags with carried forward coverage won't be shown. Click here to find out more. |
Merged
Thanks! |
catenacyber
added a commit
to catenacyber/suricata
that referenced
this pull request
May 26, 2023
Ticket: OISF#6076
jasonish
pushed a commit
to jasonish/suricata
that referenced
this pull request
May 26, 2023
Ticket: OISF#6076
jasonish
pushed a commit
to jasonish/suricata
that referenced
this pull request
May 26, 2023
Ticket: OISF#6076
jasonish
added a commit
to jasonish/suricata
that referenced
this pull request
May 26, 2023
jasonish
pushed a commit
to jasonish/suricata
that referenced
this pull request
Jun 5, 2023
Ticket: OISF#6076
jasonish
added a commit
to jasonish/suricata
that referenced
this pull request
Jun 5, 2023
jasonish
added a commit
to jasonish/suricata
that referenced
this pull request
Jun 5, 2023
jasonish
pushed a commit
to jasonish/suricata
that referenced
this pull request
Jun 19, 2023
Ticket: OISF#6076
jasonish
added a commit
to jasonish/suricata
that referenced
this pull request
Jun 19, 2023
catenacyber
added a commit
to catenacyber/suricata
that referenced
this pull request
Jun 28, 2023
Ticket: OISF#6076
catenacyber
added a commit
to catenacyber/suricata
that referenced
this pull request
Jun 28, 2023
Ticket: OISF#6076
catenacyber
added a commit
to catenacyber/suricata
that referenced
this pull request
Jun 29, 2023
Ticket: OISF#6076
jasonish
pushed a commit
to jasonish/suricata
that referenced
this pull request
Jul 6, 2023
victorjulien
pushed a commit
to victorjulien/suricata
that referenced
this pull request
Nov 16, 2023
Ticket: OISF#6076
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.
Fir commit fixes unidirection transaction handling. We only want to mark a TX as skipped if skipped in both the TS and TC side if unidirectional. If one side is seen, then its complete. Instead it has been marked as skipped, so the starting TX ID on cleanup is never incremented, resulting in a larger number of iterations as the transaction grow on a session.
This was easily seen with DNS when multiple transactions occurred on the same flow before the flow timed out. In many cases this would not be noticed, but is really notiecable when there are devices present that blast DNS requests over the same session.
Note: You must have some rules enabled to hit this case, it doesn't appear to show up if you have no rules enabled.
The second commit just removes the DNS flood protection which appears is not needed, as it only kicks in when it should not kick in.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/4437