Closed
Conversation
... to account for midstream sessions. Commit 497394e removed inspection of app-proto txs for packets without an established TCP connection. But this meant that the first packet seen in a session pick mid-stream could go without inspection (previous bug 5510 seemed to point towards this behavior, too). If a flow has more packets, the stream will be inspected as part of the upcoming packets and this would go unnoticed. In a single-packet flow, however, the inspection for the packed would be skipped. Although this might not affect alerts -- as they could be processed as part of the flow timeout logic, the actual traffic could be evaded in IPS, in case of a drop rule. From the above, the most visible scenario is when there is only one packet on the flow, as then the engine doesn't have "more time" to pick-up real-packets to inspect for that given flow. But certain tests show that this can also happen for more than one packet scenarios: there will be one less drop event, or traffic from a packet that should have been already dropped will be logged. This led to the possibility of a real packet not being blocked, in IPS, or matched against rules, as the corresponding portion of the stream was only inspected later, as part of the stream/flow-timeout logic. To ensure that we correctly flag the first packet seen for a given mid-stream session, we must check for the session state and existance *after* we have dealt with TCP flags and state. Related to Bug OISF#5510 As part of Bug OISF#5180 (cherry picked from commit bd76c29)
Ticket: 7846 (cherry picked from commit dbea660)
Ticket: 7846 (cherry picked from commit 539e4ee)
Contributor
Author
|
cc @jufajardini created with OISF/suricata-verify#2906 |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main-8.0.x #14844 +/- ##
==============================================
+ Coverage 83.56% 83.57% +0.01%
==============================================
Files 1010 1011 +1
Lines 266211 266371 +160
==============================================
+ Hits 222452 222613 +161
+ Misses 43759 43758 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Information: QA ran without warnings. Pipeline = 29771 |
victorjulien
approved these changes
Feb 24, 2026
Member
|
Merged in #14892, thanks! |
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 ticket: https://redmine.openinfosecfoundation.org/issues/
https://redmine.openinfosecfoundation.org/issues/8299
https://redmine.openinfosecfoundation.org/issues/8235
Describe changes:
SV_BRANCH=OISF/suricata-verify#2923